From 96bf05e6a431f68f785296e398c725c071fe324e Mon Sep 17 00:00:00 2001 From: adikro Date: Wed, 19 Nov 2025 14:56:08 +0100 Subject: more niri configs --- home/wayland/niri/binds.nix | 26 +++++++++++++++++---- home/wayland/niri/niri.nix | 57 ++++++++++++++++++++++++++++++++++++++------- 2 files changed, 70 insertions(+), 13 deletions(-) (limited to 'home/wayland/niri') diff --git a/home/wayland/niri/binds.nix b/home/wayland/niri/binds.nix index 1e3e281..325b60b 100644 --- a/home/wayland/niri/binds.nix +++ b/home/wayland/niri/binds.nix @@ -6,6 +6,10 @@ playerctl = spawn "${pkgs.playerctl}/bin/playerctl"; in { + "Mod+O" = { + action = toggle-overview; + repeat = false; + }; "Mod+Slash".action = show-hotkey-overlay; XF86AudioRaiseVolume.action = set-volume "2%+"; XF86AudioLowerVolume.action = set-volume "2%-"; @@ -23,29 +27,41 @@ "Mod+Shift+Equal".action = set-window-height "+10%"; # "Mod+Shift+V".action = switch-focus-between-floating-and-tiling; "Mod+Shift+P".action = power-off-monitors; + "Mod+W".action = toggle-column-tabbed-display; + # --- System / General --- "Mod+Return".action = spawn "foot"; "Mod+D".action = spawn "fuzzel"; + "Mod+BracketLeft".action = consume-or-expel-window-left; + "Mod+BracketRight".action = consume-or-expel-window-right; + + "Mod+R".action = switch-preset-column-width; + "Mod+Shift+R".action = reset-window-height; + "Mod+F".action = maximize-column; + "Mod+Shift+F".action = fullscreen-window; + "Mod+C".action = center-column; + "Mod+Comma".action = consume-window-into-column; + "Mod+Period".action = expel-window-from-column; # The 'quit' action without arguments performs the action with confirmation. "Mod+Shift+E".action = quit; # --- Window Navigation (Focus) --- "Mod+H".action = focus-column-left; "Mod+L".action = focus-column-right; - "Mod+J".action = focus-window-down; - "Mod+K".action = focus-window-up; + "Mod+J".action = focus-workspace-down; + "Mod+K".action = focus-workspace-up; # --- Window Management (Move) --- "Mod+Shift+H".action = move-column-left; "Mod+Shift+L".action = move-column-right; - "Mod+Shift+J".action = move-window-down; - "Mod+Shift+K".action = move-window-up; + "Mod+Shift+J".action = move-window-down-or-to-workspace-down; + "Mod+Shift+K".action = move-window-up-or-to-workspace-up; # --- Window State --- "Mod+Shift+Q".action = close-window; - "Mod+F".action = maximize-column; + # "Mod+F".action = maximize-column; # "Mod+V".action = toggle-window-floating; # Renamed from toggle-floating to match docs}; "Mod+1".action = focus-workspace 1; diff --git a/home/wayland/niri/niri.nix b/home/wayland/niri/niri.nix index 0391699..39143e4 100644 --- a/home/wayland/niri/niri.nix +++ b/home/wayland/niri/niri.nix @@ -1,34 +1,75 @@ -{ ... }: +{ lib, pkgs, ... }: { imports = [ ./binds.nix ]; programs.niri.settings = { prefer-no-csd = true; - layout.shadow.enable = true; input = { mouse = { accel-profile = "flat"; - accel-speed = -0.5; + accel-speed = -0.6; middle-emulation = true; + scroll-factor = 1.3; }; focus-follows-mouse = { enable = true; - max-scroll-amount = "0%"; + max-scroll-amount = "15%"; }; mod-key = "Alt"; - keyboard.xkb.layout = "pl"; + keyboard = { + xkb.layout = "pl"; + repeat-delay = 500; + repeat-rate = 50; + }; + power-key-handling.enable = false; }; outputs = { "DP-1" = { + focus-at-startup = true; + # backdrop-color = ""; + variable-refresh-rate = "on-demand"; mode = { width = 2560; height = 1440; - - refresh = null; + refresh = 239.998; }; - scale = 1.0; }; }; + cursor = { + hide-when-typing = true; + hide-after-inactive-ms = 10000; + size = 14; + # theme = ""; + }; + layout = { + border = { + width = 2; + # active = ; + }; + focus-ring = { + width = 2; + # active = ; + }; + preset-column-widths = [ + { proportion = 1. / 3.; } + { proportion = 1. / 2.; } + { proportion = 2. / 3.; } + ]; + preset-window-heights = [ + { proportion = 1. / 3.; } + { proportion = 1. / 2.; } + { proportion = 2. / 3.; } + ]; + default-column-width.proportion = 0.5; + tab-indicator = { + gaps-between-tabs = 3; + position = "top"; + }; + empty-workspace-above-first = true; + }; + spawn-at-startup = [ + { command = [ "${lib.getExe pkgs.xwayland-satellite}" ]; } + ]; }; } -- cgit v1.3