dotfiles/home/scripts/dmenuunicode

15 lines
462 B
Plaintext
Raw Normal View History

2019-01-16 16:52:32 +01:00
#!/bin/sh
# Give dmenu list of all unicode characters to copy.
# Shows the selected character in dunst if running.
# Must have xclip installed to even show menu.
xclip -h >/dev/null || exit
2020-02-28 14:36:14 +01:00
chosen=$(grep -v "#" $HOME/.config/nixpkgs/nix-dotfiles/scripts/emojis.txt | dmenu -i -l 20 -fn Monospace-14)
2019-01-16 16:52:32 +01:00
[ "$chosen" != "" ] || exit
c=$(echo "$chosen" | sed "s/ .*//")
echo "$c" | tr -d '\n' | xclip -selection clipboard
notify-send "'$c' copied to clipboard." &