diff --git a/nixcfgs/modules/nixos/desktop/xremap.nix b/nixcfgs/modules/nixos/desktop/xremap.nix index 81d4800..9774a7f 100644 --- a/nixcfgs/modules/nixos/desktop/xremap.nix +++ b/nixcfgs/modules/nixos/desktop/xremap.nix @@ -1,4 +1,24 @@ -{...}: { +{...}: let + _nuphyAir75V2Inputs = [ + "usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-event-kbd" + "usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-hidraw" + "usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-if01-event-kbd" + "usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-if01-event-mouse" + "usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-if01-hidraw" + "usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-if01-mouse" + "usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-if02-hidraw" + "usb-NuPhy_NuPhy_Air75_V2-event-if01" + "usb-NuPhy_NuPhy_Air75_V2-event-kbd" + "usb-NuPhy_NuPhy_Air75_V2-hidraw" + "usb-NuPhy_NuPhy_Air75_V2-if01-event-joystick" + "usb-NuPhy_NuPhy_Air75_V2-if01-event-kbd" + "usb-NuPhy_NuPhy_Air75_V2-if01-event-mouse" + "usb-NuPhy_NuPhy_Air75_V2-if01-hidraw" + "usb-NuPhy_NuPhy_Air75_V2-if01-mouse" + "usb-NuPhy_NuPhy_Air75_V2-if02-hidraw" + ]; + nuphyAir75V2Inputs = map (name: "/dev/input/by-id/" + name) _nuphyAir75V2Inputs; +in { imports = [ ../hardware/uinput.nix ]; @@ -12,7 +32,7 @@ services.xremap = { enable = true; - withHypr = true; + withGnome = true; # modmap: single key serviceMode = "user"; userName = "js0ny"; @@ -21,13 +41,7 @@ { name = "Global"; device = { - not = [ - ### QMK Keyboards - # Nuphy Air 75 V2 - "/dev/input/by-id/usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-if01-event-kbd" - "/dev/input/by-id/usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-event-kbd" - "/dev/input/by-id/usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-if01-event-mouse" - ]; + not = nuphyAir75V2Inputs; }; remap = { "KEY_CAPSLOCK" = { @@ -37,29 +51,36 @@ }; }; } + { + # Mouse Key code: + # * BTN_EXTRA -> Forward button + # * BTN_SIDE -> Back button + name = "Mouse"; + device = { + not = nuphyAir75V2Inputs; + }; + remap = { + "BTN_EXTRA" = "KEY_ENTER"; + }; + } ]; keymap = [ - # { - # name = "IM Navigator - Alt-Up/Down"; - # application = { - # only = [ - # "org.telegram.desktop" - # "telegram-desktop" - # "io.github.kukuruzka165.materialgram" - # "materialgram" - # "com.ayugram.desktop" - # "wechat" - # ]; - # }; - # remap = { - # "M-j" = "M-down"; - # "M-k" = "M-up"; - # }; - # } + { + name = "IM Navigator - Alt-Up/Down"; + application = { + only = [ + "wechat" + ]; + }; + remap = { + "M-j" = "M-down"; + "M-k" = "M-up"; + }; + } { name = "IM Navigator - Ctrl-Up/Down"; application = { - only = ["qq"]; + only = ["QQ"]; }; remap = { "M-j" = "C-down"; @@ -69,7 +90,7 @@ { name = "Zotero PDF Navigator"; application = { - only = ["zotero"]; + only = ["Zotero"]; }; remap = { "M-j" = "KEY_PAGEDOWN"; diff --git a/nixcfgs/users/js0ny/packages/gui.nix b/nixcfgs/users/js0ny/packages/gui.nix index c3c65f7..0e69438 100644 --- a/nixcfgs/users/js0ny/packages/gui.nix +++ b/nixcfgs/users/js0ny/packages/gui.nix @@ -4,7 +4,6 @@ config, ... }: let - # FIXME: This will block the desktop files mkFcitxIM = builtins.map ( p: lib.hiPrio ( @@ -138,12 +137,6 @@ in { NIXOS_OZONE_WL = 1; }; - # TODO: This is a dependency of `feishin` (EOL) - # Once the new version is published, delete this - nixpkgs.config.permittedInsecurePackages = [ - "electron-36.9.5" - ]; - # TODO: This is a workaround since upstram did not implement p.name for ticktick # xdg.desktopEntries."ticktick" = { # name = "TickTick"; diff --git a/nixcfgs/users/js0ny/programs/mime.nix b/nixcfgs/users/js0ny/programs/mime.nix index 3aa44f6..3caf04b 100644 --- a/nixcfgs/users/js0ny/programs/mime.nix +++ b/nixcfgs/users/js0ny/programs/mime.nix @@ -14,6 +14,7 @@ "text/x-patch" # .patch .diff "text/x-devicetree-source" # .dts "text/x-nix" # .nix (custom defined below) + "text/x-pdx-descriptor" # .mod (custom defined below) ] ++ [ "text/csv" @@ -114,5 +115,21 @@ in { ''; + # Mod descriptor file for Paradox games + "mime/packages/pdx-mod-descriptor.xml".text = '' + + + + Paradox Mod Descriptor + + + + + + + + + + ''; }; } diff --git a/nixcfgs/users/js0ny/zephyrus.nix b/nixcfgs/users/js0ny/zephyrus.nix index 20e4a92..342e1a3 100644 --- a/nixcfgs/users/js0ny/zephyrus.nix +++ b/nixcfgs/users/js0ny/zephyrus.nix @@ -142,6 +142,7 @@ in { "file:///home/${username}/Atelier Atelier" "file:///home/${username}/Downloads Downloads" ]; + xdg.configFile."gtk-3.0/bookmarks".force = true; xdg.terminal-exec = { enable = true;