From 1ed9bcc538acf28edf207af4f41ca2d2a6fd6268 Mon Sep 17 00:00:00 2001 From: Random936 Date: Sat, 11 Jul 2026 17:29:03 -0400 Subject: [PATCH] Added kanshi config to dotfiles with monitor layout --- assets/.config/kanshi/config | 28 +++++++++++++++++++++++++ assets/.config/niri/config.kdl | 37 ---------------------------------- home/headful-nixos.nix | 1 + 3 files changed, 29 insertions(+), 37 deletions(-) create mode 100644 assets/.config/kanshi/config diff --git a/assets/.config/kanshi/config b/assets/.config/kanshi/config new file mode 100644 index 0000000..4970c81 --- /dev/null +++ b/assets/.config/kanshi/config @@ -0,0 +1,28 @@ +profile docked { + # Center 4K monitor + output DP-6 { + mode 3840x2160@60.000 + position 1920,120 + scale 1.25 + } + + # Right 1080p monitor (rotated left) + output DP-7 { + mode 1920x1080@60.000 + position 3072,0 + transform 90 + } + + # Laptop screen (below) + output eDP-1 { + mode 1920x1080@144.003 + position 0,1060 + } +} + +profile undocked { + output eDP-1 { + mode 1920x1080@144.003 + position 0,0 + } +} diff --git a/assets/.config/niri/config.kdl b/assets/.config/niri/config.kdl index ea5721a..c14b403 100644 --- a/assets/.config/niri/config.kdl +++ b/assets/.config/niri/config.kdl @@ -69,43 +69,6 @@ input { 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://niri-wm.github.io/niri/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 "x" or "x@". - // 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://niri-wm.github.io/niri/Configuration:-Layout diff --git a/home/headful-nixos.nix b/home/headful-nixos.nix index 0726a7e..b9a9e5a 100644 --- a/home/headful-nixos.nix +++ b/home/headful-nixos.nix @@ -24,6 +24,7 @@ ]; home.file = { + ".config/kanshi/config".source = ../assets/.config/kanshi/config; ".config/niri/config.kdl".source = ../assets/.config/niri/config.kdl; ".config/fuzzel/fuzzel.ini".source = ../assets/.config/fuzzel/fuzzel.ini; ".config/alacritty/alacritty.toml".source = ../assets/.config/alacritty/alacritty.toml;