mirror of
https://github.com/biox/shmoji.git
synced 2024-11-09 17:28:49 +01:00
added rofi
This commit is contained in:
parent
5dc6e94c87
commit
d3fe8bed87
1 changed files with 10 additions and 1 deletions
11
shmoji
11
shmoji
|
@ -6,6 +6,7 @@
|
|||
# - shmoji download: curl
|
||||
# - shmoji fzf: fzf
|
||||
# - shmoji bemenu: bemenu & wtype
|
||||
# - shmoji rofi: rofi & xdotool
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -37,6 +38,14 @@ case "$cmd" in
|
|||
emoji=$(cat "$emojidb/emojis.txt" | bemenu -c -W 0.2 -l 20)
|
||||
printf "%s" "$emoji" | cut -d " " -f 1 | tr -d '\n' | wtype -
|
||||
;;
|
||||
rofi)
|
||||
emojicheck
|
||||
command -v rofi > /dev/null || die 'rofi not found'
|
||||
command -v xdotool > /dev/null || die 'xdotool not found'
|
||||
win=$(xdotool getactivewindow)
|
||||
emoji=$(cat "$emojidb/emojis.txt" | rofi -dmenu | cut -d " " -f 1 | tr -d '\n')
|
||||
[ "$emoji" ] && xdotool windowactivate --sync $win type --clearmodifiers $emoji
|
||||
;;
|
||||
fzf)
|
||||
emojicheck
|
||||
command -v fzf > /dev/null || die 'fzf not found'
|
||||
|
@ -44,7 +53,7 @@ case "$cmd" in
|
|||
printf "%s" "$emoji" | cut -d " " -f 1 | tr -d '\n'
|
||||
;;
|
||||
*)
|
||||
printf "%s\n" "usage: shmoji [download | bemenu | fzf]"
|
||||
printf "%s\n" "usage: shmoji [download | bemenu | rofi | fzf]"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in a new issue