dotfiles/_gui/_scripts/selector-chars

12 lines
300 B
Plaintext
Raw Normal View History

2021-08-23 21:36:32 +02:00
#!/bin/sh
2023-04-20 01:09:43 +02:00
chosen=$(cut -d ';' -f1 $XDG_CONFIG_HOME/qtile/chars/* | dmenu -l 20 -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-05-15 23:42:34 +02:00
printf "$chosen" | xclip -rmlastnl
notify-send -t 2000 "'$chosen' copied to clipboard" &
2021-08-23 21:36:32 +02:00
fi