mirror of
https://github.com/biox/shmoji.git
synced 2024-11-09 17:28:49 +01:00
Add emojiprint func
This commit is contained in:
parent
3f0547dc04
commit
62116f1b6f
1 changed files with 6 additions and 2 deletions
8
shmoji
8
shmoji
|
@ -29,6 +29,10 @@ emojicheck() {
|
||||||
[ -f "$emojifile" ] || die "emojis not found. try 'shmoji download'"
|
[ -f "$emojifile" ] || die "emojis not found. try 'shmoji download'"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
emojiprint() {
|
||||||
|
printf "%s" "$1" | cut -d " " -f 1 | tr -d '\n'
|
||||||
|
}
|
||||||
|
|
||||||
case "$cmd" in
|
case "$cmd" in
|
||||||
download)
|
download)
|
||||||
depends curl
|
depends curl
|
||||||
|
@ -41,7 +45,7 @@ case "$cmd" in
|
||||||
emojicheck
|
emojicheck
|
||||||
depends bemenu wtype
|
depends bemenu wtype
|
||||||
emoji=$(cat "$emojifile" | bemenu -c -W 0.2 -l 20)
|
emoji=$(cat "$emojifile" | bemenu -c -W 0.2 -l 20)
|
||||||
printf "%s" "$emoji" | cut -d " " -f 1 | tr -d '\n' | wtype -
|
emojiprint "$emoji" | wtype -
|
||||||
;;
|
;;
|
||||||
rofi)
|
rofi)
|
||||||
emojicheck
|
emojicheck
|
||||||
|
@ -54,7 +58,7 @@ case "$cmd" in
|
||||||
emojicheck
|
emojicheck
|
||||||
depends fzf
|
depends fzf
|
||||||
emoji=$(cat "$emojifile" | fzf)
|
emoji=$(cat "$emojifile" | fzf)
|
||||||
printf "%s" "$emoji" | cut -d " " -f 1 | tr -d '\n'
|
emojiprint "$emoji"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
printf "%s\n" "usage: shmoji [download | bemenu | rofi | fzf]"
|
printf "%s\n" "usage: shmoji [download | bemenu | rofi | fzf]"
|
||||||
|
|
Loading…
Reference in a new issue