Slowly moving to niri

This commit is contained in:
Antoine Phan
2025-05-23 21:52:47 -04:00
parent 7ef435d357
commit 986b8cbaed
4 changed files with 54 additions and 109 deletions

View File

@@ -95,7 +95,7 @@
frame_width = 2
# Defines color of the frame around the notification window.
frame_color = "#d7c7ebaa"
frame_color = "#aabbbbbb"
# Size of gap to display between notifications - requires a compositor.
# If value is greater than 0, separator_height will be ignored and a border

View File

@@ -1,16 +1,16 @@
sort=-time
layer=overlay
background-color=#2e3440
width=400
width=480
height=120
border-size=2
border-color=#82c0d0
border-radius=20
border-color=#bac0d0
border-radius=12
icons=1
max-icon-size=64
default-timeout=5000
ignore-timeout=1
font=Fira Code 12
font=Assistant Bold 12
[urgency=low]
border-color=#cccccc

View File

@@ -2,13 +2,35 @@
// "/-" comments out the following node.
// Check the wiki for a full description of the configuration:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview
// ==== Display ====
environment {
DISPLAY ":0"
}
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.
// Find the full list of options on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
input {
keyboard {
@@ -16,10 +38,8 @@ input {
layout "us"
variant "altgr-intl"
// You can set rules, model, layout, variant and options.
// For more information, see xkeyboard-config(7).
// See xkeyboard-config(7).
// For example:
// layout "us,ru"
// 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.
// warp-mouse-to-focus
warp-mouse-to-focus
// 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.
// focus-follows-mouse max-scroll-amount="0%"
}
// You can configure outputs by their name, which you can find
// 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:
// ==== LAYOUT ====
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
layout {
// Set gaps around windows in logical pixels.
gaps 12
gaps 12 // logical pixel
// 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"
// "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 {
// 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.
@@ -125,17 +105,15 @@ layout {
proportion 0.33333
proportion 0.5
proportion 0.66667
// Fixed sets the width in logical pixels exactly.
// Mod+F for full-width
// 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.
// 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.
// The windows themselves will decide their initial width.
// default-column-width {}
// 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.
focus-ring {
// Uncomment this line to disable the focus ring.
// off
// off // uncomment to disable focus ring
width 4
// How many logical pixels the ring extends out from the windows.
width 2
// 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.
// CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl(), etc.
active-color "#2475bcaa"
inactive-color "#505050"
// You can also use gradients. They take precedence over solid colors.
// Gradients are rendered the same as CSS linear-gradient(angle, from, to).
// The angle is the same as in linear-gradient, and is optional,
// 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.
//
// Gradients (take precedence over solid colors)
// - same syntax as CSS: linear-gradient(angle, from, to).
// - use any CSS linear-gradient tool to set these up.
// active-gradient from="#80c8ff" to="#bbddff" angle=45
// 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"
}
// You can also add a border. It's similar to the focus ring, but always visible.
border {
// The settings are the same as for the focus ring.
// If you enable the border, you probably want to disable the focus ring.
@@ -204,8 +167,6 @@ layout {
// on
// 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
// radius. It has to assume that windows have square corners, leading to
// 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
// pixels and match the CSS box-shadow properties.
// Softness controls the shadow blur radius.
softness 30
// Spread expands the shadow.
spread 5
// Offset moves the shadow relative to the window.
spread 5 // Spread expands the shadow.
offset x=0 y=5
// You can also change the shadow color and opacity.
color "#0007"
}
@@ -320,7 +274,7 @@ window-rule {
// Example: enable rounded corners for all windows.
// (This example rule is commented out with a "/-" in front.)
/-window-rule {
window-rule {
geometry-corner-radius 12
clip-to-geometry true
}
@@ -341,7 +295,7 @@ binds {
Mod+Shift+Slash { show-hotkey-overlay; }
// Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+T { spawn "alacritty"; }
Mod+Return { spawn "alacritty"; }
Mod+D { spawn "wofi"; }
Super+Alt+L { spawn "swaylock"; }

View File

@@ -43,15 +43,6 @@
"niri/workspaces": {
"format": "{icon}",
"format-icons": {
// Named workspaces
// (you need to configure them in niri)
"browser": "",
"discord": "",
"chat": "<b></b>",
// Icons by state
"active": "",
"default": ""
}
},