dotfiles/_gui/_scripts/selector-chars

12 lines
299 B
Plaintext
Raw Normal View History

2021-08-23 21:36:32 +02:00
#!/bin/sh
2023-08-08 23:09:16 +02:00
chosen=$(cut -d ';' -f1 $XDG_CONFIG_HOME/qtile/chars/* | wofi -G --dmenu -i -p "select character to copy" | sed "s/ .*//")
2021-08-23 21:36:32 +02:00
[ -z "$chosen" ] && exit
if [ -n "$1" ]; then
xdotool type "$chosen"
else
2023-07-27 21:59:12 +02:00
printf "$chosen" | wl-copy -n
notify-send -t 2000 "'$chosen' copied to clipboard" &
2021-08-23 21:36:32 +02:00
fi