From 7e9a64023ff11f4ee3041b82025394c0e2e7155b Mon Sep 17 00:00:00 2001 From: uttarayan21 Date: Tue, 2 Dec 2025 11:44:41 +0530 Subject: [PATCH] feat(vicinae): update nixpkgs and adjust keybinding patch for Ctrl+N/P support --- flake.lock | 20 +++++++++++++++++--- flake.nix | 2 +- home/apps/vicinae.nix | 4 ++++ overlays.nix | 1 + patches/vicinae-ctrl-np.patch | 35 +++++++++++++++++++++++++++++++++++ 5 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 patches/vicinae-ctrl-np.patch diff --git a/flake.lock b/flake.lock index a566e7f6..21adc663 100644 --- a/flake.lock +++ b/flake.lock @@ -2947,6 +2947,22 @@ "type": "github" } }, + "nixpkgs_13": { + "locked": { + "lastModified": 1764517877, + "narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2d293cbfa5a793b4c50d17c05ef9e385b90edf6c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 315532800, @@ -4534,9 +4550,7 @@ }, "vicinae": { "inputs": { - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": "nixpkgs_13", "systems": "systems_26" }, "locked": { diff --git a/flake.nix b/flake.nix index 49584e08..350e641d 100644 --- a/flake.nix +++ b/flake.nix @@ -237,7 +237,7 @@ }; vicinae = { url = "github:vicinaehq/vicinae"; - inputs.nixpkgs.follows = "nixpkgs"; + # inputs.nixpkgs.follows = "nixpkgs"; }; }; diff --git a/home/apps/vicinae.nix b/home/apps/vicinae.nix index 9873bccd..4434a787 100644 --- a/home/apps/vicinae.nix +++ b/home/apps/vicinae.nix @@ -1,4 +1,5 @@ { + pkgs, inputs, device, ... @@ -8,5 +9,8 @@ enable = device.is "ryu"; autoStart = true; extensions = []; + # package = pkgs.vicinae.overrideAttrs (old: { + # patches = [../../patches/vicinae-ctrl-np.patch]; + # }); }; } diff --git a/overlays.nix b/overlays.nix index 94678d5f..dd8dddcf 100644 --- a/overlays.nix +++ b/overlays.nix @@ -285,6 +285,7 @@ in inputs.rust-overlay.overlays.default inputs.handoff.overlays.default inputs.headplane.overlays.default + inputs.vicinae.overlays.default jellyfin libfprint misc-applications diff --git a/patches/vicinae-ctrl-np.patch b/patches/vicinae-ctrl-np.patch new file mode 100644 index 00000000..ded4420a --- /dev/null +++ b/patches/vicinae-ctrl-np.patch @@ -0,0 +1,35 @@ +diff --git a/vicinae/src/services/keybinding/keybinding-service.hpp b/vicinae/src/services/keybinding/keybinding-service.hpp +index 61b31590..1df8c548 100644 +--- a/vicinae/src/services/keybinding/keybinding-service.hpp ++++ b/vicinae/src/services/keybinding/keybinding-service.hpp +@@ -22,28 +22,14 @@ public: + KeyBindingMode mode = getMode(keybinding); + + if (!usesOnly(event, Qt::ControlModifier)) { return false; } +- +- switch (mode) { +- case KeyBindingMode::Default: +- return event->key() == Qt::Key_J; +- case KeyBindingMode::Emacs: +- return event->key() == Qt::Key_N; +- } +- return false; ++ return (event->key() == Qt::Key_N); + } + + static bool isUpKey(QKeyEvent *event, const QString &keybinding) { + KeyBindingMode mode = getMode(keybinding); + + if (!usesOnly(event, Qt::ControlModifier)) { return false; } +- +- switch (mode) { +- case KeyBindingMode::Default: +- return event->key() == Qt::Key_K; +- case KeyBindingMode::Emacs: +- return event->key() == Qt::Key_P; +- } +- return false; ++ return (event->key() == Qt::Key_P) + } + + static bool isLeftKey(QKeyEvent *event, const QString &keybinding) {