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

53 lines
1.5 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ 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
''