nixos-config/nixos/pkgs/emoji/default.nix

53 lines
1.5 KiB
Nix
Raw Normal View History

2019-12-20 05:54:26 +01:00
{ coreutils, dmenu, gnused, writeShellScriptBin, writeText, xdotool, ... }:
2019-10-24 02:20:38 +02:00
let
# from http://asciimoji.com/
emoticons = writeText "emoticons" ''
2019-12-20 05:54:26 +01:00
¯\(°_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
'';
2019-10-24 02:20:38 +02:00
2019-12-20 05:54:26 +01:00
in writeShellScriptBin "emoticons" ''
2019-10-24 02:20:38 +02:00
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
''