diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2024-08-14 00:45:04 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2024-08-14 00:45:04 +0200 |
commit | 728e65ca55b4d952bb7b6ea503b210d87f18bb97 (patch) | |
tree | 642a892518ac8bb7b38f19724ab525b773d466b0 /accounts | |
parent | cf5bc09e33d811dbd8b8798b4311054aaa5fa3d4 (diff) | |
download | nixos-728e65ca55b4d952bb7b6ea503b210d87f18bb97.tar nixos-728e65ca55b4d952bb7b6ea503b210d87f18bb97.tar.gz nixos-728e65ca55b4d952bb7b6ea503b210d87f18bb97.tar.bz2 nixos-728e65ca55b4d952bb7b6ea503b210d87f18bb97.tar.xz nixos-728e65ca55b4d952bb7b6ea503b210d87f18bb97.zip |
...
Diffstat (limited to 'accounts')
-rw-r--r-- | accounts/gkleen@sif/default.nix | 52 | ||||
-rw-r--r-- | accounts/gkleen@sif/hyprland.nix | 9 |
2 files changed, 60 insertions, 1 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 2c6d747d..0fe68a55 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix | |||
@@ -971,6 +971,58 @@ in { | |||
971 | }; | 971 | }; |
972 | "dbus-1/services/org.keepassxc.KeePassXC.service".source = "${wrappedKeepassxc}/share/dbus-1/services/org.keepassxc.KeePassXC.service"; | 972 | "dbus-1/services/org.keepassxc.KeePassXC.service".source = "${wrappedKeepassxc}/share/dbus-1/services/org.keepassxc.KeePassXC.service"; |
973 | "dbus-1/services/org.freedesktop.secrets.service.service".source = "${wrappedKeepassxc}/share/dbus-1/services/org.freedesktop.secrets.service.service"; | 973 | "dbus-1/services/org.freedesktop.secrets.service.service".source = "${wrappedKeepassxc}/share/dbus-1/services/org.freedesktop.secrets.service.service"; |
974 | "emoji-data/list.txt".source = pkgs.stdenv.mkDerivation { | ||
975 | inherit (sources.emoji-data) pname src; | ||
976 | version = lib.removePrefix "v" sources.emoji-data.version; | ||
977 | buildInputs = with pkgs; [ jq (ruby.withPackages (ps: with ps; [ nokogiri rspec racc rubocop rubocop-performance rspec-core rspec-expectations rspec-mocks diff-lcs parallel parser rainbow regexp_parser rubocop-ast ruby-progressbar unicode-display_width rspec-support optimist ast ])) ]; | ||
978 | LC_ALL = "C.UTF-8"; | ||
979 | patches = [ | ||
980 | (pkgs.writeText "nix.patch" '' | ||
981 | diff --git a/Makefile b/Makefile | ||
982 | index 896cb50..c7b6db8 100644 | ||
983 | --- a/Makefile | ||
984 | +++ b/Makefile | ||
985 | @@ -21,10 +21,10 @@ data: | ||
986 | cldr: | ||
987 | @[ ! -d cldr/.git ] && git submodule update --init cldr | ||
988 | |||
989 | -data/all.json: compile.rb $(wildcard lib/*.rb) $(INPUT_FILES) | cldr data check-ruby gems | ||
990 | +data/all.json: compile.rb $(wildcard lib/*.rb) $(INPUT_FILES) | data | ||
991 | @ruby compile.rb > "$@" | ||
992 | |||
993 | -data/%.txt: views/%.txt.jq data/all.json | data check-jq | ||
994 | +data/%.txt: views/%.txt.jq data/all.json | data | ||
995 | @jq -r -f "$<" < data/all.json > "$@" | ||
996 | |||
997 | data/%.json: views/%.json.jq data/all.json | data check-jq | ||
998 | '') | ||
999 | ]; | ||
1000 | postPatch = '' | ||
1001 | cp ${pkgs.writeText "list.txt.jq" '' | ||
1002 | .categories[] | | ||
1003 | |||
1004 | # Collect category + subcategory combos | ||
1005 | .name as $cat | | ||
1006 | reduce .subcategories[] as $sub ( | ||
1007 | []; | ||
1008 | # Build an array of all emojis in this subcategory | ||
1009 | . + ( | ||
1010 | $sub.emojis | map( | ||
1011 | # emoji: name (keyword, keyword, keyword) | ||
1012 | "\(.characters): \(.name // .tts_descriptions.en // "") (\(.keywords.en // [] | join(", ")))" | ||
1013 | ) | ||
1014 | ) | ||
1015 | ) | | ||
1016 | |||
1017 | # Merge into a single string | ||
1018 | join("\n") | ||
1019 | ''} views/list.txt.jq | ||
1020 | ''; | ||
1021 | buildFlagsArray = ["data/list.txt"]; | ||
1022 | installPhase = '' | ||
1023 | cp data/list.txt $out | ||
1024 | ''; | ||
1025 | }; | ||
974 | }; | 1026 | }; |
975 | 1027 | ||
976 | xdg.mimeApps = { | 1028 | xdg.mimeApps = { |
diff --git a/accounts/gkleen@sif/hyprland.nix b/accounts/gkleen@sif/hyprland.nix index d26b72a7..e2106369 100644 --- a/accounts/gkleen@sif/hyprland.nix +++ b/accounts/gkleen@sif/hyprland.nix | |||
@@ -219,7 +219,7 @@ in { | |||
219 | makeWrapper ${lib.getExe pkgs.hyprpicker} $out \ | 219 | makeWrapper ${lib.getExe pkgs.hyprpicker} $out \ |
220 | --prefix PATH : ${lib.makeBinPath [pkgs.wl-clipboard-rs]} | 220 | --prefix PATH : ${lib.makeBinPath [pkgs.wl-clipboard-rs]} |
221 | ''} -a" | 221 | ''} -a" |
222 | "$mainMod, E, exec, ${pkgs.writeShellScript "qalc-fuzzel" '' | 222 | "$mainMod, T, exec, ${pkgs.writeShellScript "qalc-fuzzel" '' |
223 | export PATH="${lib.makeBinPath (with pkgs; [ wl-clipboard-rs libqalculate cfg.programs.fuzzel.package coreutils findutils libnotify gnugrep ])}:$PATH" | 223 | export PATH="${lib.makeBinPath (with pkgs; [ wl-clipboard-rs libqalculate cfg.programs.fuzzel.package coreutils findutils libnotify gnugrep ])}:$PATH" |
224 | 224 | ||
225 | RESULTS_DIR="$HOME/.cache/qalc-fuzzel" | 225 | RESULTS_DIR="$HOME/.cache/qalc-fuzzel" |
@@ -252,6 +252,13 @@ in { | |||
252 | [[ $QALC_RET -eq 0 ]] && wl-copy "$QALC_RES" | 252 | [[ $QALC_RET -eq 0 ]] && wl-copy "$QALC_RES" |
253 | notify-send "$QALC_RES" | 253 | notify-send "$QALC_RES" |
254 | ''}" | 254 | ''}" |
255 | "$mainMod, E, exec, ${pkgs.writeShellScript "emoji-fuzzel" '' | ||
256 | export PATH="${lib.makeBinPath (with pkgs; [ cfg.programs.fuzzel.package wtype wl-clipboard-rs ])}:$PATH" | ||
257 | |||
258 | FUZZEL_RES=$(fuzzel --dmenu --prompt "emoji> " <$HOME/.local/share/emoji-data/list.txt) || exit $? | ||
259 | [[ -n "$FUZZEL_RES" ]] || exit 1 | ||
260 | wl-copy "$(cut -d ':' -f 1 <<<"$FUZZEL_RES" | tr -d '\n')" && wtype -k XF86Paste | ||
261 | ''}" | ||
255 | 262 | ||
256 | "$mainMod CTRL, return, togglespecialworkspace, term" | 263 | "$mainMod CTRL, return, togglespecialworkspace, term" |
257 | "$mainMod CTRL, e, togglespecialworkspace, edit" | 264 | "$mainMod CTRL, e, togglespecialworkspace, edit" |