diff options
-rwxr-xr-x | .local/bin/bukuadd_c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/.local/bin/bukuadd_c b/.local/bin/bukuadd_c index 86f705d..1ec34a7 100755 --- a/.local/bin/bukuadd_c +++ b/.local/bin/bukuadd_c | |||
@@ -1,8 +1,14 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | #set -e | 3 | SESH=$(loginctl show-session $(awk '/tty/ {print $1}' <(loginctl)) -p Type | awk -F= '{print $2}') |
4 | url=$(xsel -b) | 4 | |
5 | tags=$(zenity --entry --text="enter tags for $url") | 5 | if [[ "$SESH" = "wayland" ]]; then |
6 | url=$(wl-paste) | ||
7 | tags=$(yad --entry --text="enter tags for $url") | ||
8 | else | ||
9 | url=$(xsel -b) | ||
10 | tags=$(zenity --entry --text="enter tags for $url") | ||
11 | fi | ||
6 | 12 | ||
7 | if [[ $? -ne 0 ]]; then | 13 | if [[ $? -ne 0 ]]; then |
8 | exit 0 | 14 | exit 0 |