/ wm / niri / config.kdl
config.kdl
  1  // This config is in the KDL format: https://kdl.dev
  2  // "/-" comments out the following node.
  3  // Check the wiki for a full description of the configuration:
  4  // https://github.com/YaLTeR/niri/wiki/Configuration:-Introduction
  5  
  6  // Input device configuration.
  7  // Find the full list of options on the wiki:
  8  // https://github.com/YaLTeR/niri/wiki/Configuration:-Input
  9  input {
 10  
 11      touch {
 12        map-to-output "eDP-1"
 13      }
 14      tablet {
 15        calibration-matrix 1.0 0.0 0.0 0.0 1.0 0.0
 16      }
 17  
 18  
 19  
 20      // Modify mod here, default is Win
 21      mod-key "Alt"
 22  
 23      keyboard {
 24          xkb {
 25              // You can set rules, model, layout, variant and options.
 26              // For more information, see xkeyboard-config(7).
 27  
 28              // For example:
 29              // layout "us,ru"
 30              // options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
 31          }
 32  
 33          // Enable numlock on startup, omitting this setting disables it.
 34          numlock
 35      }
 36  
 37      // Next sections include libinput settings.
 38      // Omitting settings disables them, or leaves them at their default values.
 39      touchpad {
 40          // off
 41          tap
 42          // dwt
 43          // dwtp
 44          // drag false
 45          // drag-lock
 46          natural-scroll
 47          // accel-speed 0.2
 48          // accel-profile "flat"
 49          // scroll-method "two-finger"
 50          // disabled-on-external-mouse
 51      }
 52  
 53      mouse {
 54          // off
 55          // natural-scroll
 56          // accel-speed 0.2
 57          // accel-profile "flat"
 58          // scroll-method "no-scroll"
 59      }
 60  
 61      trackpoint {
 62          // off
 63          // natural-scroll
 64          // accel-speed 0.2
 65          // accel-profile "flat"
 66          // scroll-method "on-button-down"
 67          // scroll-button 273
 68          // middle-emulation
 69      }
 70  
 71      // Uncomment this to make the mouse warp to the center of newly focused windows.
 72      warp-mouse-to-focus mode="center-xy"
 73  
 74      // Focus windows and outputs automatically when moving the mouse into them.
 75      // Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
 76      // focus-follows-mouse max-scroll-amount="0%"
 77  }
 78  
 79  // You can configure outputs by their name, which you can find
 80  // by running `niri msg outputs` while inside a niri instance.
 81  // The built-in laptop monitor is usually called "eDP-1".
 82  // Find more information on the wiki:
 83  // https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
 84  // Remember to uncomment the node by removing "/-"!
 85  output "eDP-1" {
 86      // Uncomment this line to disable this output.
 87      // off
 88  
 89      // Resolution and, optionally, refresh rate of the output.
 90      // The format is "<width>x<height>" or "<width>x<height>@<refresh rate>".
 91      // If the refresh rate is omitted, niri will pick the highest refresh rate
 92      // for the resolution.
 93      // If the mode is omitted altogether or is invalid, niri will pick one automatically.
 94      // Run `niri msg outputs` while inside a niri instance to list all outputs and their modes.
 95      // mode "1920x1200@60.002"
 96  
 97      // You can use integer or fractional scale, for example use 1.5 for 150% scale.
 98      scale 1
 99  
100      // Transform allows to rotate the output counter-clockwise, valid values are:
101      // normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270.
102      transform "normal"
103  
104      // Position of the output in the global coordinate space.
105      // This affects directional monitor actions like "focus-monitor-left", and cursor movement.
106      // The cursor can only move between directly adjacent outputs.
107      // Output scale and rotation has to be taken into account for positioning:
108      // outputs are sized in logical, or scaled, pixels.
109      // For example, a 3840×2160 output with scale 2.0 will have a logical size of 1920×1080,
110      // so to put another output directly adjacent to it on the right, set its x to 1920.
111      // If the position is unset or results in an overlap, the output is instead placed
112      // automatically.
113      position x=1280 y=0
114  }
115  
116  // Settings that influence how windows are positioned and sized.
117  // Find more information on the wiki:
118  // https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
119  layout {
120      // Setting the tab indicator
121      tab-indicator{
122        width 9
123        gap 0
124        active-color "#3A94C5"
125      }
126  
127      // Set gaps around windows in logical pixels.
128      gaps 14
129  
130      // When to center a column when changing focus, options are:
131      // - "never", default behavior, focusing an off-screen column will keep at the left
132      //   or right edge of the screen.
133      // - "always", the focused column will always be centered.
134      // - "on-overflow", focusing a column will center it if it doesn't fit
135      //   together with the previously focused column.
136      center-focused-column "never"
137  
138      // You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
139      preset-column-widths {
140          // Proportion sets the width as a fraction of the output width, taking gaps into account.
141          // For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
142          // The default preset widths are 1/3, 1/2 and 2/3 of the output.
143          proportion 0.33333
144          proportion 0.5
145          proportion 0.66667
146  
147          // Fixed sets the width in logical pixels exactly.
148          // fixed 1920
149      }
150  
151      // You can also customize the heights that "switch-preset-window-height" (Mod+Shift+R) toggles between.
152      // preset-window-heights { }
153  
154      // You can change the default width of the new windows.
155      default-column-width { proportion 0.5; }
156      // If you leave the brackets empty, the windows themselves will decide their initial width.
157      // default-column-width {}
158  
159      // By default focus ring and border are rendered as a solid background rectangle
160      // behind windows. That is, they will show up through semitransparent windows.
161      // This is because windows using client-side decorations can have an arbitrary shape.
162      //
163      // If you don't like that, you should uncomment `prefer-no-csd` below.
164      // Niri will draw focus ring and border *around* windows that agree to omit their
165      // client-side decorations.
166      //
167      // Alternatively, you can override it with a window rule called
168      // `draw-border-with-background`.
169  
170      // You can change how the focus ring looks.
171      focus-ring {
172          // Uncomment this line to disable the focus ring.
173          // off
174  
175          // How many logical pixels the ring extends out from the windows.
176          width 9
177  
178          // Colors can be set in a variety of ways:
179          // - CSS named colors: "red"
180          // - RGB hex: "#rgb", "#rgba", "#rrggbb", "#rrggbbaa"
181          // - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others.
182  
183          // Color of the ring on the active monitor.
184          active-color "#A7C080"
185  
186          // Color of the ring on inactive monitors.
187          inactive-color "rgba(0,0,0,0)"
188  
189          // You can also use gradients. They take precedence over solid colors.
190          // Gradients are rendered the same as CSS linear-gradient(angle, from, to).
191          // The angle is the same as in linear-gradient, and is optional,
192          // defaulting to 180 (top-to-bottom gradient).
193          // You can use any CSS linear-gradient tool on the web to set these up.
194          // Changing the color space is also supported, check the wiki for more info.
195          //
196          // active-gradient from="#80c8ff" to="#bbddff" angle=45
197  
198          // You can also color the gradient relative to the entire view
199          // of the workspace, rather than relative to just the window itself.
200          // To do that, set relative-to="workspace-view".
201          //
202          // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
203      }
204  
205      // You can also add a border. It's similar to the focus ring, but always visible.
206      border {
207          // The settings are the same as for the focus ring.
208          // If you enable the border, you probably want to disable the focus ring.
209          off
210  
211          width 5
212          active-color "#A7C080"
213          //inactive-color "#505050"
214  
215          // Color of the border around windows that request your attention.
216          urgent-color "#E67E80"
217  
218          // active-gradient from="#ffbb66" to="#ffc880" angle=45 relative-to="workspace-view"
219          // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
220      }
221  
222      // You can enable drop shadows for windows.
223      shadow {
224          // Uncomment the next line to enable shadows.
225          // on
226  
227          // By default, the shadow draws only around its window, and not behind it.
228          // Uncomment this setting to make the shadow draw behind its window.
229          //
230          // Note that niri has no way of knowing about the CSD window corner
231          // radius. It has to assume that windows have square corners, leading to
232          // shadow artifacts inside the CSD rounded corners. This setting fixes
233          // those artifacts.
234          //
235          // However, instead you may want to set prefer-no-csd and/or
236          // geometry-corner-radius. Then, niri will know the corner radius and
237          // draw the shadow correctly, without having to draw it behind the
238          // window. These will also remove client-side shadows if the window
239          // draws any.
240          //
241          // draw-behind-window true
242  
243          // You can change how shadows look. The values below are in logical
244          // pixels and match the CSS box-shadow properties.
245  
246          // Softness controls the shadow blur radius.
247          softness 30
248  
249          // Spread expands the shadow.
250          spread 5
251  
252          // Offset moves the shadow relative to the window.
253          offset x=0 y=5
254  
255          // You can also change the shadow color and opacity.
256          color "#0007"
257      }
258  
259      // Struts shrink the area occupied by windows, similarly to layer-shell panels.
260      // You can think of them as a kind of outer gaps. They are set in logical pixels.
261      // Left and right struts will cause the next window to the side to always be visible.
262      // Top and bottom struts will simply add outer gaps in addition to the area occupied by
263      // layer-shell panels and regular gaps.
264      struts {
265          // left 64
266          // right 64
267          // top 64
268          // bottom 64
269      }
270  }
271  
272  // Add lines like this to spawn processes at startup.
273  // Note that running niri as a session supports xdg-desktop-autostart,
274  // which may be more convenient to use.
275  // See the binds section below for more spawn examples.
276  
277  // Uncomment this line to ask the clients to omit their client-side decorations if possible.
278  // If the client will specifically ask for CSD, the request will be honored.
279  // Additionally, clients will be informed that they are tiled, removing some client-side rounded corners.
280  // This option will also fix border/focus ring drawing behind some semitransparent windows.
281  // After enabling or disabling this, you need to restart the apps for this to take effect.
282  // prefer-no-csd
283  
284  // You can change the path where screenshots are saved.
285  // A ~ at the front will be expanded to the home directory.
286  // The path is formatted with strftime(3) to give you the screenshot date and time.
287  screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
288  
289  // You can also set this to null to disable saving screenshots to disk.
290  // screenshot-path null
291  
292  // Animation settings.
293  // The wiki explains how to configure individual animations:
294  // https://github.com/YaLTeR/niri/wiki/Configuration:-Animations
295  animations {
296      // Uncomment to turn off all animations.
297      // off
298  
299      // Slow down all animations by this factor. Values below 1 speed them up instead.
300      slowdown 2.8
301      workspace-switch {
302        spring damping-ratio=1.0 stiffness=750 epsilon=0.0001
303      }
304      window-open {
305        duration-ms 225
306        curve "ease-out-expo"
307      }
308      window-close {
309        duration-ms 150
310        curve "ease-out-quad"
311      }
312      horizontal-view-movement {
313        spring damping-ratio=1.0 stiffness=400 epsilon=0.0001
314      }
315  
316      window-movement {
317            spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
318      }
319  
320      window-resize {
321            spring damping-ratio=1.0 stiffness=400 epsilon=0.0001
322      }
323  
324      config-notification-open-close {
325            spring damping-ratio=0.6 stiffness=1000 epsilon=0.001
326      }
327  
328      screenshot-ui-open {
329            duration-ms 200
330            curve "ease-out-quad"
331      }
332  
333      overview-open-close {
334            spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
335      }
336  }
337  
338  // Window rules let you adjust behavior for individual windows.
339  // Find more information on the wiki:
340  // https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
341  
342  // Work around WezTerm's initial configure bug
343  // by setting an empty default-column-width.
344  window-rule {
345      // This regular expression is intentionally made as specific as possible,
346      // since this is the default config, and we want no false positives.
347      // You can get away with just app-id="wezterm" if you want.
348      geometry-corner-radius 20
349      match app-id=r#"^org\.wezfurlong\.wezterm$"#
350      default-column-width {}
351  }
352  
353  // Open the Firefox picture-in-picture player as floating by default.
354  window-rule {
355      // This app-id regular expression will work for both:
356      // - host Firefox (app-id is "firefox")
357      // - Flatpak Firefox (app-id is "org.mozilla.firefox")
358      match app-id=r#"zen$"# title="^Picture-in-Picture$"
359      open-floating true
360  }
361  window-rule {
362      match app-id=r#"zen$"#
363      match app-id=r#"Unity$"#
364      open-maximized true
365  }
366  
367  // Example: block out two password managers from screen capture.
368  // (This example rule is commented out with a "/-" in front.)
369  window-rule {
370      match app-id=r#"^org\.keepassxc\.KeePassXC$"#
371      // match app-id=r#"^org\.gnome\.World\.Secrets$"#
372  
373      block-out-from "screen-capture"
374  
375      // Use this instead if you want them visible on third-party screenshot tools.
376      // block-out-from "screencast"
377  }
378  
379  // Example: enable rounded corners for all windows.
380  // (This example rule is commented out with a "/-" in front.)
381  window-rule {
382      geometry-corner-radius 12
383      clip-to-geometry true
384  }
385  
386  hotkey-overlay {
387      skip-at-startup
388  }
389  
390  overview {
391      zoom 0.55
392      backdrop-color "#3A464C"
393  }
394  
395  layer-rule {
396      match namespace="^wallpaper$"
397      place-within-backdrop true
398  }
399  
400  cursor {
401      xcursor-size 20;
402  }
403  
404  binds {
405      // Keys consist of modifiers separated by + signs, followed by an XKB key name
406      // in the end. To find an XKB name for a particular key, you may use a program
407      // like wev.
408      //
409      // "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
410      // when running as a winit window.
411      //
412      // Most actions that you can bind here can also be invoked programmatically with
413      // `niri msg action do-something`.
414  
415      // Mod-Shift-/, which is usually the same as Mod-?,
416      // shows a list of important hotkeys.
417      Mod+Shift+Slash { show-hotkey-overlay; }
418  
419      // Allow brightness button to work
420      XF86MonBrightnessUp         allow-when-locked=true { spawn "brightnessctl" "s" "+5%"; }
421      XF86MonBrightnessDown       allow-when-locked=true { spawn "brightnessctl" "s" "5%-"; }
422  
423      // Suggested binds for running programs: terminal, app launcher, screen locker.
424      Mod+T hotkey-overlay-title="Open a Terminal: kitty" { spawn "kitty"; }
425      Mod+D hotkey-overlay-title="Run an Application: rofi launcher"{spawn "rofi" "-show" "drun" "-config" "/home/mrkrebs/.config/rofi-themes/config.rasi"; }
426      Mod+P hotkey-overlay-title="Open a powermenu: rofi powermenu"{spawn "~/.dotfiles/applications/rofi/powermenu.sh"; }
427      Mod+Q hotkey-overlay-title="Open an Application: zen browser"{spawn "zen";}
428      // Super+Alt+L hotkey-overlay-title="Lock the Screen: hyprlock" { spawn "hyprlock -c ~/.config/hyprlock/hyprlock.config"; }
429  
430      // You can also use a shell. Do this if you need pipes, multiple commands, etc.
431      // Note: the entire command goes as a single argument in the end.
432      // Mod+T { spawn "bash" "-c" "notify-send hello && exec alacritty"; }
433  
434      // Example volume keys mappings for PipeWire & WirePlumber.
435      // The allow-when-locked=true property makes them work even when the session is locked.
436      XF86AudioRaiseVolume        allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.05+"; }
437      XF86AudioLowerVolume        allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.05-"; }
438      XF86AudioMute               allow-when-locked=true { spawn "~/.dotfiles/scripts/mute.sh"; }  // needed because wpctl mute is janky
439      XF86AudioMicMute            allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
440      XF86AudioPlay               allow-when-locked=true { spawn "playerctl" "-p" "spotify" "play-pause"; }
441      XF86AudioNext               allow-when-locked=true { spawn "playerctl" "-p" "spotify" "next"; }
442      XF86AudioPrev               allow-when-locked=true { spawn "playerctl" "-p" "spotify" "previous"; }
443  
444      // Open/close the Overview: a zoomed-out view of workspaces and windows.
445      // You can also move the mouse into the top-left hot corner,
446      // or do a four-finger swipe up on a touchpad.
447      Mod+O repeat=false { toggle-overview; }
448  
449      Mod+Shift+Q { close-window; }
450  
451      Mod+Left  { focus-column-left; }
452      Mod+Down  { focus-window-down; }
453      Mod+Up    { focus-window-up; }
454      Mod+Right { focus-column-right; }
455      Mod+H     { focus-column-left; }
456      // Mod+J     { focus-window-down; }
457      // Mod+K     { focus-window-up; }
458      Mod+L     { focus-column-right; }
459  
460      Mod+Shift+Left  { move-column-left; }
461      Mod+Shift+Down  { move-window-down; }
462      Mod+Shift+Up    { move-window-up; }
463      Mod+Shift+Right { move-column-right; }
464      Mod+Shift+H     { move-column-left; }
465      // Mod+Shift+J     { move-window-down; }
466      // Mod+Shift+K     { move-window-up; }
467      Mod+Shift+L     { move-column-right; }
468  
469      // Alternative commands that move across workspaces when reaching
470      // the first or last window in a column.
471      Mod+J     { focus-window-or-workspace-down; }
472      Mod+K     { focus-window-or-workspace-up; }
473      Mod+Shift+J     { move-window-down-or-to-workspace-down; }
474      Mod+Shift+K     { move-window-up-or-to-workspace-up; }
475  
476      Mod+Home { focus-column-first; }
477      Mod+End  { focus-column-last; }
478      Mod+Ctrl+Home { move-column-to-first; }
479      Mod+Ctrl+End  { move-column-to-last; }
480  
481      Mod+Ctrl+Left  { focus-monitor-left; }
482      Mod+Ctrl+Down  { focus-monitor-down; }
483      Mod+Ctrl+Up    { focus-monitor-up; }
484      Mod+Ctrl+Right { focus-monitor-right; }
485      Mod+Ctrl+H     { focus-monitor-left; }
486      Mod+Ctrl+J     { focus-monitor-down; }
487      Mod+Ctrl+K     { focus-monitor-up; }
488      Mod+Ctrl+L     { focus-monitor-right; }
489  
490      Mod+Shift+Ctrl+Left  { move-column-to-monitor-left; }
491      Mod+Shift+Ctrl+Down  { move-column-to-monitor-down; }
492      Mod+Shift+Ctrl+Up    { move-column-to-monitor-up; }
493      Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
494      Mod+Shift+Ctrl+H     { move-column-to-monitor-left; }
495      Mod+Shift+Ctrl+J     { move-column-to-monitor-down; }
496      Mod+Shift+Ctrl+K     { move-column-to-monitor-up; }
497      Mod+Shift+Ctrl+L     { move-column-to-monitor-right; }
498  
499      // Alternatively, there are commands to move just a single window:
500      // Mod+Shift+Ctrl+Left  { move-window-to-monitor-left; }
501      // ...
502  
503      // And you can also move a whole workspace to another monitor:
504      // Mod+Shift+Ctrl+Left  { move-workspace-to-monitor-left; }
505      // ...
506  
507      Mod+Page_Down      { focus-workspace-down; }
508      Mod+Page_Up        { focus-workspace-up; }
509      Mod+U              { focus-workspace-down; }
510      Mod+I              { focus-workspace-up; }
511      Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
512      Mod+Ctrl+Page_Up   { move-column-to-workspace-up; }
513      Mod+Ctrl+U         { move-column-to-workspace-down; }
514      Mod+Ctrl+I         { move-column-to-workspace-up; }
515  
516      // Alternatively, there are commands to move just a single window:
517      // Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
518      // ...
519  
520      Mod+Shift+Page_Down { move-workspace-down; }
521      Mod+Shift+Page_Up   { move-workspace-up; }
522      Mod+Shift+U         { move-window-to-workspace-down; }
523      Mod+Shift+I         { move-window-to-workspace-up; }
524  
525      // You can bind mouse wheel scroll ticks using the following syntax.
526      // These binds will change direction based on the natural-scroll setting.
527      //
528      // To avoid scrolling through workspaces really fast, you can use
529      // the cooldown-ms property. The bind will be rate-limited to this value.
530      // You can set a cooldown on any bind, but it's most useful for the wheel.
531      Mod+WheelScrollDown      cooldown-ms=150 { focus-workspace-down; }
532      Mod+WheelScrollUp        cooldown-ms=150 { focus-workspace-up; }
533      Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
534      Mod+Ctrl+WheelScrollUp   cooldown-ms=150 { move-column-to-workspace-up; }
535  
536      Mod+WheelScrollRight      { focus-column-right; }
537      Mod+WheelScrollLeft       { focus-column-left; }
538      Mod+Ctrl+WheelScrollRight { move-column-right; }
539      Mod+Ctrl+WheelScrollLeft  { move-column-left; }
540  
541      // Usually scrolling up and down with Shift in applications results in
542      // horizontal scrolling; these binds replicate that.
543      Mod+Shift+WheelScrollDown      { focus-column-right; }
544      Mod+Shift+WheelScrollUp        { focus-column-left; }
545      Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
546      Mod+Ctrl+Shift+WheelScrollUp   { move-column-left; }
547  
548      // Similarly, you can bind touchpad scroll "ticks".
549      // Touchpad scrolling is continuous, so for these binds it is split into
550      // discrete intervals.
551      // These binds are also affected by touchpad's natural-scroll, so these
552      // example binds are "inverted", since we have natural-scroll enabled for
553      // touchpads by default.
554      // Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; }
555      // Mod+TouchpadScrollUp   { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; }
556  
557      // You can refer to workspaces by index. However, keep in mind that
558      // niri is a dynamic workspace system, so these commands are kind of
559      // "best effort". Trying to refer to a workspace index bigger than
560      // the current workspace count will instead refer to the bottommost
561      // (empty) workspace.
562      //
563      // For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
564      // will all refer to the 3rd workspace.
565      Mod+1 { focus-workspace 1; }
566      Mod+2 { focus-workspace 2; }
567      Mod+3 { focus-workspace 3; }
568      Mod+4 { focus-workspace 4; }
569      Mod+5 { focus-workspace 5; }
570      Mod+6 { focus-workspace 6; }
571      Mod+7 { focus-workspace 7; }
572      Mod+8 { focus-workspace 8; }
573      Mod+9 { focus-workspace 9; }
574      Mod+Shift+1 { move-column-to-workspace 1; }
575      Mod+Shift+2 { move-column-to-workspace 2; }
576      Mod+Shift+3 { move-column-to-workspace 3; }
577      Mod+Shift+4 { move-column-to-workspace 4; }
578      Mod+Shift+5 { move-column-to-workspace 5; }
579      Mod+Shift+6 { move-column-to-workspace 6; }
580      Mod+Shift+7 { move-column-to-workspace 7; }
581      Mod+Shift+8 { move-column-to-workspace 8; }
582      Mod+Shift+9 { move-column-to-workspace 9; }
583  
584      // Alternatively, there are commands to move just a single window:
585      // Mod+Ctrl+1 { move-window-to-workspace 1; }
586  
587      // Switches focus between the current and the previous workspace.
588      Mod+Tab { focus-workspace-previous; }
589  
590      // The following binds move the focused window in and out of a column.
591      // If the window is alone, they will consume it into the nearby column to the side.
592      // If the window is already in a column, they will expel it out.
593      Mod+BracketLeft  { consume-or-expel-window-left; }
594      Mod+BracketRight { consume-or-expel-window-right; }
595  
596      // Consume one window from the right to the bottom of the focused column.
597      Mod+Comma  { consume-window-into-column; }
598      // Expel the bottom window from the focused column to the right.
599      Mod+Period { expel-window-from-column; }
600  
601      Mod+R { switch-preset-column-width; }
602      Mod+Shift+R { switch-preset-window-height; }
603      Mod+Ctrl+R { reset-window-height; }
604      Mod+F { maximize-column; }
605      Mod+Shift+F { fullscreen-window; }
606  
607      // Expand the focused column to space not taken up by other fully visible columns.
608      // Makes the column "fill the rest of the space".
609      Mod+Ctrl+F { expand-column-to-available-width; }
610  
611      Mod+C { center-column; }
612  
613      // Center all fully visible columns on screen.
614      Mod+Ctrl+C { center-visible-columns; }
615  
616      // Finer width adjustments.
617      // * set width in pixels: "1000"
618      // * adjust width in pixels: "-5" or "+5"
619      // * set width as a percentage of screen width: "25%"
620      // * adjust width as a percentage of screen width: "-10%" or "+10%"
621      // Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
622      // set-column-width "100" will make the column occupy 200 physical screen pixels.
623      Mod+Minus { set-column-width "-10%"; }
624      Mod+Equal { set-column-width "+10%"; }
625  
626      // Finer height adjustments when in column with other windows.
627      Mod+Shift+Minus { set-window-height "-10%"; }
628      Mod+Shift+Equal { set-window-height "+10%"; }
629  
630      // Move the focused window between the floating and the tiling layout.
631      Mod+V       { toggle-window-floating; }
632      Mod+Shift+V { switch-focus-between-floating-and-tiling; }
633  
634      // Toggle tabbed column display mode.
635      // Windows in this column will appear as vertical tabs,
636      // rather than stacked on top of each other.
637      Mod+W { toggle-column-tabbed-display; }
638  
639      // Actions to switch layouts.
640      // Note: if you uncomment these, make sure you do NOT have
641      // a matching layout switch hotkey configured in xkb options above.
642      // Having both at once on the same hotkey will break the switching,
643      // since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
644      Mod+Space       { switch-layout "next"; }
645      Mod+Shift+Space { switch-layout "prev"; }
646  
647      Print { screenshot; }
648      Ctrl+Print { screenshot-screen; }
649      Alt+Print { screenshot-window; }
650  
651      // Applications such as remote-desktop clients and software KVM switches may
652      // request that niri stops processing the keyboard shortcuts defined here
653      // so they may, for example, forward the key presses as-is to a remote machine.
654      // It's a good idea to bind an escape hatch to toggle the inhibitor,
655      // so a buggy application can't hold your session hostage.
656      //
657      // The allow-inhibiting=false property can be applied to other binds as well,
658      // which ensures niri always processes them, even when an inhibitor is active.
659      Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
660  
661      // The quit action will show a confirmation dialog to avoid accidental exits.
662      Mod+Shift+E { quit; }
663      Ctrl+Alt+Delete { quit; }
664  
665  }
666  
667  // Spawing programs at startup
668  
669  // this line is not really neccesary every time but since swww have a cache and will check its cache for similarity before processing, it doesn't really matter
670  spawn-at-startup "swww" "img" "/home/mrkrebs/.background-image" "--transition-type" "simple" "--transition-step" "255" "--transition-fps" "255" "--resize" "crop"
671  
672  spawn-at-startup "waybar"
673  
674  // this is neccesary because swww takes some time to render the wallpaper so display a static pictures of the wallpaper while swww generated the wallpaper
675  // feel free to change the sleep duration in the script if you have a beefier device
676  spawn-at-startup "bash" "/home/mrkrebs/.dotfiles/scripts/wallpaper.sh"
677  
678  spawn-at-startup "swaybg" "-m" "fill" "-i" "/home/mrkrebs/.overview-background-image"
679  spawn-at-startup "squeekboard"
680  spawn-at-startup "xwayland-satellite"
681  spawn-at-startup "gammastep" "-l" "13:122" "-t" "6500:3500" 
682  prefer-no-csd
683  
684  environment {
685    DISPLAY ":0"
686  }