mirror of
https://github.com/biox/shmoji.git
synced 2024-11-09 17:28:49 +01:00
shmoji ACTIVATE
This commit is contained in:
commit
30fa9456f5
4 changed files with 3622 additions and 0 deletions
12
README
Normal file
12
README
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
shomji 💀
|
||||||
|
|
||||||
|
j3s's simple little shell-based emoji picker
|
||||||
|
|
||||||
|
usage: shmoji [bemenu | download]
|
||||||
|
|
||||||
|
examples:
|
||||||
|
# download emojis
|
||||||
|
shmoji download
|
||||||
|
|
||||||
|
# launch shmoji with bemenu
|
||||||
|
shmoji bemenu
|
1
build
Normal file
1
build
Normal file
|
@ -0,0 +1 @@
|
||||||
|
scp emojilist/emojis.txt j3s.sh:/var/www/trash.j3s.sh/emojis.txt
|
3570
emojis.txt
Normal file
3570
emojis.txt
Normal file
File diff suppressed because it is too large
Load diff
39
shmoji
Executable file
39
shmoji
Executable file
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# shell-based emoji picker
|
||||||
|
#
|
||||||
|
# deps:
|
||||||
|
# - bemenu + wtype
|
||||||
|
# - curl, if you wanna download my emoji list
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cmd="$1"
|
||||||
|
emojidb="$HOME/.local/share/emoji-bemenu"
|
||||||
|
emojifile="$emojidb/emojis.txt"
|
||||||
|
|
||||||
|
die() {
|
||||||
|
printf "%s\n" "$1"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$cmd" in
|
||||||
|
-h|--help|help|"")
|
||||||
|
printf "%s\n" "usage: shmoji [bemenu | download]"
|
||||||
|
;;
|
||||||
|
download)
|
||||||
|
command -v curl > /dev/null || die 'curl not found'
|
||||||
|
mkdir -p "$emojidb"
|
||||||
|
# $ wc -l /var/www/trash.j3s.sh/emojis.txt
|
||||||
|
# 3570 /var/www/trash.j3s.sh/emojis.txt
|
||||||
|
curl 'https://trash.j3s.sh/emojis.txt' >"$emojidb/emojis.txt"
|
||||||
|
;;
|
||||||
|
bemenu)
|
||||||
|
command -v bemenu > /dev/null || die 'bemenu not found'
|
||||||
|
command -v wtype > /dev/null || die 'wtype not found'
|
||||||
|
emoji=$(cat "$emojidb/emojis.txt" | bemenu -c -W 0.2 -l 20)
|
||||||
|
printf "%s" "$emoji" | cut -d " " -f 1 | wtype -
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in a new issue