Initial niri config.
This commit is contained in:
@@ -0,0 +1,256 @@
|
|||||||
|
// ============================================================================
|
||||||
|
// GENERAL & SYSTEM SETTINGS
|
||||||
|
// Wiki: https://github.com/YaLTeR/niri/wiki/Configuration:-Introduction
|
||||||
|
// ============================================================================
|
||||||
|
config-notification {
|
||||||
|
disable-failed
|
||||||
|
}
|
||||||
|
|
||||||
|
hotkey-overlay {
|
||||||
|
skip-at-startup
|
||||||
|
}
|
||||||
|
|
||||||
|
prefer-no-csd
|
||||||
|
|
||||||
|
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
|
||||||
|
|
||||||
|
debug {
|
||||||
|
honor-xdg-activation-with-invalid-serial
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// ENVIRONMENT VARIABLES
|
||||||
|
// ============================================================================
|
||||||
|
environment {
|
||||||
|
XDG_CURRENT_DESKTOP "niri"
|
||||||
|
QT_QPA_PLATFORM "wayland;xcb"
|
||||||
|
ELECTRON_OZONE_PLATFORM_HINT "auto"
|
||||||
|
QT_QPA_PLATFORMTHEME "gtk3"
|
||||||
|
QT_QPA_PLATFORMTHEME_QT6 "gtk3"
|
||||||
|
TERMINAL "alacritty"
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// AUTOSTART / SPAWN AT STARTUP
|
||||||
|
// ============================================================================
|
||||||
|
spawn-at-startup "dms" "run"
|
||||||
|
|
||||||
|
// Export the session env to D-Bus so xdg-desktop-portal works
|
||||||
|
spawn-at-startup "dbus-update-activation-environment" "--all"
|
||||||
|
|
||||||
|
// Audio stack
|
||||||
|
spawn-at-startup "pipewire"
|
||||||
|
|
||||||
|
// PolicyKit authentication agent (verify path: xbps-query -f mate-polkit | grep -i agent)
|
||||||
|
spawn-at-startup "sh" "-c" "/usr/libexec/polkit-mate-authentication-agent-1 &"
|
||||||
|
|
||||||
|
// Clipboard history backing store for Mod+V
|
||||||
|
spawn-at-startup "sh" "-c" "wl-paste --watch cliphist store"
|
||||||
|
|
||||||
|
// Automount removable media
|
||||||
|
spawn-at-startup "udiskie" "--no-tray"
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// INPUT & GESTURES
|
||||||
|
// Wiki: https://github.com/YaLTeR/niri/wiki/Configuration:-Input
|
||||||
|
// ============================================================================
|
||||||
|
input {
|
||||||
|
keyboard {
|
||||||
|
xkb {
|
||||||
|
// If this section is empty, niri will fetch xkb settings
|
||||||
|
// from org.freedesktop.locale1. You can control these using
|
||||||
|
// localectl set-x11-keymap.
|
||||||
|
}
|
||||||
|
|
||||||
|
// Enable numlock on startup, omitting this setting disables it.
|
||||||
|
numlock
|
||||||
|
}
|
||||||
|
|
||||||
|
// Focus windows and outputs automatically when moving the mouse into them.
|
||||||
|
focus-follows-mouse max-scroll-amount="95%"
|
||||||
|
}
|
||||||
|
|
||||||
|
gestures {
|
||||||
|
hot-corners {
|
||||||
|
off
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// LAYOUT & VISUAL APPEARANCE
|
||||||
|
// Wiki: https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
|
||||||
|
// ============================================================================
|
||||||
|
layout {
|
||||||
|
background-color "transparent"
|
||||||
|
|
||||||
|
// When to center a column when changing focus: "never", "always", or "on-overflow"
|
||||||
|
center-focused-column "never"
|
||||||
|
|
||||||
|
// Custom widths toggled by "switch-preset-column-width" (Mod+R)
|
||||||
|
preset-column-widths {
|
||||||
|
proportion 0.5
|
||||||
|
proportion 1.0
|
||||||
|
}
|
||||||
|
|
||||||
|
default-column-width { proportion 0.5; }
|
||||||
|
|
||||||
|
border {
|
||||||
|
off
|
||||||
|
width 4
|
||||||
|
active-color "#707070" // Neutral gray
|
||||||
|
inactive-color "#d0d0d0" // Light gray
|
||||||
|
urgent-color "#cc4444" // Softer red
|
||||||
|
}
|
||||||
|
|
||||||
|
shadow {
|
||||||
|
softness 30
|
||||||
|
spread 5
|
||||||
|
offset x=0 y=5
|
||||||
|
color "#0007"
|
||||||
|
}
|
||||||
|
|
||||||
|
struts {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
overview {
|
||||||
|
workspace-shadow {
|
||||||
|
off
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// ANIMATIONS
|
||||||
|
// ============================================================================
|
||||||
|
animations {
|
||||||
|
workspace-switch {
|
||||||
|
spring damping-ratio=0.80 stiffness=523 epsilon=0.0001
|
||||||
|
}
|
||||||
|
window-open {
|
||||||
|
duration-ms 150
|
||||||
|
curve "ease-out-expo"
|
||||||
|
}
|
||||||
|
window-close {
|
||||||
|
duration-ms 150
|
||||||
|
curve "ease-out-quad"
|
||||||
|
}
|
||||||
|
horizontal-view-movement {
|
||||||
|
spring damping-ratio=0.85 stiffness=423 epsilon=0.0001
|
||||||
|
}
|
||||||
|
window-movement {
|
||||||
|
spring damping-ratio=0.75 stiffness=323 epsilon=0.0001
|
||||||
|
}
|
||||||
|
window-resize {
|
||||||
|
spring damping-ratio=0.85 stiffness=423 epsilon=0.0001
|
||||||
|
}
|
||||||
|
config-notification-open-close {
|
||||||
|
spring damping-ratio=0.65 stiffness=923 epsilon=0.001
|
||||||
|
}
|
||||||
|
screenshot-ui-open {
|
||||||
|
duration-ms 200
|
||||||
|
curve "ease-out-quad"
|
||||||
|
}
|
||||||
|
overview-open-close {
|
||||||
|
spring damping-ratio=0.85 stiffness=800 epsilon=0.0001
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// WINDOW & LAYER RULES
|
||||||
|
// Wiki: https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
|
||||||
|
// ============================================================================
|
||||||
|
layer-rule {
|
||||||
|
match namespace="^quickshell$"
|
||||||
|
place-within-backdrop true
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"^org\.gnome\."#
|
||||||
|
draw-border-with-background false
|
||||||
|
geometry-corner-radius 12
|
||||||
|
clip-to-geometry true
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"^gnome-control-center$"#
|
||||||
|
match app-id=r#"^pavucontrol$"#
|
||||||
|
match app-id=r#"^nm-connection-editor$"#
|
||||||
|
default-column-width { proportion 0.5; }
|
||||||
|
open-floating false
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"^org\.gnome\.Calculator$"#
|
||||||
|
match app-id=r#"^gnome-calculator$"#
|
||||||
|
match app-id=r#"^galculator$"#
|
||||||
|
match app-id=r#"^blueman-manager$"#
|
||||||
|
match app-id=r#"^org\.gnome\.Nautilus$"#
|
||||||
|
match app-id=r#"^xdg-desktop-portal$"#
|
||||||
|
open-floating true
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id="Alacritty"
|
||||||
|
match app-id="kitty"
|
||||||
|
draw-border-with-background false
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
|
||||||
|
match app-id="zoom"
|
||||||
|
open-floating true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Force the Steam client, Friends List, and settings windows to float
|
||||||
|
window-rule {
|
||||||
|
match app-id="steam"
|
||||||
|
open-floating true
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id="steam"
|
||||||
|
match title="Friends List"
|
||||||
|
open-floating true
|
||||||
|
default-floating-position x=10 y=10 relative-to="bottom-right"
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"^steam$"# title=r#"^notificationtoasts_\d+_desktop$"#
|
||||||
|
default-floating-position x=10 y=10 relative-to="top-right"
|
||||||
|
open-focused false
|
||||||
|
}
|
||||||
|
|
||||||
|
// Automatically fullscreen games launched via Proton
|
||||||
|
window-rule {
|
||||||
|
// Proton games typically use "steam_app_<id>" as their app-id.
|
||||||
|
// The r#"..."# syntax tells niri to evaluate this as a regular expression.
|
||||||
|
match app-id=r#"^steam_app_\d+$"#
|
||||||
|
open-fullscreen true
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// NAVIGATION & KEYBINDINGS
|
||||||
|
// ============================================================================
|
||||||
|
// Override to disable super+tab
|
||||||
|
recent-windows {
|
||||||
|
binds {
|
||||||
|
Alt+Tab { next-window scope="output"; }
|
||||||
|
Alt+Shift+Tab { previous-window scope="output"; }
|
||||||
|
Alt+grave { next-window filter="app-id"; }
|
||||||
|
Alt+Shift+grave { previous-window filter="app-id"; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// INCLUDES (DMS MANAGEMENT)
|
||||||
|
// ============================================================================
|
||||||
|
// @NOTE: only dms file we could edit
|
||||||
|
include optional=true "dms/binds.kdl"
|
||||||
|
|
||||||
|
// @NOTE: Non-editable files below all managed by dms
|
||||||
|
include optional=true "dms/colors.kdl"
|
||||||
|
include optional=true "dms/layout.kdl"
|
||||||
|
include optional=true "dms/alttab.kdl"
|
||||||
|
include optional=true "dms/outputs.kdl"
|
||||||
|
include optional=true "dms/cursor.kdl"
|
||||||
|
include optional=true "dms/input.kdl"
|
||||||
@@ -0,0 +1,152 @@
|
|||||||
|
binds {
|
||||||
|
// ========================================================================
|
||||||
|
// SYSTEM & DMS APPLICATION LAUNCHERS
|
||||||
|
// ========================================================================
|
||||||
|
// Screenshots
|
||||||
|
Alt+Print hotkey-overlay-title="Screenshot: Window" { spawn "dms" "screenshot" "window"; }
|
||||||
|
Alt+XF86Launch1 hotkey-overlay-title="Screenshot: Window" { spawn "dms" "screenshot" "window"; }
|
||||||
|
Ctrl+Print hotkey-overlay-title="Screenshot: Full Screen" { spawn "dms" "screenshot" "full"; }
|
||||||
|
Ctrl+XF86Launch1 hotkey-overlay-title="Screenshot: Full Screen" { spawn "dms" "screenshot" "full"; }
|
||||||
|
Mod+P hotkey-overlay-title="Screenshot: Region" { spawn "dms" "screenshot"; }
|
||||||
|
|
||||||
|
// Launchers & Overlays
|
||||||
|
Mod+D hotkey-overlay-title="Application Launcher" { spawn "dms" "ipc" "call" "spotlight" "toggle"; }
|
||||||
|
Mod+space hotkey-overlay-title="Spotlight Bar: Toggle" { spawn "dms" "ipc" "call" "spotlight-bar" "toggle"; }
|
||||||
|
Mod+Y hotkey-overlay-title="Browse Wallpapers" { spawn "dms" "ipc" "call" "dash" "toggle" "wallpaper"; }
|
||||||
|
Super+Backspace hotkey-overlay-title="Power Menu: Toggle" { spawn "dms" "ipc" "call" "powermenu" "toggle"; }
|
||||||
|
Mod+Alt+L hotkey-overlay-title="Lock Screen" { spawn "dms" "ipc" "call" "lock" "lock"; }
|
||||||
|
|
||||||
|
// Utilities & Tools
|
||||||
|
Ctrl+Alt+Delete hotkey-overlay-title="Task Manager" { spawn "dms" "ipc" "call" "processlist" "focusOrToggle"; }
|
||||||
|
Mod+M hotkey-overlay-title="Task Manager" { spawn "dms" "ipc" "call" "processlist" "focusOrToggle"; }
|
||||||
|
Mod+N hotkey-overlay-title="Notification Center" { spawn "dms" "ipc" "call" "notifications" "toggle"; }
|
||||||
|
Mod+S hotkey-overlay-title="Notepad" { spawn "dms" "ipc" "call" "notepad" "toggle"; }
|
||||||
|
Mod+V hotkey-overlay-title="Clipboard Manager" { spawn "dms" "ipc" "call" "clipboard" "toggle"; }
|
||||||
|
Mod+Comma hotkey-overlay-title="Settings" { spawn "dms" "ipc" "call" "settings" "focusOrToggle"; }
|
||||||
|
|
||||||
|
// Configuration Helpers
|
||||||
|
Ctrl+Shift+R hotkey-overlay-title="Rename Workspace" { spawn "dms" "ipc" "call" "workspace-rename" "open"; }
|
||||||
|
Mod+Shift+W hotkey-overlay-title="Create window rule" { spawn "dms" "ipc" "call" "window-rules" "toggle"; }
|
||||||
|
|
||||||
|
// Audio Control (MPRIS)
|
||||||
|
Ctrl+XF86AudioLowerVolume allow-when-locked=true { spawn "dms" "ipc" "call" "mpris" "decrement" "3"; }
|
||||||
|
Ctrl+XF86AudioRaiseVolume allow-when-locked=true { spawn "dms" "ipc" "call" "mpris" "increment" "3"; }
|
||||||
|
|
||||||
|
// ========================================================================
|
||||||
|
// WINDOW & COLUMN FOCUS
|
||||||
|
// ========================================================================
|
||||||
|
// Focus Columns (Horizontal)
|
||||||
|
Mod+H { focus-column-left; }
|
||||||
|
Mod+Left { focus-column-left; }
|
||||||
|
Mod+L { focus-column-right; }
|
||||||
|
Mod+Right { focus-column-right; }
|
||||||
|
Mod+Home { focus-column-first; }
|
||||||
|
Mod+End { focus-column-last; }
|
||||||
|
|
||||||
|
// Focus Windows within Column (Vertical)
|
||||||
|
Mod+J { focus-window-down; }
|
||||||
|
Mod+Down { focus-window-down; }
|
||||||
|
Mod+K { focus-window-up; }
|
||||||
|
Mod+Up { focus-window-up; }
|
||||||
|
|
||||||
|
// Mouse Wheel Focus Navigation
|
||||||
|
Mod+WheelScrollLeft { focus-column-left; }
|
||||||
|
Mod+WheelScrollRight { focus-column-right; }
|
||||||
|
Mod+Shift+WheelScrollUp { focus-column-left; }
|
||||||
|
Mod+Shift+WheelScrollDown { focus-column-right; }
|
||||||
|
|
||||||
|
// ========================================================================
|
||||||
|
// WINDOW & COLUMN MANIPULATION
|
||||||
|
// ========================================================================
|
||||||
|
// Close Window
|
||||||
|
Mod+Q repeat=false { close-window; }
|
||||||
|
|
||||||
|
// Move Columns (Horizontal)
|
||||||
|
Mod+Shift+H { move-column-left; }
|
||||||
|
Mod+Shift+Left { move-column-left; }
|
||||||
|
Mod+Shift+L { move-column-right; }
|
||||||
|
Mod+Shift+Right { move-column-right; }
|
||||||
|
Mod+Ctrl+Home { move-column-to-first; }
|
||||||
|
Mod+Ctrl+End { move-column-to-last; }
|
||||||
|
Mod+Ctrl+WheelScrollLeft { move-column-left; }
|
||||||
|
Mod+Ctrl+WheelScrollRight { move-column-right; }
|
||||||
|
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
|
||||||
|
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
|
||||||
|
|
||||||
|
// Move Windows within Column (Vertical)
|
||||||
|
Mod+Shift+J { move-window-down; }
|
||||||
|
Mod+Shift+Down { move-window-down; }
|
||||||
|
Mod+Shift+K { move-window-up; }
|
||||||
|
Mod+Shift+Up { move-window-up; }
|
||||||
|
|
||||||
|
// Sizing & Layout Constraints
|
||||||
|
Mod+Equal { set-column-width "+10%"; }
|
||||||
|
Mod+Minus { set-column-width "-10%"; }
|
||||||
|
Mod+Shift+Equal { set-window-height "+10%"; }
|
||||||
|
Mod+Shift+Minus { set-window-height "-10%"; }
|
||||||
|
Mod+R { switch-preset-column-width; }
|
||||||
|
Mod+Shift+R { switch-preset-window-height; }
|
||||||
|
Mod+Ctrl+R { reset-window-height; }
|
||||||
|
Mod+Ctrl+F { expand-column-to-available-width; }
|
||||||
|
Mod+F { maximize-column; }
|
||||||
|
Mod+Shift+F { fullscreen-window; }
|
||||||
|
|
||||||
|
// Positioning, Floating & Tiling States
|
||||||
|
Mod+C { center-column; }
|
||||||
|
Mod+Ctrl+C { center-visible-columns; }
|
||||||
|
Mod+W { toggle-column-tabbed-display; }
|
||||||
|
Mod+Shift+T { toggle-window-floating; }
|
||||||
|
Mod+Shift+V { switch-focus-between-floating-and-tiling; }
|
||||||
|
Mod+BracketLeft { consume-or-expel-window-left; }
|
||||||
|
Mod+BracketRight { consume-or-expel-window-right; }
|
||||||
|
Mod+Period { expel-window-from-column; }
|
||||||
|
|
||||||
|
// ========================================================================
|
||||||
|
// WORKSPACE MANAGEMENT
|
||||||
|
// ========================================================================
|
||||||
|
// Switch Workspace Focus
|
||||||
|
Mod+Page_Up { focus-workspace-up; }
|
||||||
|
Mod+I { focus-workspace-up; }
|
||||||
|
Mod+Page_Down { focus-workspace-down; }
|
||||||
|
Mod+U { focus-workspace-down; }
|
||||||
|
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
|
||||||
|
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
|
||||||
|
|
||||||
|
// Switch Workspace by Index
|
||||||
|
Mod+1 { focus-workspace 1; }
|
||||||
|
Mod+2 { focus-workspace 2; }
|
||||||
|
Mod+3 { focus-workspace 3; }
|
||||||
|
Mod+4 { focus-workspace 4; }
|
||||||
|
|
||||||
|
// Move Focused Column to Workspace
|
||||||
|
Mod+Ctrl+Up { move-column-to-workspace-up; }
|
||||||
|
Mod+Ctrl+I { move-column-to-workspace-up; }
|
||||||
|
Mod+Ctrl+Down { move-column-to-workspace-down; }
|
||||||
|
Mod+Ctrl+U { move-column-to-workspace-down; }
|
||||||
|
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
|
||||||
|
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
|
||||||
|
|
||||||
|
// Move Focused Column to Workspace Index
|
||||||
|
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; }
|
||||||
|
|
||||||
|
// Move Entire Workspace Position
|
||||||
|
Mod+Shift+Page_Up { move-workspace-up; }
|
||||||
|
Mod+Shift+I { move-workspace-up; }
|
||||||
|
Mod+Shift+Page_Down { move-workspace-down; }
|
||||||
|
Mod+Shift+U { move-workspace-down; }
|
||||||
|
|
||||||
|
// ========================================================================
|
||||||
|
// COMPOSITOR & SESSION CONTROLS
|
||||||
|
// ========================================================================
|
||||||
|
|
||||||
|
Mod+T hotkey-overlay-title="Open Terminal" { spawn "alacritty"; }
|
||||||
|
Mod+O repeat=false { toggle-overview; }
|
||||||
|
Mod+Tab repeat=false { toggle-overview; }
|
||||||
|
Mod+Slash { show-hotkey-overlay; }
|
||||||
|
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
|
||||||
|
Mod+Shift+P { power-off-monitors; }
|
||||||
|
Mod+Shift+E { quit; }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user