summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
authorYigit Sever2024-08-08 10:57:15 +0200
committerYigit Sever2024-08-08 10:57:15 +0200
commite7133668e8cd3909d808678f0b690052f75a3d52 (patch)
tree00365d2a00a711a3385aab8a95ffc202ac8c1d83 /.local/bin
parent22b871708664ee59192b11ce95db84cbb737dc7d (diff)
downloaddotfiles-e7133668e8cd3909d808678f0b690052f75a3d52.tar.gz
dotfiles-e7133668e8cd3909d808678f0b690052f75a3d52.tar.bz2
dotfiles-e7133668e8cd3909d808678f0b690052f75a3d52.zip
bukuadd: add wayland/x11 guard
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/bukuadd_c12
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 3SESH=$(loginctl show-session $(awk '/tty/ {print $1}' <(loginctl)) -p Type | awk -F= '{print $2}')
4url=$(xsel -b) 4
5tags=$(zenity --entry --text="enter tags for $url") 5if [[ "$SESH" = "wayland" ]]; then
6 url=$(wl-paste)
7 tags=$(yad --entry --text="enter tags for $url")
8else
9 url=$(xsel -b)
10 tags=$(zenity --entry --text="enter tags for $url")
11fi
6 12
7if [[ $? -ne 0 ]]; then 13if [[ $? -ne 0 ]]; then
8 exit 0 14 exit 0