summary refs log tree commit diff
path: root/.local
diff options
context:
space:
mode:
authorZach DeCook <zach.decook@bettercarpeople.com>2024-06-14 11:23:45 -0400
committerZach DeCook <zach.decook@bettercarpeople.com>2024-06-14 11:23:45 -0400
commitbc3c2177f11891b4d8d7532955b7bc021c6ce10a (patch)
tree424f841146f56fe9a16016fa65385d407ade12cf /.local
parent46163edbc6fa51ede7ac9b258613c41dee7200c0 (diff)
downloaddotfiles-bc3c2177f11891b4d8d7532955b7bc021c6ce10a.tar.gz
some fish stuff
Diffstat (limited to '.local')
-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