summaryrefslogtreecommitdiff
path: root/.local/bin/getUnicode
blob: 13d797166f585d8ecb08c4f8ca6cdd9c8eaf345d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

char=$(cut -d ';' -f1 ~/.local/share/unicode | dmenu -i -l 30 | sed "s/ .*//")

[ -z "$char" ] && exit

if [ -n "$1" ]; then
	xdotool type "$char"
else
	echo "$char" | tr -d '\n' | xclip -selection clipboard
	notify-send "'$char' copied to clipboard." &
fi