@@ -2,13 +2,35 @@
// "/-" comments out the following node.
// "/-" comments out the following node.
// Check the wiki for a full description of the configuration:
// Check the wiki for a full description of the configuration:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview
// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview
// ==== Display ====
environment {
environment {
DISPLAY ":0"
DISPLAY ":0"
}
}
spawn-at-startup "xwayland-satellite"
spawn-at-startup "xwayland-satellite"
// `niri msg outputs`
// Built-in laptop monitor: "eDP-1"
// HDMI out display:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
output "eDP-1" {
// Format: "<width>x<height>" or "<width>x<height>@<refresh rate>".
// If the refresh rate is omitted, niri will pick the highest refresh rate
mode "1920x1080@60"
scale 1
transform "normal"
// normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270.
position x=0 y=0
// Output scale and rotation has to be taken into account for positioning:
// outputs are sized in logical, or scaled, pixels.
// E.g.: 3840× 2160 + scale 2.0 = 1920× 1080 logical size
// Use logical size to set position
}
// Input device configuration.
// Input device configuration.
// Find the full list of options on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
input {
input {
keyboard {
keyboard {
@@ -16,10 +38,8 @@ input {
layout "us"
layout "us"
variant "altgr-intl"
variant "altgr-intl"
// You can set rules, model, layout, variant and options.
// You can set rules, model, layout, variant and options.
// For more information, s ee xkeyboard-config(7).
// S ee xkeyboard-config(7).
// For example:
// layout "us,ru"
// options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
// options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
}
}
}
}
@@ -58,66 +78,26 @@ input {
}
}
// Uncomment this to make the mouse warp to the center of newly focused windows.
// Uncomment this to make the mouse warp to the center of newly focused windows.
// warp-mouse-to-focus
warp-mouse-to-focus
// Focus windows and outputs automatically when moving the mouse into them.
// Focus windows and outputs automatically when moving the mouse into them.
// Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
// Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
// focus-follows-mouse max-scroll-amount="0%"
// focus-follows-mouse max-scroll-amount="0%"
}
}
// You can configure outputs by their name, which you can find
// ==== LAYOUT ====
// by running `niri msg outputs` while inside a niri instance.
// The built-in laptop monitor is usually called "eDP-1".
// Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
// Remember to uncomment the node by removing "/-"!
/-output "eDP-1" {
// Uncomment this line to disable this output.
// off
// Resolution and, optionally, refresh rate of the output.
// The format is "<width>x<height>" or "<width>x<height>@<refresh rate>".
// If the refresh rate is omitted, niri will pick the highest refresh rate
// for the resolution.
// If the mode is omitted altogether or is invalid, niri will pick one automatically.
// Run `niri msg outputs` while inside a niri instance to list all outputs and their modes.
mode "1920x1080@120.030"
// You can use integer or fractional scale, for example use 1.5 for 150% scale.
scale 2
// Transform allows to rotate the output counter-clockwise, valid values are:
// normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270.
transform "normal"
// Position of the output in the global coordinate space.
// This affects directional monitor actions like "focus-monitor-left", and cursor movement.
// The cursor can only move between directly adjacent outputs.
// Output scale and rotation has to be taken into account for positioning:
// outputs are sized in logical, or scaled, pixels.
// For example, a 3840× 2160 output with scale 2.0 will have a logical size of 1920× 1080,
// so to put another output directly adjacent to it on the right, set its x to 1920.
// If the position is unset or results in an overlap, the output is instead placed
// automatically.
position x=1280 y=0
}
// Settings that influence how windows are positioned and sized.
// Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
layout {
layout {
// Set gaps around windows in logical pixels.
gaps 12 // logical pixel
gaps 12
// When to center a column when changing focus, options are:
// - "never", default behavior, focusing an off-screen column will keep at the left
// or right edge of the screen.
// - "always", the focused column will always be centered.
// - "on-overflow", focusing a column will center it if it doesn't fit
// together with the previously focused column.
center-focused-column "never"
center-focused-column "never"
// "never" (default): focusing an off-screen column will keep
// at the left or right edge of the screen.
// "always": the focused column will always be centered.
// "on-overflow": focusing a column will center it if it doesn't fit
// together with the previously focused column.
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
// Mod+R resize layout behaviors
preset-column-widths {
preset-column-widths {
// Proportion sets the width as a fraction of the output width, taking gaps into account.
// Proportion sets the width as a fraction of the output width, taking gaps into account.
// For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
// For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
@@ -125,17 +105,15 @@ layout {
proportion 0.33333
proportion 0.33333
proportion 0.5
proportion 0.5
proportion 0.66667
proportion 0.66667
// Mod+F for full-width
// Fixed sets the width in logical pixels exactly.
// fixed 1920
// fixed 1920
}
}
// Mod+Shift+R
preset-window-heights {
proportion 0.5
}
// You can also customize the heights that "switch-preset-window-height" (Mod+Shift+R) toggles between .
// The windows themselves will decide their initial width .
// preset-window-heights { }
// You can change the default width of the new windows.
default-column-width { proportion 0.5; }
// If you leave the brackets empty, the windows themselves will decide their initial width.
// default-column-width {}
// default-column-width {}
// By default focus ring and border are rendered as a solid background rectangle
// By default focus ring and border are rendered as a solid background rectangle
@@ -151,30 +129,16 @@ layout {
// You can change how the focus ring looks.
// You can change how the focus ring looks.
focus-ring {
focus-ring {
// U ncomment this line to disable the focus ring.
// off // u ncomment to disable focus ring
// off
width 4
// How many logical pixels the ring extends out from the windows .
// CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl(), etc .
width 2
active-color "#2475bcaa"
// Colors can be set in a variety of ways:
// - CSS named colors: "red"
// - RGB hex: "#rgb", "#rgba", "#rrggbb", "#rrggbbaa"
// - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others.
// Color of the ring on the active monitor.
active-color "#4343bcaa"
// Color of the ring on inactive monitors.
inactive-color "#505050"
inactive-color "#505050"
// You can also use g radients. They take precedence over solid colors.
// G radients ( take precedence over solid colors)
// Gradients are rendered the same as CSS linear-gradient(angle, from, to).
// - same syntax as CSS: linear-gradient(angle, from, to).
// The angle is the same as in linear-gradient, and is optional,
// - use any CSS linear-gradient tool to set these up.
// defaulting to 180 (top-to-bottom gradient).
// You can use any CSS linear-gradient tool on the web to set these up.
// Changing the color space is also supported, check the wiki for more info.
//
// active-gradient from="#80c8ff" to="#bbddff" angle=45
// active-gradient from="#80c8ff" to="#bbddff" angle=45
// You can also color the gradient relative to the entire view
// You can also color the gradient relative to the entire view
@@ -184,7 +148,6 @@ layout {
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
}
}
// You can also add a border. It's similar to the focus ring, but always visible.
border {
border {
// The settings are the same as for the focus ring.
// The settings are the same as for the focus ring.
// If you enable the border, you probably want to disable the focus ring.
// If you enable the border, you probably want to disable the focus ring.
@@ -204,8 +167,6 @@ layout {
// on
// on
// By default, the shadow draws only around its window, and not behind it.
// By default, the shadow draws only around its window, and not behind it.
// Uncomment this setting to make the shadow draw behind its window.
//
// Note that niri has no way of knowing about the CSD window corner
// Note that niri has no way of knowing about the CSD window corner
// radius. It has to assume that windows have square corners, leading to
// radius. It has to assume that windows have square corners, leading to
// shadow artifacts inside the CSD rounded corners. This setting fixes
// shadow artifacts inside the CSD rounded corners. This setting fixes
@@ -222,16 +183,9 @@ layout {
// You can change how shadows look. The values below are in logical
// You can change how shadows look. The values below are in logical
// pixels and match the CSS box-shadow properties.
// pixels and match the CSS box-shadow properties.
// Softness controls the shadow blur radius.
softness 30
softness 30
spread 5 // Spread expands the shadow.
// Spread expands the shadow.
spread 5
// Offset moves the shadow relative to the window.
offset x=0 y=5
offset x=0 y=5
// You can also change the shadow color and opacity.
color "#0007"
color "#0007"
}
}
@@ -320,7 +274,7 @@ window-rule {
// Example: enable rounded corners for all windows.
// Example: enable rounded corners for all windows.
// (This example rule is commented out with a "/-" in front.)
// (This example rule is commented out with a "/-" in front.)
/- window-rule {
window-rule {
geometry-corner-radius 12
geometry-corner-radius 12
clip-to-geometry true
clip-to-geometry true
}
}
@@ -341,7 +295,7 @@ binds {
Mod+Shift+Slash { show-hotkey-overlay; }
Mod+Shift+Slash { show-hotkey-overlay; }
// Suggested binds for running programs: terminal, app launcher, screen locker.
// Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+T { spawn "alacritty"; }
Mod+Return { spawn "alacritty"; }
Mod+D { spawn "wofi"; }
Mod+D { spawn "wofi"; }
Super+Alt+L { spawn "swaylock"; }
Super+Alt+L { spawn "swaylock"; }