diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2020-10-15 23:23:21 -0400 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2020-10-15 23:23:21 -0400 |
commit | 5f92a897b42ca2af261d8e6398e071051496bb51 (patch) | |
tree | e7d6634ee8d6f1f5be656b79486eaf612ed35f46 /.local/bin | |
parent | 2b831ada487642a5d925d99322151791ca21e861 (diff) |
Emojy copy script works!
Diffstat (limited to '.local/bin')
-rwxr-xr-x | .local/bin/emoji-copy | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/.local/bin/emoji-copy b/.local/bin/emoji-copy index a52c171..9ddc05d 100755 --- a/.local/bin/emoji-copy +++ b/.local/bin/emoji-copy @@ -4,17 +4,12 @@ # to the clipboard. Some font-awesome icons are # also supported. -choice=$( cat $SCRIPTS/utilities/.emoji-list.txt | dmenu -i -p "Emojis & Font Awesome") +choice=$( cat ~/.local/share/emoji | dmenu -i -p "Font Awesome & Emojis: ") -icon=$(echo $choice | sed "s/\(.\).*$/\1/") -label=$(echo $choice | sed "s/^..\(.*\)/\1/") +icon=$(echo $choice | sed "s/^\(.\).*$/\1/") -printf $icon | xsel -b +printf "$icon" | xsel -b -echo "$icon" -if [[ "$icon" == "" ]]; then - notify-send "Operation Cancelled" -else - notify-send -i "$HOME/.fonts/svgs/$label.svg" "Clipboard:" "$label has been copied!" -fi +[ -z "$icon" ] && notify-send -a "Clipboard:" "Operation Cancelled" +[ -z "$icon" ] || notify-send -a "Clipboard:" "$icon has been copied!" |