Void Linux workstation powered by niri, Fish and NeoVim. Contains scripts, browser extensions, custom XBPS packages, and typst plugins. git.anhgelus.world/anhgelus/dotfiles
void niri fish neovim nvim vim dotfiles linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(niri): first config

+408
+408
config/niri/config.kdl
··· 1 + environment { 2 + ELECTRON_OZONE_PLATFORM_HINT "auto" 3 + } 4 + 5 + input { 6 + keyboard { 7 + xkb { 8 + layout "fr" 9 + variant "oss" 10 + options "compose:menu" 11 + } 12 + numlock 13 + } 14 + 15 + // Next sections include libinput settings. 16 + // Omitting settings disables them, or leaves them at their default values. 17 + // All commented-out settings here are examples, not defaults. 18 + touchpad { 19 + // off 20 + tap 21 + // dwt 22 + // dwtp 23 + // drag false 24 + // drag-lock 25 + natural-scroll 26 + // accel-speed 0.2 27 + // accel-profile "flat" 28 + // scroll-method "two-finger" 29 + // disabled-on-external-mouse 30 + } 31 + 32 + mouse { 33 + // off 34 + // natural-scroll 35 + // accel-speed 0.2 36 + // accel-profile "flat" 37 + // scroll-method "no-scroll" 38 + } 39 + 40 + trackpoint { 41 + // off 42 + // natural-scroll 43 + // accel-speed 0.2 44 + // accel-profile "flat" 45 + // scroll-method "on-button-down" 46 + // scroll-button 273 47 + // scroll-button-lock 48 + // middle-emulation 49 + } 50 + 51 + // Uncomment this to make the mouse warp to the center of newly focused windows. 52 + warp-mouse-to-focus 53 + 54 + // Focus windows and outputs automatically when moving the mouse into them. 55 + // Setting max-scroll-amount="0%" makes it work only on windows already fully on screen. 56 + focus-follows-mouse max-scroll-amount="90%" 57 + } 58 + 59 + output "HDMI-A-1" { 60 + mode "1920x1080@144" 61 + scale 1 62 + transform "normal" 63 + position x=0 y=0 64 + } 65 + 66 + output "eDP-1" { 67 + mode "1920x1080@60" 68 + scale 1 69 + transform "normal" 70 + position x=1920 y=0 71 + } 72 + 73 + layout { 74 + gaps 16 75 + 76 + center-focused-column "never" 77 + 78 + preset-column-widths { 79 + proportion 0.33 80 + proportion 0.5 81 + proportion 0.75 82 + proportion 0.9 83 + 84 + // fixed 1920 85 + } 86 + 87 + default-column-width { proportion 0.5; } 88 + 89 + focus-ring { 90 + // off 91 + 92 + width 4 93 + active-color "#84A98C" 94 + inactive-color "#2F3E46" 95 + } 96 + 97 + // You can also add a border. It's similar to the focus ring, but always visible. 98 + border { 99 + off 100 + 101 + width 4 102 + active-color "#ffc87f" 103 + inactive-color "#505050" 104 + 105 + urgent-color "#9b0000" 106 + } 107 + 108 + shadow { 109 + // Uncomment the next line to enable shadows. 110 + // on 111 + 112 + softness 30 113 + spread 5 114 + offset x=0 y=5 115 + color "#0007" 116 + } 117 + 118 + struts { 119 + // left 64 120 + // right 64 121 + // top 64 122 + // bottom 64 123 + } 124 + } 125 + 126 + spawn-at-startup "waybar" 127 + spawn-at-startup "swww-daemon" 128 + 129 + // To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup: 130 + // spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell" 131 + 132 + hotkey-overlay { 133 + // Uncomment this line to disable the "Important Hotkeys" pop-up at startup. 134 + // skip-at-startup 135 + } 136 + 137 + prefer-no-csd 138 + 139 + screenshot-path "~/Images/Screenshots/%Y-%m-%d %H-%M-%S.png" 140 + 141 + animations { 142 + // Uncomment to turn off all animations. 143 + // off 144 + 145 + // Slow down all animations by this factor. Values below 1 speed them up instead. 146 + // slowdown 3.0 147 + } 148 + 149 + //////////// 150 + // OPACITY / 151 + //////////// 152 + window-rule { 153 + match is-focused=false is-active=false is-floating=false 154 + opacity 0.9 155 + } 156 + 157 + window-rule { 158 + exclude is-focused=false is-active=false is-floating=false 159 + opacity 0.98 160 + } 161 + 162 + // disable reduced opacity for specific windows 163 + window-rule { 164 + exclude is-focused=false is-active=false is-floating=false 165 + match app-id="mpv" 166 + match app-id="discord" 167 + //match class="Minecraft.*" 168 + 169 + opacity 1.0 170 + } 171 + 172 + ///////////// 173 + // SPECIFIC / 174 + ///////////// 175 + 176 + // Open the Firefox picture-in-picture player as floating by default. 177 + window-rule { 178 + // This app-id regular expression will work for both: 179 + // - host Firefox (app-id is "firefox") 180 + // - Flatpak Firefox (app-id is "org.mozilla.firefox") 181 + match app-id=r#"firefox$"# title="^Picture-in-Picture$" 182 + open-floating true 183 + } 184 + 185 + window-rule { 186 + match app-id="thunar" 187 + open-floating true 188 + } 189 + 190 + window-rule { 191 + match app-id="Firefox" title=".*Bitwarden.*" 192 + open-floating true 193 + } 194 + 195 + window-rule { 196 + match app-id="xdg-desktop-portal-gtk" 197 + open-floating true 198 + } 199 + 200 + window-rule { 201 + match app-id="org.gnome.Loupe" 202 + open-floating true 203 + } 204 + 205 + window-rule { 206 + match app-id="mpv" 207 + open-floating true 208 + min-width 1280 209 + max-width 1280 210 + min-height 720 211 + max-height 720 212 + } 213 + 214 + window-rule { 215 + match app-id="org.gnome.FileRoller" 216 + open-floating true 217 + } 218 + 219 + // Example: block out two password managers from screen capture. 220 + /-window-rule { 221 + match app-id=r#"^org\.keepassxc\.KeePassXC$"# 222 + match app-id=r#"^org\.gnome\.World\.Secrets$"# 223 + 224 + block-out-from "screen-capture" 225 + 226 + // Use this instead if you want them visible on third-party screenshot tools. 227 + // block-out-from "screencast" 228 + } 229 + 230 + // Example: enable rounded corners for all windows. 231 + /-window-rule { 232 + geometry-corner-radius 12 233 + clip-to-geometry true 234 + } 235 + 236 + binds { 237 + Mod+Shift+Comma { show-hotkey-overlay; } 238 + 239 + // Suggested binds for running programs: terminal, app launcher, screen locker. 240 + Mod+Return hotkey-overlay-title="Open a Terminal: foot" { spawn "foot"; } 241 + Mod+D hotkey-overlay-title="Run an Application: rofi" { spawn "rofi" "-show" "drun"; } 242 + Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; } 243 + 244 + XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+"; } 245 + XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; } 246 + XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; } 247 + XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; } 248 + 249 + // not working on my void (I don't have this), but it could be interesting on my laptop 250 + XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; } 251 + XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; } 252 + 253 + Mod+O repeat=false { toggle-overview; } 254 + 255 + Mod+Q repeat=false { close-window; } 256 + 257 + // move focus 258 + Mod+Left { focus-column-left; } 259 + Mod+Right { focus-column-right; } 260 + Mod+Down { focus-window-or-workspace-down; } 261 + Mod+Up { focus-window-or-workspace-up; } 262 + Mod+Home { focus-column-first; } 263 + Mod+End { focus-column-last; } 264 + // move focused window 265 + Mod+Ctrl+Left { move-column-left; } 266 + Mod+Ctrl+Down { move-window-down; } 267 + Mod+Ctrl+Up { move-window-up; } 268 + Mod+Ctrl+Right { move-column-right; } 269 + Mod+Ctrl+Home { move-column-to-first; } 270 + Mod+Ctrl+End { move-column-to-last; } 271 + Mod+Ctrl+Page_Down { move-column-to-workspace-down; } 272 + Mod+Ctrl+Page_Up { move-column-to-workspace-up; } 273 + Mod+Ctrl+U { move-column-to-workspace-down; } 274 + Mod+Ctrl+I { move-column-to-workspace-up; } 275 + 276 + // move focus between monitors 277 + Mod+Shift+Left { focus-monitor-left; } 278 + Mod+Shift+Down { focus-monitor-down; } 279 + Mod+Shift+Up { focus-monitor-up; } 280 + Mod+Shift+Right { focus-monitor-right; } 281 + // move focused window between monitors 282 + Mod+Shift+Ctrl+Left { move-column-to-monitor-left; } 283 + Mod+Shift+Ctrl+Down { move-column-to-monitor-down; } 284 + Mod+Shift+Ctrl+Up { move-column-to-monitor-up; } 285 + Mod+Shift+Ctrl+Right { move-column-to-monitor-right; } 286 + 287 + Mod+Page_Down { focus-workspace-down; } 288 + Mod+Page_Up { focus-workspace-up; } 289 + Mod+U { focus-workspace-down; } 290 + Mod+I { focus-workspace-up; } 291 + 292 + Mod+Shift+Page_Down { move-workspace-down; } 293 + Mod+Shift+Page_Up { move-workspace-up; } 294 + Mod+Shift+U { move-workspace-down; } 295 + Mod+Shift+I { move-workspace-up; } 296 + 297 + // You can bind mouse wheel scroll ticks using the following syntax. 298 + // These binds will change direction based on the natural-scroll setting. 299 + Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; } 300 + Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; } 301 + Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; } 302 + Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; } 303 + 304 + Mod+WheelScrollRight { focus-column-right; } 305 + Mod+WheelScrollLeft { focus-column-left; } 306 + Mod+Ctrl+WheelScrollRight { move-column-right; } 307 + Mod+Ctrl+WheelScrollLeft { move-column-left; } 308 + 309 + // Usually scrolling up and down with Shift in applications results in 310 + // horizontal scrolling; these binds replicate that. 311 + Mod+Shift+WheelScrollDown { focus-column-right; } 312 + Mod+Shift+WheelScrollUp { focus-column-left; } 313 + Mod+Ctrl+Shift+WheelScrollDown { move-column-right; } 314 + Mod+Ctrl+Shift+WheelScrollUp { move-column-left; } 315 + 316 + // Similarly, you can bind touchpad scroll "ticks". 317 + // Touchpad scrolling is continuous, so for these binds it is split into 318 + // discrete intervals. 319 + // These binds are also affected by touchpad's natural-scroll, so these 320 + // example binds are "inverted", since we have natural-scroll enabled for 321 + // touchpads by default. 322 + // Mod+TouchpadScrollDown { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02+"; } 323 + // Mod+TouchpadScrollUp { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02-"; } 324 + 325 + // move focus 326 + Mod+ampersand { focus-workspace 1; } 327 + Mod+eacute { focus-workspace 2; } 328 + Mod+quotedbl { focus-workspace 3; } 329 + Mod+apostrophe { focus-workspace 4; } 330 + Mod+parenleft { focus-workspace 5; } 331 + Mod+minus { focus-workspace 6; } 332 + Mod+egrave { focus-workspace 7; } 333 + Mod+underscore { focus-workspace 8; } 334 + Mod+ccedilla { focus-workspace 9; } 335 + // move focused window to 336 + Mod+Ctrl+ampersand { move-column-to-workspace 1; } 337 + Mod+Ctrl+eacute { move-column-to-workspace 2; } 338 + Mod+Ctrl+quotedbl { move-column-to-workspace 3; } 339 + Mod+Ctrl+apostrophe { move-column-to-workspace 4; } 340 + Mod+Ctrl+parenleft { move-column-to-workspace 5; } 341 + Mod+Ctrl+minus { move-column-to-workspace 6; } 342 + Mod+Ctrl+egrave { move-column-to-workspace 7; } 343 + Mod+Ctrl+underscore { move-column-to-workspace 8; } 344 + Mod+Ctrl+ccedilla { move-column-to-workspace 9; } 345 + 346 + // The following binds move the focused window in and out of a column. 347 + // If the window is alone, they will consume it into the nearby column to the side. 348 + // If the window is already in a column, they will expel it out. 349 + Mod+BracketLeft { consume-or-expel-window-left; } 350 + Mod+BracketRight { consume-or-expel-window-right; } 351 + 352 + // stack windows 353 + Mod+Comma { consume-window-into-column; } 354 + Mod+Semicolon { expel-window-from-column; } 355 + 356 + // modify column size 357 + Mod+R { switch-preset-column-width; } 358 + Mod+Shift+R { switch-preset-window-height; } 359 + Mod+Ctrl+R { reset-window-height; } 360 + Mod+F { maximize-column; } 361 + Mod+Ctrl+F { expand-column-to-available-width; } 362 + // fullscreen 363 + Mod+Shift+F { fullscreen-window; } 364 + 365 + // center windows 366 + Mod+C { center-column; } 367 + Mod+Ctrl+C { center-visible-columns; } 368 + 369 + // Finer width adjustments. 370 + Mod+J { set-column-width "-10%"; } 371 + Mod+K { set-column-width "+10%"; } 372 + 373 + // Finer height adjustments when in column with other windows. 374 + Mod+Shift+J { set-window-height "-10%"; } 375 + Mod+Shift+K { set-window-height "+10%"; } 376 + 377 + // Move the focused window between the floating and the tiling layout. 378 + Mod+V { toggle-window-floating; } 379 + Mod+Shift+V { switch-focus-between-floating-and-tiling; } 380 + 381 + // Toggle tabbed column display mode. 382 + // Windows in this column will appear as vertical tabs, 383 + // rather than stacked on top of each other. 384 + Mod+W { toggle-column-tabbed-display; } 385 + 386 + // screenshots 387 + Print { screenshot; } 388 + Ctrl+Print { screenshot-screen; } 389 + Alt+Print { screenshot-window; } 390 + 391 + // Applications such as remote-desktop clients and software KVM switches may 392 + // request that niri stops processing the keyboard shortcuts defined here 393 + // so they may, for example, forward the key presses as-is to a remote machine. 394 + // It's a good idea to bind an escape hatch to toggle the inhibitor, 395 + // so a buggy application can't hold your session hostage. 396 + // 397 + // The allow-inhibiting=false property can be applied to other binds as well, 398 + // which ensures niri always processes them, even when an inhibitor is active. 399 + Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } 400 + 401 + // The quit action will show a confirmation dialog to avoid accidental exits. 402 + Mod+Shift+E { quit; } 403 + Ctrl+Alt+Delete { quit; } 404 + 405 + // Powers off the monitors. To turn them back on, do any input like 406 + // moving the mouse or pressing any other key. 407 + Mod+Shift+P { power-off-monitors; } 408 + }