diff options
author | Yigit Sever | 2024-08-08 10:57:15 +0200 |
---|---|---|
committer | Yigit Sever | 2024-08-08 10:57:15 +0200 |
commit | e7133668e8cd3909d808678f0b690052f75a3d52 (patch) | |
tree | 00365d2a00a711a3385aab8a95ffc202ac8c1d83 /.local | |
parent | 22b871708664ee59192b11ce95db84cbb737dc7d (diff) | |
download | dotfiles-e7133668e8cd3909d808678f0b690052f75a3d52.tar.gz dotfiles-e7133668e8cd3909d808678f0b690052f75a3d52.tar.bz2 dotfiles-e7133668e8cd3909d808678f0b690052f75a3d52.zip |
bukuadd: add wayland/x11 guard
Diffstat (limited to '.local')
-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 |