nixos-config/pkgs/emoji/default.nix

54 lines
1.4 KiB
Nix
Raw Normal View History

2019-10-24 02:20:38 +02:00
{ coreutils, dmenu, gnused, writeShellScriptBin , writeText, xdotool, ... }:
let
# from http://asciimoji.com/
emoticons = writeText "emoticons" ''
¯\(°_o)/¯ | dunno lol shrug dlol
¯\_()_/¯ | dunno lol shrug dlol
( ͡° ͜ʖ ͡°) | lenny
¯\_( ͡° ͜ʖ ͡°)_/¯ | lenny shrug dlol
( д) | aaah sad noo
(^o^)丿 | hi yay yey hello
(^o^; | ups hehe
(^^) | yay yey
(´) | angry argh
(^_^) byebye!! | bye
<(^.^<) <(^.^)> (>^.^)> (7^.^)7 (>^.^<) | dance
(-.-)Zzz... | sleep
() | oh noes woot
| tm
ζ | zeta
(°° | table flip
() | why woot
(= ФФ=) | cat
() | cute
() | you
xx | dead
| derp
(҂_) | endure
(*)*: | glitter
(_) | nerd
WHΣИ $HΛLL WΣ MΣΣ ΛGΛ|И? | when shall we meet again
| check
(ʋ) | dog
()*: | excited
(ʋ) | jake dog
L(° O °L) | lol
o()xxxx[{::::::::::::::::::> | sword
(ÒДÓױ) | what wat
Y Oˡʸ L O | yolo
(ʟ) | zen
@}-,-`- | rose
'';
in
writeShellScriptBin "emoticons" ''
set -efu
data=$(${coreutils}/bin/cat ${emoticons})
emoticon=$(echo "$data" | ${dmenu}/bin/dmenu -l 10 | ${gnused}/bin/sed 's/ | .*//')
${xdotool}/bin/xdotool type -- "$emoticon"
exit 0
''