Small modifications in 'fawesome' and 'unicode' scripts
This commit is contained in:
parent
fbe89b6b6b
commit
13a3e6a43d
@ -2,13 +2,14 @@
|
|||||||
|
|
||||||
xclip -h 2>/dev/null || exit
|
xclip -h 2>/dev/null || exit
|
||||||
|
|
||||||
CHOSEN=$(sed '0,/^__DATA__$/d' "$0" | rofi -dmenu -i -l 20 -p 'Font Awesome')
|
emoji=$(sed '0,/^__DATA__$/d' "$0" | rofi -dmenu -i -l 20 -p 'Font Awesome')
|
||||||
|
[ ! "$emoji" ] && exit
|
||||||
|
|
||||||
[ "$CHOSEN" != "" ] || exit
|
emoji=$(printf "%s$emoji" | sed "s/ .*//")
|
||||||
|
|
||||||
CHOSEN=$(printf "%s$CHOSEN" | sed "s/ .*//")
|
echo "$emoji" | tr -d '\n' | xclip -selection clipboard
|
||||||
echo "$CHOSEN" | tr -d '\n' | xclip -selection clipboard
|
|
||||||
notify-send "'$CHOSEN' copied to clipboard."
|
notify-send "'$emoji' copied to clipboard."
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
# Give dmenu list of all unicode characters to copy.
|
# Give dmenu list of all unicode characters to copy.
|
||||||
# Shows the selected character in dunst if running.
|
# Shows the selected character in dunst if running.
|
||||||
|
|
||||||
xclip -h 2>/dev/null || exit
|
xclip -h 2>/dev/null || exit
|
||||||
|
|
||||||
CHOSEN=$(sed '0,/^__DATA__$/d' "$0" | rofi -dmenu -i -l 20 -p 'Unicode')
|
emoji=$(sed '0,/^__DATA__$/d' "$0" | rofi -dmenu -i -l 20 -p 'Unicode')
|
||||||
|
|
||||||
[ "$CHOSEN" != "" ] || exit
|
[ ! "$emoji" ] && exit
|
||||||
|
|
||||||
CHOSEN=$(printf "%s$CHOSEN" | sed "s/ .*//")
|
emoji=$(printf "%s$emoji" | sed "s/ .*//")
|
||||||
echo "$CHOSEN" | tr -d '\n' | xclip -selection clipboard
|
echo "$emoji" | tr -d '\n' | xclip -selection clipboard
|
||||||
notify-send "'$CHOSEN' copied to clipboard."
|
notify-send "'$emoji' copied to clipboard."
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user