{ config, pkgs, lib, inputs, osConfig, ... }: let modifier = if (osConfig.keybinds.modifier == "Meta") then "Mod" else null; kb-layout = builtins.substring 0 2 osConfig.system.locale; in { config = if osConfig.desktop.window-managers.niri.enable then { home.file = { "~/.config/niri/config.kdl" = { target = ".config/niri/config.kdl"; text = '' input { keyboard { xkb { layout "${kb-layout}" } repeat-delay 600 repeat-rate 20 track-layout "global" } touchpad { tap dwt accel-profile "flat" accel-speed 0.0 scroll-method "two-finger" } mouse { accel-speed 0.5 accel-profile "flat" } } output "Samsung Electric Company S24D330 0x5A5A5131" { mode "1920x1080@60" position x=0 y=1440 } output "PNP(AOC) Q27G2WG4 0x00005F45" { mode "2560x1440@143.912" position x=0 y=0 variable-refresh-rate on-demand=true focus-at-startup } binds { //Applications ${modifier}+${osConfig.keybinds.hotkeys.terminal} hotkey-overlay-title="Open Terminal" { spawn "${osConfig.apps.terminal.binary}";} ${modifier}+${osConfig.keybinds.hotkeys.browser} hotkey-overlay-title="Open Browser" { spawn "${osConfig.apps.internet.browsers.default}";} ${modifier}+${osConfig.keybinds.hotkeys.launcher} hotkey-overlay-title="Open Launcher" { spawn "noctalia-shell" "ipc" "call" "launcher" "toggle";} ${modifier}+Shift+${osConfig.keybinds.hotkeys.editor} hotkey-overlay-title="Open Editor" { spawn "${osConfig.apps.development.editor.default}";} //Window Management ${modifier}+Shift+${osConfig.keybinds.hotkeys.close-window} { close-window; } //Column Navigation ${modifier}+H { focus-column-left; } ${modifier}+L { focus-column-right; } ${modifier}+R { switch-preset-column-width; } ${modifier}+Shift+R { switch-preset-column-width-back; } ${modifier}+F { expand-column-to-available-width; } ${modifier}+G { toggle-window-floating; } //Workspace Navigation ${modifier}+J cooldown-ms=150 { focus-workspace-down; } ${modifier}+K cooldown-ms=150 { focus-workspace-up; } //Screenshots Print { screenshot;} } switch-events { lid-close { spawn "noctalia-shell" "ipc" "call" "sessionMenu" "lockAndSuspend"; } } layout { gaps 20 center-focused-column "always" always-center-single-column default-column-width { proportion 0.5; } preset-column-widths { proportion 0.5 proportion 0.66667 proportion 1.0 } border { width 5 } shadow { on } } spawn-at-startup "elephant" spawn-at-startup "noctalia-shell" spawn-at-startup "walker --gapplication-service" gestures { hot-corners { off } } cursor { hide-when-typing hide-after-inactive-ms 2000 } xwayland-satellite { path "xwayland-satellite" } hotkey-overlay { hide-not-bound } window-rule { geometry-corner-radius 20 clip-to-geometry true } prefer-no-csd include "noctalia.kdl" ''; }; }; } else { }; }