mirror of
https://github.com/kmein/niveum
synced 2026-03-22 12:51:08 +01:00
feat(unicodmenu): get from unicode website
This commit is contained in:
@@ -1,47 +1,65 @@
|
|||||||
{ lib, fetchurl, writeText, writers, coreutils, dmenu, gnused, libnotify, xclip, xdotool }:
|
{ lib, runCommand, fetchurl, writeText, writers, coreutils, dmenu, gnused, libnotify, xclip, xdotool, gawk }:
|
||||||
let
|
let
|
||||||
emoji-file = fetchurl {
|
unicode-file = runCommand "unicode.txt" {} ''
|
||||||
url = "https://raw.githubusercontent.com/kmein/unipicker/master/symbols";
|
${writers.writePython3 "generate.py" { flakeIgnore = [ "E501" "E722" ]; } ''
|
||||||
sha256 = "1q6ampv4fhdvd0riz4ihx43gkbyvdab4c38q96ybn0ka9d30vi3g";
|
import csv
|
||||||
};
|
|
||||||
|
with open("${fetchurl {
|
||||||
|
url = "https://unicode.org/Public/UCD/latest/ucd/UnicodeData.txt";
|
||||||
|
sha256 = "sha256-NgGOaGV/3LNIX2NmMP/oyFMuAcl3cD0oA/W4nWxf6vs=";
|
||||||
|
}}", "r") as unicode_data:
|
||||||
|
reader = csv.reader(unicode_data, delimiter=";")
|
||||||
|
next(reader) # skip first row containing \0
|
||||||
|
for row in reader:
|
||||||
|
codepoint = row[0]
|
||||||
|
name = row[1]
|
||||||
|
alternate_name = row[10]
|
||||||
|
try:
|
||||||
|
print(chr(int(codepoint, 16)), codepoint, name, alternate_name, sep=" ")
|
||||||
|
except:
|
||||||
|
continue
|
||||||
|
''} > $out
|
||||||
|
'';
|
||||||
kaomoji-file = writeText "kaomoji.txt" ''
|
kaomoji-file = writeText "kaomoji.txt" ''
|
||||||
¯\(°_o)/¯ dunno lol shrug dlol
|
¯\(°_o)/¯ dunno lol shrug dlol
|
||||||
¯\_(ツ)_/¯ dunno lol shrug dlol
|
¯\_(ツ)_/¯ dunno lol shrug dlol
|
||||||
( ͡° ͜ʖ ͡°) lenny
|
( ͡° ͜ʖ ͡°) lenny
|
||||||
¯\_( ͡° ͜ʖ ͡°)_/¯ lenny shrug dlol
|
¯\_( ͡° ͜ʖ ͡°)_/¯ lenny shrug dlol
|
||||||
( ゚д゚) aaah sad noo
|
( ゚д゚) aaah sad noo
|
||||||
ヽ(^o^)丿 hi yay hello
|
ヽ(^o^)丿 hi yay hello
|
||||||
(^o^: ups hehe
|
(^o^: ups hehe
|
||||||
(^∇^) yay
|
(^∇^) yay
|
||||||
┗(`皿´)┛ angry argh
|
┗(`皿´)┛ angry argh
|
||||||
ヾ(^_^) byebye!! bye
|
ヾ(^_^) byebye!! bye
|
||||||
<(^.^<) <(^.^)> (>^.^)> (7^.^)7 (>^.^<) dance
|
<(^.^<) <(^.^)> (>^.^)> (7^.^)7 (>^.^<) dance
|
||||||
(-.-)Zzz... sleep
|
(-.-)Zzz... sleep
|
||||||
(∩╹□╹∩) oh noes woot
|
(∩╹□╹∩) oh noes woot
|
||||||
(╯°□°)╯ ┻━┻ table flip
|
(╯°□°)╯ ┻━┻ table flip
|
||||||
(」゜ロ゜)」 why woot
|
(」゜ロ゜)」 why woot
|
||||||
(_゜_゜_) gloom I see you
|
(_゜_゜_) gloom I see you
|
||||||
༼ ༎ຶ ෴ ༎ຶ༽ sad
|
༼ ༎ຶ ෴ ༎ຶ༽ sad
|
||||||
(\/) (°,,,,°) (\/) krebs
|
(\/) (°,,,,°) (\/) krebs
|
||||||
┳━┳ ヽ(ಠل͜ಠ)ノ putting table back
|
┳━┳ ヽ(ಠل͜ಠ)ノ putting table back
|
||||||
┻━┻︵ \(°□°)/ ︵ ┻━┻ flip all dem tablez
|
┻━┻︵ \(°□°)/ ︵ ┻━┻ flip all dem tablez
|
||||||
(`・ω・´) bear look
|
(`・ω・´) bear look
|
||||||
ᕦ(ຈل͜ຈ)ᕤ strong flex muscle bicep
|
ᕦ(ຈل͜ຈ)ᕤ strong flex muscle bicep
|
||||||
ᕦ(ò_óˇ)ᕤ strong flex muscle bicep
|
ᕦ(ò_óˇ)ᕤ strong flex muscle bicep
|
||||||
(๑>ᴗ<๑) excite
|
(๑>ᴗ<๑) excite
|
||||||
(∩ ` -´)⊃━━☆゚.*・。゚ wizard spell magic
|
(∩ ` -´)⊃━━☆゚.*・。゚ wizard spell magic
|
||||||
◕ ◡ ◕ puss in boots big eye
|
◕ ◡ ◕ puss in boots big eye
|
||||||
≋≋≋≋≋̯̫⌧̯̫(ˆ•̮ ̮•ˆ) nyan cat
|
≋≋≋≋≋̯̫⌧̯̫(ˆ•̮ ̮•ˆ) nyan cat
|
||||||
ʕ•ᴥ•ʔ bear
|
ʕ•ᴥ•ʔ bear
|
||||||
(ԾɷԾ) adventure time
|
(ԾɷԾ) adventure time
|
||||||
(⁀ᗢ⁀) happy yay
|
(⁀ᗢ⁀) happy yay
|
||||||
(≧◡≦) happy yay
|
(≧◡≦) happy yay
|
||||||
\(º □ º )/ panic
|
\(º □ º )/ panic
|
||||||
|
𓂺 penis
|
||||||
|
𓂸 penis
|
||||||
'';
|
'';
|
||||||
in # ref https://github.com/LukeSmithxyz/voidrice/blob/9fe6802122f6e0392c7fe20eefd30437771d7f8e/.local/bin/dmenuunicode
|
in # ref https://github.com/LukeSmithxyz/voidrice/blob/9fe6802122f6e0392c7fe20eefd30437771d7f8e/.local/bin/dmenuunicode
|
||||||
writers.writeDashBin "unicodmenu" ''
|
writers.writeDashBin "unicodmenu" ''
|
||||||
PATH=${lib.makeBinPath [ coreutils dmenu gnused libnotify xclip xdotool ]}
|
PATH=${lib.makeBinPath [ coreutils dmenu gnused libnotify xclip xdotool ]}
|
||||||
chosen=$(cat ${emoji-file} ${kaomoji-file} | dmenu -i -l 10 | sed "s/ .*//")
|
chosen=$(cat ${unicode-file} ${kaomoji-file} | dmenu -i -l 10 | sed "s/ .*//")
|
||||||
|
|
||||||
[ "$chosen" != "" ] || exit
|
[ "$chosen" != "" ] || exit
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user