mirror of
https://github.com/kmein/niveum
synced 2026-03-20 20:01:08 +01:00
feat(unicodmenu): add emoji flags
This commit is contained in:
@@ -11,7 +11,20 @@
|
|||||||
xclip,
|
xclip,
|
||||||
xdotool,
|
xdotool,
|
||||||
gawk,
|
gawk,
|
||||||
|
fetchFromGitHub,
|
||||||
}: let
|
}: let
|
||||||
|
emoji-flags = builtins.fromJSON (builtins.readFile "${fetchFromGitHub {
|
||||||
|
owner = "matiassingers";
|
||||||
|
repo = "emoji-flags";
|
||||||
|
rev = "93ae74505d09bb55a3eb3a511f1dfc0dd60a5347";
|
||||||
|
sha256 = "10j73sx6jb250v37bz2p7w8big0v8da3r6kpqz9xcl667gl8svwx";
|
||||||
|
}}/data.json");
|
||||||
|
emoji-flags-file = writeText "emoji-flags.txt" (lib.strings.concatMapStringsSep "\n" ({
|
||||||
|
emoji,
|
||||||
|
title,
|
||||||
|
...
|
||||||
|
}: "${emoji} ${title}")
|
||||||
|
emoji-flags);
|
||||||
unicode-file = runCommand "unicode.txt" {} ''
|
unicode-file = runCommand "unicode.txt" {} ''
|
||||||
${
|
${
|
||||||
writers.writePython3 "generate.py" {flakeIgnore = ["E501" "E722"];} ''
|
writers.writePython3 "generate.py" {flakeIgnore = ["E501" "E722"];} ''
|
||||||
@@ -80,7 +93,7 @@ in
|
|||||||
|
|
||||||
all_characters() {
|
all_characters() {
|
||||||
tac "$history_file"
|
tac "$history_file"
|
||||||
cat ${kaomoji-file} ${unicode-file}
|
cat ${kaomoji-file} ${unicode-file} ${emoji-flags-file}
|
||||||
}
|
}
|
||||||
|
|
||||||
chosen=$(all_characters | awk '!seen[$0]++' | dmenu -p unicode -i -l 10 | tee --append "$history_file" | sed "s/ .*//")
|
chosen=$(all_characters | awk '!seen[$0]++' | dmenu -p unicode -i -l 10 | tee --append "$history_file" | sed "s/ .*//")
|
||||||
|
|||||||
Reference in New Issue
Block a user