From 3a88f3e7fdd9aa41e44f4407d21679b9116155d5 Mon Sep 17 00:00:00 2001 From: Natasha Moongrave Date: Tue, 3 Feb 2026 18:51:30 +0100 Subject: added default keybinds for i3 and i3 stuff --- modules/home/i3wm/nord-blue/i3.nix | 50 ++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 5 deletions(-) (limited to 'modules/home/i3wm/nord-blue/i3.nix') diff --git a/modules/home/i3wm/nord-blue/i3.nix b/modules/home/i3wm/nord-blue/i3.nix index 609ac42..e3a3e17 100644 --- a/modules/home/i3wm/nord-blue/i3.nix +++ b/modules/home/i3wm/nord-blue/i3.nix @@ -10,12 +10,52 @@ in programs = { i3 = { enable = true; - config.bars = []; - + config = { + modifier = "Mod4"; + + keybindings = lib.mkOptionDefault { + "${mod}+Enter" = "exec ${pkgs.alacritty}/bin/alacritty"; # Lanuch alacritty as a terminal + "${mod}+m" = "exec ${pkgs.dmenu}/bin/dmenu"; # Launch dmenu (app launcher) + "${mod}+q" = "kill"; # Close an app (kill the process) + "${mod}+Alt+l" = "exec sh -c '${pkgs.lock-screen}/bin/lock-screen' ${wallpaper}"; + + + # === FOCUS === # + + # Vim bindings + "${mod}+h" = "focus left"; + "${mod}+j" = "focus down"; + "${mod}+k" = "focus up"; + "${mod}+l" = "focus right"; + + # Arrow keys + "${mod}+Left" = "focus left"; + "${mod}+Down" = "focus down"; + "${mod}+Up" = "focus up"; + "${mod}+Right" = "focus right"; + + # === MOVE === # + + # Vim bindings + "${mod}+Shift+h" = "move left"; + "${mod}+Shift+j" = "move down"; + "${mod}+Shift+k" = "move up"; + "${mod}+Shift+l" = "move right"; + + # Arrow keys + "${mod}+Shift+Left" = "focus left"; + "${mod}+Shift+Down" = "focus down"; + "${mod}+Shift+Up" = "focus up"; + "${mod}+Shift+Right" = "focus right"; + }; + }; + extraPackages = with pkgs; [ - dmenu - i3-lock - polybar + dmenu # App launcher + i3-lock # Lock screen + imagemagick # Handle wallpaper resizing for i3-lock + polybar # Status bar + alacritty # Terminal Emulator ]; } } -- cgit v1.2.3