diff options
| author | Mohammad Reza Karimi <m.r.karimi.j@gmail.com> | 2026-02-23 15:03:10 -0500 |
|---|---|---|
| committer | Mohammad Reza Karimi <m.r.karimi.j@gmail.com> | 2026-02-23 15:03:10 -0500 |
| commit | 36a274dbc066068ff25b839e21ce3b82ec292c88 (patch) | |
| tree | 7e3de8bafab79cfa86c93f467413b8f43273a8a5 /niri/dot-config | |
| parent | b29aab34dff6b76fd8eb067d51d2fe41be594616 (diff) | |
Diffstat (limited to 'niri/dot-config')
| -rw-r--r-- | niri/dot-config/niri/animations.kdl | 2 | ||||
| -rw-r--r-- | niri/dot-config/niri/binds.kdl | 107 | ||||
| -rw-r--r-- | niri/dot-config/niri/config.kdl | 316 | ||||
| -rw-r--r-- | niri/dot-config/niri/decorations.kdl | 16 | ||||
| -rw-r--r-- | niri/dot-config/niri/input.kdl | 21 | ||||
| -rw-r--r-- | niri/dot-config/niri/layout.kdl | 39 | ||||
| -rw-r--r-- | niri/dot-config/niri/misc.kdl | 29 | ||||
| -rw-r--r-- | niri/dot-config/niri/outputs.kdl | 6 | ||||
| -rw-r--r-- | niri/dot-config/niri/rules.kdl | 5 | ||||
| -rw-r--r-- | niri/dot-config/niri/workspaces.kdl | 5 | ||||
| -rw-r--r-- | niri/dot-config/systemd/user/app-graphical.slice | 7 |
11 files changed, 241 insertions, 312 deletions
diff --git a/niri/dot-config/niri/animations.kdl b/niri/dot-config/niri/animations.kdl new file mode 100644 index 0000000..946e7ae --- /dev/null +++ b/niri/dot-config/niri/animations.kdl @@ -0,0 +1,2 @@ +animations { +} diff --git a/niri/dot-config/niri/binds.kdl b/niri/dot-config/niri/binds.kdl new file mode 100644 index 0000000..b8b34ad --- /dev/null +++ b/niri/dot-config/niri/binds.kdl @@ -0,0 +1,107 @@ +binds { + Mod+Shift+Slash { show-hotkey-overlay; } + + Mod+Return hotkey-overlay-title="Open a Terminal: alacritty" { spawn "alacritty"; } + Mod+P hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; } + Mod+X hotkey-overlay-title="Lock the Screen: swaylock" { spawn-sh "swaylock -c 000000"; } + Mod+B hotkey-overlay-title="Launch browser: qutebrowser" { spawn "qutebrowser"; } + + // Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc. + // Note: the entire command goes as a single argument. It's passed verbatim to `sh -c`. + // For example, this is a standard bind to toggle the screen reader (orca). + Super+Alt+S allow-when-locked=true hotkey-overlay-title=null { spawn-sh "pkill orca || exec orca"; } + + // Example volume keys mappings for PipeWire & WirePlumber. + // The allow-when-locked=true property makes them work even when the session is locked. + // Using spawn-sh allows to pass multiple arguments together with the command. + // "-l 1.0" limits the volume to 100%. + XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+ -l 1.0"; } + XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-"; } + XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && update-led-mute sink"; } + XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle && update-led-mute source"; } + + XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+5%"; } + XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "5%-"; } + + Mod+O repeat=false { toggle-overview; } + + Mod+Shift+C repeat=false { close-window; } + + Mod+H { focus-column-left; } + Mod+L { focus-column-right; } + Mod+J { focus-window-or-workspace-down; } + Mod+K { focus-window-or-workspace-up; } + + Mod+Shift+H { move-column-left-or-to-monitor-left; } + Mod+Shift+L { move-column-right-or-to-monitor-right; } + Mod+Shift+J { move-window-down-or-to-workspace-down; } + Mod+Shift+K { move-window-up-or-to-workspace-up; } + + Mod+Home { focus-column-first; } + Mod+End { focus-column-last; } + + Mod+Shift+Home { move-column-to-first; } + Mod+Shift+End { move-column-to-last; } + + Mod+Ctrl+H { focus-monitor-left; } + Mod+Ctrl+J { focus-monitor-down; } + Mod+Ctrl+K { focus-monitor-up; } + Mod+Ctrl+L { focus-monitor-right; } + + 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+BracketLeft { consume-or-expel-window-left; } + Mod+BracketRight { consume-or-expel-window-right; } + + Mod+Comma { consume-window-into-column; } + Mod+Period { expel-window-from-column; } + + Mod+R { switch-preset-column-width; } + Mod+Shift+R { switch-preset-window-height; } + Mod+Ctrl+R { reset-window-height; } + + Mod+F { maximize-column; } + Mod+Shift+F { fullscreen-window; } + Mod+Ctrl+F { maximize-window-to-edges; } + + 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%"; } + + Mod+Shift+Space { toggle-window-floating; } + Mod+Space { switch-focus-between-floating-and-tiling; } + + Mod+W { toggle-column-tabbed-display; } + + Print { screenshot; } + Ctrl+Print { screenshot-screen; } + Alt+Print { screenshot-window; } + Mod+Print { spawn "colorpick"; } + + Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } + + Mod+Shift+E { quit; } + Mod+Shift+P { power-off-monitors; } +} diff --git a/niri/dot-config/niri/config.kdl b/niri/dot-config/niri/config.kdl index ec3663d..e30839b 100644 --- a/niri/dot-config/niri/config.kdl +++ b/niri/dot-config/niri/config.kdl @@ -1,305 +1,11 @@ -output "eDP-1" { - mode "2880x1800@120.000" - scale 1.75 - transform "normal" - position x=0 y=0 -} - -gestures { - hot-corners { - off - } -} - -input { - keyboard { - xkb { - layout "us,ir" - variant ",pes_keypad" - options "grp:shifts_toggle" - } - repeat-delay 300 - repeat-rate 50 - } - - touchpad { - tap - } - - mouse { - } - - trackpoint { - } - - // warp-mouse-to-focus - // focus-follows-mouse max-scroll-amount="0%" -} - -layout { - background-color "transparent" - gaps 4 - - focus-ring { - width 2 - active-color "#80aa9e" - inactive-color "#a89984" - urgent-color "#e96962" - } - - border { - width 2 - active-color "#80aa9e" - inactive-color "#a89984" - urgent-color "#e96962" - } - - shadow { - off - } - - tab-indicator { - active-color "#80aa9e" - inactive-color "#a89984" - urgent-color "#e96962" - } - - insert-hint { - color "#80aa9e80" - } - - center-focused-column "never" - - preset-column-widths { - proportion 0.33333 - proportion 0.5 - proportion 0.66667 - } - - default-column-width { proportion 0.5; } - - struts { - } -} - -overview { - workspace-shadow { - off - } -} - -environment { - XDG_CURRENT_DESKTOP "niri" -} - -hotkey-overlay { - skip-at-startup -} - -prefer-no-csd - -screenshot-path "~/Pictures/scrots/screenshot-%Y-%m-%d_%H-%M-%S.png" - -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-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#"^pavucontrol$"# - default-column-width { proportion 0.5; } - open-floating false -} - -window-rule { - match app-id=r#"^org\.gnome\.Nautilus$"# - match app-id=r#"^xdg-desktop-portal$"# - open-floating true -} - -window-rule { - match app-id="gay.vaskel.soteria" - match app-id="Pinentry-gtk" - open-floating true - open-focused true -} - -window-rule { - match app-id="Alacritty" - match app-id="com.mitchellh.ghostty" - draw-border-with-background false -} - -// Open dms windows as floating by default -window-rule { - match app-id=r#"org.quickshell$"# - open-floating true -} - -window-rule { - geometry-corner-radius 6 - clip-to-geometry true - tiled-state true - draw-border-with-background false -} - -debug { - honor-xdg-activation-with-invalid-serial -} - -// Override to disable super+tab -recent-windows { - highlight { - active-color "#0d3138" - urgent-color "#e96962" - } - 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"; } - } -} - -binds { - Mod+Shift+Slash { show-hotkey-overlay; } - - Mod+Return hotkey-overlay-title="Open a Terminal: alacritty" { spawn-sh "runapp -o alacritty"; } - Mod+P hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; } - Mod+X hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; } - Mod+B hotkey-overlay-title="Open browser" { spawn-sh "runapp -o qutebrowser"; } - Mod+M hotkey-overlay-title="Open mail" { spawn-sh "runapp -o -- alacritty -e aerc"; } - Mod+S hotkey-overlay-title="Open schedule" { spawn-sh "runapp -o -- alacritty -e ikhal"; } - - Mod+Shift+B { spawn "toggle-waybar"; } - - XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+ -l 1.0"; } - XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-"; } - XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && update-led-mute sink"; } - XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle && update-led-mute source"; } - - XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; } - XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; } - - Mod+O repeat=false { toggle-overview; } - - Mod+Shift+C repeat=false { close-window; } - - Mod+H { focus-column-left; } - Mod+J { focus-window-or-workspace-down; } - Mod+K { focus-window-or-workspace-up; } - Mod+L { focus-column-right; } - - Mod+Shift+H { move-column-left-or-to-monitor-left; } - Mod+Shift+J { move-window-down-or-to-workspace-down; } - Mod+Shift+K { move-window-up-or-to-workspace-up; } - Mod+Shift+L { move-column-right-or-to-monitor-right; } - - Mod+Home { focus-column-first; } - Mod+End { focus-column-last; } - Mod+Shift+Home { move-column-to-first; } - Mod+Shift+End { move-column-to-last; } - - Mod+Ctrl+Left { focus-monitor-left; } - Mod+Ctrl+Down { focus-monitor-down; } - Mod+Ctrl+Up { focus-monitor-up; } - Mod+Ctrl+Right { focus-monitor-right; } - - Mod+Shift+Left { move-column-to-monitor-left; } - Mod+Shift+Down { move-column-to-monitor-down; } - Mod+Shift+Up { move-column-to-monitor-up; } - Mod+Shift+Right { move-column-to-monitor-right; } - - 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 focus=false; } - Mod+Shift+2 { move-column-to-workspace 2 focus=false; } - Mod+Shift+3 { move-column-to-workspace 3 focus=false; } - Mod+Shift+4 { move-column-to-workspace 4 focus=false; } - Mod+Shift+5 { move-column-to-workspace 5 focus=false; } - Mod+Shift+6 { move-column-to-workspace 6 focus=false; } - Mod+Shift+7 { move-column-to-workspace 7 focus=false; } - Mod+Shift+8 { move-column-to-workspace 8 focus=false; } - Mod+Shift+9 { move-column-to-workspace 9 focus=false; } - - Mod+BracketLeft { consume-or-expel-window-left; } - Mod+BracketRight { consume-or-expel-window-right; } - - Mod+Comma { consume-window-into-column; } - Mod+Period { expel-window-from-column; } - - Mod+R { switch-preset-column-width-back; } - Mod+Shift+R { switch-preset-window-height; } - Mod+Ctrl+R { reset-window-height; } - Mod+F { maximize-column; } - Mod+Shift+F { fullscreen-window; } - Mod+Ctrl+F { maximize-window-to-edges; } - - 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%"; } - - Mod+Shift+Space { toggle-window-floating; } - Mod+Space { switch-focus-between-floating-and-tiling; } - - Mod+W { toggle-column-tabbed-display; } - - Print { screenshot; } - Ctrl+Print { screenshot-screen; } - Alt+Print { screenshot-window; } - Mod+Print { spawn-sh "dms color pick -a"; } - - Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } - - Mod+Shift+E { quit; } - - Mod+Shift+P { power-off-monitors; } -} +include "input.kdl" +include "outputs.kdl" +include "workspaces.kdl" +include "layout.kdl" +include "animations.kdl" +include "misc.kdl" +include "binds.kdl" +include "decorations.kdl" +include "rules.kdl" + +spawn-at-startup "/usr/lib/soteria-polkit/soteria" diff --git a/niri/dot-config/niri/decorations.kdl b/niri/dot-config/niri/decorations.kdl new file mode 100644 index 0000000..736bd27 --- /dev/null +++ b/niri/dot-config/niri/decorations.kdl @@ -0,0 +1,16 @@ +prefer-no-csd + +layout { + background-color "#1f666c" +} + +window-rule { + match app-id="^Alacritty$" + match app-id="^Alacritty-floating$" + + clip-to-geometry true + tiled-state true + draw-border-with-background false + + shadow { on; } +} diff --git a/niri/dot-config/niri/input.kdl b/niri/dot-config/niri/input.kdl new file mode 100644 index 0000000..692b99f --- /dev/null +++ b/niri/dot-config/niri/input.kdl @@ -0,0 +1,21 @@ +input { + keyboard { + xkb { + layout "us,ir" + variant ",pes_keypad" + options "grp:shifts_toggle" + } + repeat-delay 300 + repeat-rate 50 + } + + touchpad { + tap + } + + mouse { + } + + trackpoint { + } +} diff --git a/niri/dot-config/niri/layout.kdl b/niri/dot-config/niri/layout.kdl new file mode 100644 index 0000000..1d4f811 --- /dev/null +++ b/niri/dot-config/niri/layout.kdl @@ -0,0 +1,39 @@ +layout { + gaps 8 + center-focused-column "never" + preset-column-widths { + proportion 0.333333333333 + proportion 0.5 + proportion 0.66667 + } + default-column-width { proportion 0.5; } + + focus-ring { + width 2 + active-color "#7fc8ff" + inactive-color "transparent" + active-gradient from="#E5989B" to="#FFB4A2" angle=45 relative-to="workspace-view" in="oklch longer hue" + } + + border { + off + width 2 + active-color "#6c7086" + inactive-color "#6c7086" + urgent-color "#9b0000" + + active-gradient from="#E5989B" to="#FFB4A2" angle=45 relative-to="workspace-view" in="oklch longer hue" + } + + insert-hint { + color "#ffc87f80" + gradient from="#f38ba880" to="#f9e2af80" angle=0 relative-to="workspace-view" + } + + shadow { + off + } + + struts { + } +} diff --git a/niri/dot-config/niri/misc.kdl b/niri/dot-config/niri/misc.kdl new file mode 100644 index 0000000..4fcf644 --- /dev/null +++ b/niri/dot-config/niri/misc.kdl @@ -0,0 +1,29 @@ +recent-windows { + highlight { + corner-radius 14 + } + previews { + max-height 320 + } +} + +environment { + _JAVA_AWT_WM_NONREPARENTING "1" + ANV_DEBUG "video-decode,video-encode" +} + +gestures { + hot-corners { + off + } +} + +clipboard { + disable-primary +} + +hotkey-overlay { + skip-at-startup +} + +screenshot-path "~/Pictures/scrots/screenshot-%Y-%m-%d_%H-%M-%S.png" diff --git a/niri/dot-config/niri/outputs.kdl b/niri/dot-config/niri/outputs.kdl new file mode 100644 index 0000000..adbde2f --- /dev/null +++ b/niri/dot-config/niri/outputs.kdl @@ -0,0 +1,6 @@ +output "eDP-1" { + mode "2880x1800@120.000" + scale 1.75 + transform "normal" + position x=0 y=0 +} diff --git a/niri/dot-config/niri/rules.kdl b/niri/dot-config/niri/rules.kdl new file mode 100644 index 0000000..03cd555 --- /dev/null +++ b/niri/dot-config/niri/rules.kdl @@ -0,0 +1,5 @@ +window-rule { + match app-id="imv-preview" + open-focused false + open-floating true +} diff --git a/niri/dot-config/niri/workspaces.kdl b/niri/dot-config/niri/workspaces.kdl new file mode 100644 index 0000000..ee7e1c7 --- /dev/null +++ b/niri/dot-config/niri/workspaces.kdl @@ -0,0 +1,5 @@ +/-workspace "notes" { +} + +/-workspace "browser" { +} diff --git a/niri/dot-config/systemd/user/app-graphical.slice b/niri/dot-config/systemd/user/app-graphical.slice deleted file mode 100644 index bc5ea6d..0000000 --- a/niri/dot-config/systemd/user/app-graphical.slice +++ /dev/null @@ -1,7 +0,0 @@ -[Unit] -Description=User Graphical Application Slice -Documentation=man:systemd.special(7) -PartOf=graphical-session.target -After=graphical-session.target -Conflicts=niri-shutdown.target -Before=niri-shutdown.target |
