personal dotfiles: my Hyprland config
Diffstat (limited to '.local/bin/unicode.sh')
-rwxr-xr-x.local/bin/unicode.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/.local/bin/unicode.sh b/.local/bin/unicode.sh
index b0de965..fb0721c 100755
--- a/.local/bin/unicode.sh
+++ b/.local/bin/unicode.sh
@@ -31,6 +31,10 @@ function hex2dec(h,i,x,v){
}
test -e ~/.cache/sxmo/PrintableUnicodes.tsv || makefile
-# can't wl-ime-type or wtype in pop-os wayland
-cat ~/.cache/sxmo/PrintableUnicodes.tsv | sxmo_dmenu.sh -i | cut -d' ' -f1 | tee /dev/stderr | xargs wl-copy #xargs -I{} wl-ime-type '{}'
+if test "$XDG_SESSION_TYPE" = x11; then
+ printf "%s" $(cat ~/.cache/sxmo/PrintableUnicodes.tsv | sxmo_dmenu.sh -i | cut -d' ' -f1 | tee /dev/stderr) | xclip -selection clipboard
+else
+ # can't wl-ime-type or wtype in pop-os wayland
+ cat ~/.cache/sxmo/PrintableUnicodes.tsv | sxmo_dmenu.sh -i | cut -d' ' -f1 | tee /dev/stderr | xargs wl-copy #xargs -I{} wl-ime-type '{}'
+fi