diff --git a/nixcfgs/hosts/zephyrus/default.nix b/nixcfgs/hosts/zephyrus/default.nix index f7f7114..da7753c 100644 --- a/nixcfgs/hosts/zephyrus/default.nix +++ b/nixcfgs/hosts/zephyrus/default.nix @@ -35,6 +35,7 @@ ../../modules/nixos/programs/thunderbird.nix ../../modules/nixos/programs/waydroid.nix ../../modules/nixos/programs/wine.nix + ../../modules/nixos/programs/dolphin.nix # services ../../modules/nixos/services/docker.nix diff --git a/nixcfgs/hosts/zephyrus/keyd.nix b/nixcfgs/hosts/zephyrus/keyd.nix index 28d2ba2..e592637 100644 --- a/nixcfgs/hosts/zephyrus/keyd.nix +++ b/nixcfgs/hosts/zephyrus/keyd.nix @@ -16,4 +16,11 @@ }; }; }; + # See https://github.com/rvaiya/keyd?tab=readme-ov-file#faqs + environment.etc."libinput/local-overrides.quirks".text = '' + [Serial Keyboards] + MatchUdevType=keyboard + MatchName=keyd*keyboard + AttrKeyboardIntegration=internal + ''; } diff --git a/nixcfgs/users/js0ny/packages/gui.nix b/nixcfgs/users/js0ny/packages/gui.nix index 52380f9..6f763f7 100644 --- a/nixcfgs/users/js0ny/packages/gui.nix +++ b/nixcfgs/users/js0ny/packages/gui.nix @@ -1,4 +1,8 @@ -{pkgs, ...}: { +{ + pkgs, + lib, + ... +}: { home.packages = with pkgs; [ # Terminal Emulator ghostty # default @@ -57,6 +61,7 @@ kdePackages.krdc kdePackages.breeze zotero + anki-bin # Email protonmail-bridge @@ -64,35 +69,42 @@ birdtray ]; - services.protonmail-bridge.enable = true; + home.sessionVariables = { + ANKI_WAYLAND = 1; + GOLDENDICT_FORCE_WAYLAND = 1; + NIXOS_OZONE_WL = 1; + }; xdg.desktopEntries = { - # Force wayland when running goldendict-ng - "io.github.xiaoyifang.goldendict_ng" = { - name = "GoldenDict-ng"; - genericName = "Multiformat Dictionary"; - comment = "A feature-rich dictionary lookup program"; - icon = "goldendict"; + "anki" = { + name = "Anki"; + genericName = "Flashcards"; + comment = "An intelligent spaced-repetition memory training program"; + icon = "anki"; type = "Application"; terminal = false; categories = [ - "Office" - "Dictionary" "Education" + "Languages" + "KDE" "Qt" ]; mimeType = [ - "x-scheme-handler/goldendict" - "x-scheme-handler/dict" + "application/x-apkg" + "application/x-anki" + "application/x-ankiaddon" ]; - exec = "env GOLDENDICT_FORCE_WAYLAND=1 ${pkgs.goldendict-ng}/bin/goldendict %u"; + # Should specify wayland and IME used + exec = "env ANKI_WAYLAND=1 QT_IM_MODULE=fcitx anki %f"; settings = { - "GenericName[zh_CN]" = "多格式字典"; - "Comment[zh_CN]" = "多功能字典查询软件"; - "Keywords" = "dict;dictionary"; - "Keywords[zh_CN]" = "dict;dictionary;字典;"; - "StartupWMClass" = "GoldenDict-ng"; + "TryExec" = "anki"; + "Version" = "1.0"; + "X-GNOME-SingleWindow" = "true"; + "SingleMainWindow" = "true"; + "StartupWMClass" = "anki"; }; }; }; + + services.protonmail-bridge.enable = true; }