diff options
| author | Natasha Moongrave <natasha@256phi.eu> | 2026-02-03 18:51:30 +0100 |
|---|---|---|
| committer | Natasha Moongrave <natasha@256phi.eu> | 2026-02-03 18:51:30 +0100 |
| commit | 3a88f3e7fdd9aa41e44f4407d21679b9116155d5 (patch) | |
| tree | 7497d7afe87e2a6d637a40ff754c64419b1762a7 /modules/home | |
| parent | 19f5b3cdca2630e343e525f26dfe36a31460e6d0 (diff) | |
added default keybinds for i3 and i3 stuff
Diffstat (limited to 'modules/home')
| -rw-r--r-- | modules/home/i3wm/nord-blue/alacritty.nix | 7 | ||||
| -rw-r--r-- | modules/home/i3wm/nord-blue/default.nix | 1 | ||||
| -rw-r--r-- | modules/home/i3wm/nord-blue/i3.nix | 50 | ||||
| -rw-r--r-- | modules/home/i3wm/nord-blue/scripts.nix | 24 | ||||
| -rw-r--r-- | modules/home/i3wm/nord-blue/variables.nix | 3 | ||||
| -rw-r--r-- | modules/home/i3wm/nord-blue/wallpapers/wave-minimal.png | bin | 0 -> 352335 bytes |
6 files changed, 79 insertions, 6 deletions
diff --git a/modules/home/i3wm/nord-blue/alacritty.nix b/modules/home/i3wm/nord-blue/alacritty.nix new file mode 100644 index 0000000..beccbd9 --- /dev/null +++ b/modules/home/i3wm/nord-blue/alacritty.nix @@ -0,0 +1,7 @@ +{ lib, pkgs, ... }: + +{ + programs.alacritty = { + enable = true; + } +}
\ No newline at end of file diff --git a/modules/home/i3wm/nord-blue/default.nix b/modules/home/i3wm/nord-blue/default.nix index a26c37a..2ef727a 100644 --- a/modules/home/i3wm/nord-blue/default.nix +++ b/modules/home/i3wm/nord-blue/default.nix @@ -2,6 +2,7 @@ { imports = [ + ./alacritty.nix ./i3.nix ]; }
\ No newline at end of file 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 ]; } } diff --git a/modules/home/i3wm/nord-blue/scripts.nix b/modules/home/i3wm/nord-blue/scripts.nix new file mode 100644 index 0000000..7dbfd19 --- /dev/null +++ b/modules/home/i3wm/nord-blue/scripts.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: + +{ + (pkgs.writeShellScriptBin "lock-screen" '' + #!/usr/bin/env sh + set -eu + + WALL="${1:-$HOME/Pictures/wallpaper.jpg}" + TMP="/tmp/lockscreen.png" + + # Get current resolution (single-monitor friendly) + RES=$(xrandr | awk '/\*/ {print $1; exit}') + + # Scale like feh --bg-fill + convert "$WALL" \ + -resize "${RES}^" \ + -gravity center \ + -extent "$RES" \ + "$TMP" + + i3lock -i "$TMP" + + '') +}
\ No newline at end of file diff --git a/modules/home/i3wm/nord-blue/variables.nix b/modules/home/i3wm/nord-blue/variables.nix index cdd0719..0a5d027 100644 --- a/modules/home/i3wm/nord-blue/variables.nix +++ b/modules/home/i3wm/nord-blue/variables.nix @@ -6,6 +6,7 @@ }; wallpaper = { - wave = import ./wallpapers/wave.jpeg + wave = import ./wallpapers/wave-minimal.jpeg + # Add other wallpapers eventually } }
\ No newline at end of file diff --git a/modules/home/i3wm/nord-blue/wallpapers/wave-minimal.png b/modules/home/i3wm/nord-blue/wallpapers/wave-minimal.png Binary files differnew file mode 100644 index 0000000..5d322d4 --- /dev/null +++ b/modules/home/i3wm/nord-blue/wallpapers/wave-minimal.png |
