diff options
author | zachir <zachir@librem.one> | 2025-07-08 11:51:08 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2025-07-08 11:51:08 -0500 |
commit | c9d939e8e9d7845233820952276178c24a5914cf (patch) | |
tree | 759e93f45abdef548bbcf17e9b560276c1b4df15 /dmenuunicode | |
parent | adb5dbef8e382f98caf3104ebd1a88af592f0970 (diff) |
dmenuunicode to wl or x clip
Diffstat (limited to 'dmenuunicode')
-rwxr-xr-x | dmenuunicode | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dmenuunicode b/dmenuunicode index ef7a63d..1769cb6 100755 --- a/dmenuunicode +++ b/dmenuunicode @@ -14,9 +14,11 @@ esac done if [ -n "$WAYLAND_DISPLAY" ]; then DMENU="tofi" DEFARGS="-c $HOME/.config/tofi/themes/dmenu_vertical" + CLIP="wl-copy" elif [ -n "$DISPLAY" ]; then DMENU="dmenu " DEFARGS="-l 10" + CLIP="xclip -selection clipboard" else print "Can't tell if Wayland or X; what gives?\n" exit 1 @@ -33,6 +35,6 @@ chosen=$(cut -d ';' -f1 ~/.local/share/larbs/chars/* | $DMENU $DEFARGS $ARGS | s if [ -n "$1" ]; then xdotool type "$chosen" else - printf "$chosen" | xclip -selection clipboard + printf "$chosen" | $CLIP notify-send "'$chosen' copied to clipboard." & fi |