summaryrefslogtreecommitdiff
path: root/.local/bin/getUnicode
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/getUnicode')
-rwxr-xr-x.local/bin/getUnicode12
1 files changed, 12 insertions, 0 deletions
diff --git a/.local/bin/getUnicode b/.local/bin/getUnicode
new file mode 100755
index 0000000..13d7971
--- /dev/null
+++ b/.local/bin/getUnicode
@@ -0,0 +1,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