diff --git a/dot_config/niri/cfg/animation.kdl b/dot_config/niri/cfg/animation.kdl new file mode 100644 index 0000000..4c9a913 --- /dev/null +++ b/dot_config/niri/cfg/animation.kdl @@ -0,0 +1,32 @@ + animations { + workspace-switch { + spring damping-ratio=1.0 stiffness=1000 epsilon=0.0001 + } + window-open { + duration-ms 200 + curve "ease-out-quad" + } + window-close { + duration-ms 200 + curve "ease-out-cubic" + } + horizontal-view-movement { + spring damping-ratio=1.0 stiffness=900 epsilon=0.0001 + } + window-movement { + spring damping-ratio=1.0 stiffness=800 epsilon=0.0001 + } + window-resize { + spring damping-ratio=1.0 stiffness=1000 epsilon=0.0001 + } + config-notification-open-close { + spring damping-ratio=0.6 stiffness=1200 epsilon=0.001 + } + screenshot-ui-open { + duration-ms 300 + curve "ease-out-quad" + } + overview-open-close { + spring damping-ratio=1.0 stiffness=900 epsilon=0.0001 + } + } diff --git a/dot_config/niri/cfg/autostart.kdl b/dot_config/niri/cfg/autostart.kdl new file mode 100644 index 0000000..f6f0187 --- /dev/null +++ b/dot_config/niri/cfg/autostart.kdl @@ -0,0 +1,4 @@ +// ────────────── Startup Applications ────────────── +// https://github.com/YaLTeR/niri/wiki/Configuration:-Miscellaneous#spawn-sh-at-startup + + spawn-sh-at-startup "qs -c noctalia-shell" diff --git a/dot_config/niri/cfg/display.kdl b/dot_config/niri/cfg/display.kdl new file mode 100644 index 0000000..eb4b40d --- /dev/null +++ b/dot_config/niri/cfg/display.kdl @@ -0,0 +1,13 @@ +// Mi +output "DP-3" { + mode "2560x1440@240.001" + position x=0 y=0 + scale 1.1 +} + +// Benq +output "DP-2" { + mode "1920x1080@144.001" + position x=2328 y=0 + scale 1.0 +} diff --git a/dot_config/niri/cfg/input.kdl b/dot_config/niri/cfg/input.kdl new file mode 100644 index 0000000..358bb68 --- /dev/null +++ b/dot_config/niri/cfg/input.kdl @@ -0,0 +1,19 @@ +input { + keyboard { + xkb { + layout "us,ru" + options "grp:alt_shift_toggle" + } + repeat-delay 250 + repeat-rate 50 + } + + mouse { + accel-profile "flat" + accel-speed 0.0 + } + + focus-follows-mouse max-scroll-amount="0%" + workspace-auto-back-and-forth +} + diff --git a/dot_config/niri/cfg/keybinds.kdl b/dot_config/niri/cfg/keybinds.kdl new file mode 100644 index 0000000..b1b7abe --- /dev/null +++ b/dot_config/niri/cfg/keybinds.kdl @@ -0,0 +1,101 @@ +binds { + // ─── Applications ─── + Mod+Comma hotkey-overlay-title="Noctalia Settings" { spawn-sh "qs -c noctalia-shell ipc call settings toggle"; } + Mod+Slash hotkey-overlay-title="Noctalia Cheatsheet" { spawn-sh "qs -c noctalia-shell ipc call plugin:keybind-cheatsheet toggle"; } + Mod+Return hotkey-overlay-title="Open Terminal: kitty" { spawn "kitty"; } + Mod+R hotkey-overlay-title="Open App Launcher: noctalia launcher" { spawn-sh "qs -c noctalia-shell ipc call launcher toggle"; } + Mod+B hotkey-overlay-title="Open Browser: Librewolf" { spawn "librewolf"; } + Mod+Shift+E hotkey-overlay-title="Session Menu: noctalia sessionMenu" { spawn-sh "qs -c noctalia-shell ipc call sessionMenu toggle"; } + Mod+E hotkey-overlay-title="File Manager: Dolphin" { spawn "dolphin"; } + + // ─── Media Controls ─── + XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume increase"; } + XF86AudioLowerVolume allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume decrease"; } + XF86AudioMute allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume muteOutput"; } + XF86AudioMicMute allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume muteInput"; } + XF86AudioNext allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media next"; } + XF86AudioPrev allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media previous"; } + XF86AudioPlay allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media playPause"; } + XF86AudioPause allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media playPause"; } + + // ─── Brightness Controls ─── + XF86MonBrightnessUp allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call brightness increase"; } + XF86MonBrightnessDown allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call brightness decrease"; } + + // ─── Window Movement and Focus ─── + Mod+Shift+Q { close-window; } + + Mod+Home { focus-column-first; } + Mod+End { focus-column-last; } + Mod+H { focus-column-left; } + Mod+WheelScrollUp { focus-column-left; } + Mod+L { focus-column-right; } + Mod+WheelScrollDown { focus-column-right; } + Mod+K { focus-workspace-up; } + Mod+CTRL+WheelScrollUp cooldown-ms=150 { focus-workspace-up; } + Mod+J { focus-workspace-down; } + Mod+CTRL+WheelScrollDown cooldown-ms=150 { focus-workspace-down; } + + Mod+CTRL+H { focus-monitor-left; } + Mod+CTRL+L { focus-monitor-right; } + + Mod+Shift+K { move-window-up; } + Mod+Shift+J { move-window-down; } + Mod+Shift+H { move-column-left; } + Mod+Shift+L { move-column-right; } + + Mod+Shift+CTRL+K { move-column-to-workspace-up; } + Mod+Shift+CTRL+J { move-column-to-workspace-down; } + Mod+Shift+CTRL+H { move-column-to-monitor-left; } + Mod+Shift+CTRL+L { move-column-to-monitor-right; } + + // ─── Workspace Switching ─── + Mod+1 { focus-workspace 1; } + Mod+2 { focus-workspace 2; } + Mod+3 { focus-workspace 3; } + Mod+4 { focus-workspace 4; } + Mod+5 { focus-workspace 5; } + Mod+6 { focus-workspace 6; } + Mod+7 { focus-workspace 7; } + Mod+8 { focus-workspace 8; } + Mod+9 { focus-workspace 9; } + + Mod+Shift+1 { move-column-to-workspace 1; } + Mod+Shift+2 { move-column-to-workspace 2; } + Mod+Shift+3 { move-column-to-workspace 3; } + Mod+Shift+4 { move-column-to-workspace 4; } + Mod+Shift+5 { move-column-to-workspace 5; } + Mod+Shift+6 { move-column-to-workspace 6; } + Mod+Shift+7 { move-column-to-workspace 7; } + Mod+Shift+8 { move-column-to-workspace 8; } + Mod+Shift+9 { move-column-to-workspace 9; } + + Mod+TAB { focus-workspace-previous; } + + // ─── Layout Controls ─── + Mod+CTRL+F { expand-column-to-available-width; } + Mod+C { center-column; } + Mod+CTRL+C { center-visible-columns; } + Mod+Minus { set-column-width "-10%"; } + Mod+Equal { set-column-width "+10%"; } + Mod+Shift+Minus { set-window-height "-10%"; } + Mod+Shift+Equal { set-window-height "+10%"; } + + // ─── Modes ─── + Mod+T { toggle-window-floating; } + Mod+F { fullscreen-window; } + Mod+W { toggle-column-tabbed-display; } + + // ─── Screenshots ─── + CTRL+Shift+1 { screenshot; } + CTRL+Shift+2 { screenshot-screen; } + CTRL+Shift+3 { screenshot-window; } + + // ─── Emergency Escape Key ─── + Mod+ESCAPE allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } + + // ─── Exit / Power ─── + CTRL+ALT+Delete { quit; } + Mod+Shift+P { power-off-monitors; } + Mod+O repeat=false { toggle-overview; } +} diff --git a/dot_config/niri/cfg/layout.kdl b/dot_config/niri/cfg/layout.kdl new file mode 100644 index 0000000..34c9014 --- /dev/null +++ b/dot_config/niri/cfg/layout.kdl @@ -0,0 +1,14 @@ + layout { + gaps 16 // Gap between windows + center-focused-column "never" // Don’t auto-center focused column + + background-color "transparent" // <- needed for noctalia-shell to set wallpaper + + preset-column-widths { + proportion 0.33333 + proportion 0.5 + proportion 0.66667 + } + + struts {} + } diff --git a/dot_config/niri/cfg/misc.kdl b/dot_config/niri/cfg/misc.kdl new file mode 100644 index 0000000..9df0c68 --- /dev/null +++ b/dot_config/niri/cfg/misc.kdl @@ -0,0 +1,25 @@ + prefer-no-csd + screenshot-path null + + environment { + ELECTRON_OZONE_PLATFORM_HINT "auto" + QT_QPA_PLATFORM "wayland" + QT_QPA_PLATFORMTHEME "gtk3" + QT_WAYLAND_DISABLE_WINDOWDECORATION "1" + XDG_CURRENT_DESKTOP "niri" + XDG_SESSION_TYPE "wayland" + } + + cursor { + xcursor-theme "capitaine-cursors" + xcursor-size 24 + } + + debug { + // Allows notification actions and window activation from Noctalia. + honor-xdg-activation-with-invalid-serial + } + + hotkey-overlay { + skip-at-startup + } diff --git a/dot_config/niri/cfg/rules.kdl b/dot_config/niri/cfg/rules.kdl new file mode 100644 index 0000000..187a80a --- /dev/null +++ b/dot_config/niri/cfg/rules.kdl @@ -0,0 +1,32 @@ +window-rule { + geometry-corner-radius 20 + clip-to-geometry true +} + +window-rule { + match app-id="steam" + exclude title=r#"^[Ss]team$"# + open-floating true +} + +window-rule { + match app-id="steam" title=r#"^notificationtoasts_\d+_desktop$"# + default-floating-position x=10 y=10 relative-to="bottom-right" + open-focused false +} + +window-rule { + match app-id="librewolf" + match app-id="chromium" + match app-id="brave" + match app-id="prizrak-box" + match app-id="com.discordapp.Discord" + match app-id="org.telegram.desktop" + match app-id="kitty" + open-maximized true +} + +layer-rule { + match namespace="^noctalia-wallpaper*" + place-within-backdrop true +} diff --git a/dot_config/niri/config.kdl b/dot_config/niri/config.kdl new file mode 100644 index 0000000..b8c53ca --- /dev/null +++ b/dot_config/niri/config.kdl @@ -0,0 +1,8 @@ +include "./cfg/animation.kdl" +include "./cfg/autostart.kdl" +include "./cfg/keybinds.kdl" +include "./cfg/input.kdl" +include "./cfg/display.kdl" +include "./cfg/layout.kdl" +include "./cfg/rules.kdl" +include "./cfg/misc.kdl"