added ensure-niri script

This commit is contained in:
2025-09-20 23:11:02 +02:00
parent df51925710
commit 341f5fdff7
2 changed files with 49 additions and 3 deletions

View File

@@ -31,9 +31,9 @@ input {
// drag false // drag false
// drag-lock // drag-lock
natural-scroll natural-scroll
// accel-speed 0.2 accel-speed 0.3
// accel-profile "flat" accel-profile "flat"
// scroll-method "two-finger" scroll-method "two-finger"
// disabled-on-external-mouse // disabled-on-external-mouse
} }
@@ -101,6 +101,38 @@ output "DP-2" {
// automatically. // automatically.
position x=0 y=0 position x=0 y=0
} }
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 "2520x1680@90.000"
// You can use integer or fractional scale, for example use 1.5 for 150% scale.
scale 1.65
// 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=0 y=0
}
output "HDMI-A-1" { output "HDMI-A-1" {
// Uncomment this line to disable this output. // Uncomment this line to disable this output.
// off // off
@@ -290,6 +322,7 @@ layout {
// This line starts waybar, a commonly used bar for Wayland compositors. // This line starts waybar, a commonly used bar for Wayland compositors.
spawn-at-startup "waybar" spawn-at-startup "waybar"
spawn-at-startup "iwqt"
// Uncomment this line to ask the clients to omit their client-side decorations if possible. // Uncomment this line to ask the clients to omit their client-side decorations if possible.
// If the client will specifically ask for CSD, the request will be honored. // If the client will specifically ask for CSD, the request will be honored.

13
niri/ensure-niri Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
user_home=$(bash -c "cd ~$(printf %q "$USER") && pwd")
configfile="$user_home/.config/niri/config.kdl"
if [ ! -L ${configfile} ] && [ -f ${configfile} ] ; then
echo Backing up existin config to $configfile.bak
mv $configfile $configfile.bak
echo Linking
ln -s $user_home/dotfiles/niri/config.kdl $configfile
fi
if [ ! -f ${configfile} ]; then
echo Linking
ln -s $user_home/dotfiles/niri/config.kdl $configfile
fi