diff options
| author | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2024-12-05 13:49:22 -0500 |
|---|---|---|
| committer | Jacob McDonnell <jacob@jacobmcdonnell.com> | 2024-12-05 13:49:22 -0500 |
| commit | f8d09c5cfd6d1d9595b64547dc9d29c63e40c5f2 (patch) | |
| tree | 0dd9cfa47cfa0bd4d57d7789439cc86afbbdfa85 /scripts/getUnicode | |
| parent | 29b1c791f6e319cdab828cee5f491ca1c38e41d1 (diff) | |
Moved .local/bin to scripts
Diffstat (limited to 'scripts/getUnicode')
| -rwxr-xr-x | scripts/getUnicode | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/getUnicode b/scripts/getUnicode new file mode 100755 index 0000000..13d7971 --- /dev/null +++ b/scripts/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 |
