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'"
|
||||
}
|
||||
|
||||
emojiprint() {
|
||||
printf "%s" "$1" | cut -d " " -f 1 | tr -d '\n'
|
||||
}
|
||||
|
||||
case "$cmd" in
|
||||
download)
|
||||
depends curl
|
||||
|
@ -41,7 +45,7 @@ case "$cmd" in
|
|||
emojicheck
|
||||
depends bemenu wtype
|
||||
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)
|
||||
emojicheck
|
||||
|
@ -54,7 +58,7 @@ case "$cmd" in
|
|||
emojicheck
|
||||
depends 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]"
|
||||
|
|
Loading…
Reference in a new issue