From 5f4de5e60c8e0e9233345935a347f713023cadf7 Mon Sep 17 00:00:00 2001 From: Yuri Kuit Date: Wed, 4 Nov 2026 16:20:17 +0100 Subject: [PATCH] niri --- .config/niri/config.kdl | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.config/niri/config.kdl b/.config/niri/config.kdl index 809b7ab..27e5dfe 100644 --- a/.config/niri/config.kdl +++ b/.config/niri/config.kdl @@ -8,6 +8,8 @@ // https://yalter.github.io/niri/Configuration:-Input prefer-no-csd + +environment input { keyboard { xkb { @@ -261,8 +263,9 @@ window-rule { // This regular expression is intentionally made as specific as possible, // since this is the default config, and we want no false positives. // You can get away with just app-id="wezterm" if you want. - match app-id=r#"^org\.wezfurlong\.wezterm$"# - default-column-width {} + match app-id=r"^org\.wezfurlong\.wezterm$" + default-column-width { + } } // Open the Firefox picture-in-picture player as floating by default. @@ -270,15 +273,15 @@ window-rule { // This app-id regular expression will work for both: // - host Firefox (app-id is "firefox") // - Flatpak Firefox (app-id is "org.mozilla.firefox") - match app-id=r#"firefox$"# title="^Picture-in-Picture$" + match app-id=r"firefox$" title="^Picture-in-Picture$" open-floating true } // Example: block out two password managers from screen capture. // (This example rule is commented out with a "/-" in front.) /-window-rule { - match app-id=r#"^org\.keepassxc\.KeePassXC$"# - match app-id=r#"^org\.gnome\.World\.Secrets$"# + match app-id=r"^org\.keepassxc\.KeePassXC$" + match app-id=r"^org\.gnome\.World\.Secrets$" block-out-from "screen-capture" @@ -311,15 +314,15 @@ binds { // "-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"; } - XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; } + XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; } + XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; } // Example media keys mapping using playerctl. // This will work with any MPRIS-enabled media player. - XF86AudioPlay allow-when-locked=true { spawn-sh "playerctl play-pause"; } - XF86AudioStop allow-when-locked=true { spawn-sh "playerctl stop"; } - XF86AudioPrev allow-when-locked=true { spawn-sh "playerctl previous"; } - XF86AudioNext allow-when-locked=true { spawn-sh "playerctl next"; } + XF86AudioPlay allow-when-locked=true { spawn-sh "playerctl play-pause"; } + XF86AudioStop allow-when-locked=true { spawn-sh "playerctl stop"; } + XF86AudioPrev allow-when-locked=true { spawn-sh "playerctl previous"; } + XF86AudioNext allow-when-locked=true { spawn-sh "playerctl next"; } // Example brightness key mappings for brightnessctl. // You can use regular spawn with multiple arguments too (to avoid going through "sh"), @@ -414,10 +417,10 @@ binds { // To avoid scrolling through workspaces really fast, you can use // the cooldown-ms property. The bind will be rate-limited to this value. // You can set a cooldown on any bind, but it's most useful for the wheel. - Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; } - Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; } + Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; } + Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; } Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; } - Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; } + Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; } Mod+WheelScrollRight { focus-column-right; } Mod+WheelScrollLeft { focus-column-left; }