From 65b480d55540dee71f5fadcbd6d956bab8402ff1 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Tue, 20 Aug 2024 09:15:32 +0200 Subject: bukuadd_c: better wayland/x11 --- .local/bin/bukuadd_c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to '.local/bin/bukuadd_c') diff --git a/.local/bin/bukuadd_c b/.local/bin/bukuadd_c index 1ec34a7..eadd705 100755 --- a/.local/bin/bukuadd_c +++ b/.local/bin/bukuadd_c @@ -1,8 +1,7 @@ -#!/bin/bash +#!/usr/bin/env bash -SESH=$(loginctl show-session $(awk '/tty/ {print $1}' <(loginctl)) -p Type | awk -F= '{print $2}') - -if [[ "$SESH" = "wayland" ]]; then +if command -v wl-paste &> /dev/null +then url=$(wl-paste) tags=$(yad --entry --text="enter tags for $url") else -- cgit v1.2.3-70-g09d2