about summary refs log tree commit diff stats
path: root/pkgs/by-name/at/atuin-dvorak
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/at/atuin-dvorak')
-rw-r--r--pkgs/by-name/at/atuin-dvorak/package.nix23
-rw-r--r--pkgs/by-name/at/atuin-dvorak/set-dvorak-keybindings.patch37
2 files changed, 60 insertions, 0 deletions
diff --git a/pkgs/by-name/at/atuin-dvorak/package.nix b/pkgs/by-name/at/atuin-dvorak/package.nix
new file mode 100644
index 00000000..c651eb75
--- /dev/null
+++ b/pkgs/by-name/at/atuin-dvorak/package.nix
@@ -0,0 +1,23 @@
+{atuin}:
+atuin.overrideAttrs (finalAttrs: previousAttrs: {
+  pname = previousAttrs.pname + "-dvorak";
+  patches =
+    previousAttrs.patches
+    ++ [
+      ./set-dvorak-keybindings.patch
+    ];
+
+  # atuin's default features include 'check-updates', which do not make sense
+  # for distribution builds. List all other default features.
+  buildNoDefaultFeatures = true;
+  buildFeatures = [
+    "client"
+    # "sync"
+    # "server"
+    "clipboard"
+    # "daemon"
+  ];
+
+  # The checks don't compile without the `server` feature
+  doCheck = false;
+})
diff --git a/pkgs/by-name/at/atuin-dvorak/set-dvorak-keybindings.patch b/pkgs/by-name/at/atuin-dvorak/set-dvorak-keybindings.patch
new file mode 100644
index 00000000..9ab3700a
--- /dev/null
+++ b/pkgs/by-name/at/atuin-dvorak/set-dvorak-keybindings.patch
@@ -0,0 +1,37 @@
+From f763aef8094c12293570119d9ff0922356dd8c79 Mon Sep 17 00:00:00 2001
+From: Benedikt Peetz <benedikt.peetz@b-peetz.de>
+Date: Fri, 18 Oct 2024 23:03:01 +0200
+Subject: [PATCH] fix(client): Change the keymaps to support dvorka vim keys
+
+---
+ crates/atuin/src/command/client/search/interactive.rs | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/crates/atuin/src/command/client/search/interactive.rs b/crates/atuin/src/command/client/search/interactive.rs
+index c87fff1c..19e965fe 100644
+--- a/crates/atuin/src/command/client/search/interactive.rs
++++ b/crates/atuin/src/command/client/search/interactive.rs
+@@ -322,17 +322,17 @@ impl State {
+                     self.keymap_mode = KeymapMode::VimInsert;
+                     return InputAction::Continue;
+                 }
+-                KeyCode::Char('j') if !ctrl => {
++                KeyCode::Char('t') if !ctrl => {
+                     return self.handle_search_down(settings, true);
+                 }
+-                KeyCode::Char('k') if !ctrl => {
++                KeyCode::Char('n') if !ctrl => {
+                     return self.handle_search_up(settings, true);
+                 }
+                 KeyCode::Char('h') if !ctrl => {
+                     self.search.input.left();
+                     return InputAction::Continue;
+                 }
+-                KeyCode::Char('l') if !ctrl => {
++                KeyCode::Char('s') if !ctrl => {
+                     self.search.input.right();
+                     return InputAction::Continue;
+                 }
+-- 
+2.46.0
+