From 15eb37ffb6c79f2e03c7b39ddb69b86dd5d809f6 Mon Sep 17 00:00:00 2001 From: beanigen Date: Fri, 27 Jun 2025 20:54:29 +0800 Subject: [PATCH] kanshi --- home/default.nix | 19 +++++++++++++++++++ home/niri.nix | 39 +-------------------------------------- 2 files changed, 20 insertions(+), 38 deletions(-) diff --git a/home/default.nix b/home/default.nix index 322dd4e..9bcef9c 100644 --- a/home/default.nix +++ b/home/default.nix @@ -85,6 +85,25 @@ }; }; }; + services.kanshi = { + enable = true; + settings = [ + { + profile.name = "maya-desktop"; + profile.outputs = [ + { criteria = "Dell Inc. DELL P2411H MGMHG1681VAU"; position = "0,1050"; } + { criteria = "Samsung Electric Company SyncMaster HMDQ202016"; position = "0,0"; } + ]; + } + { + profile.name = "alyx-desktop"; + profile.outputs = [ + { criteria = "Something Something I Suppose"; position = "0,0"; } + { criteria = "I Suppose Yeah"; position = "0,0"; } + ]; + } + ]; + }; programs.obs-studio = { enable = true; diff --git a/home/niri.nix b/home/niri.nix index 30e4bad..198e7ba 100644 --- a/home/niri.nix +++ b/home/niri.nix @@ -249,49 +249,12 @@ # moving the mouse or pressing any other key. "Mod+Shift+P".action.power-off-monitors = {}; }; - outputs = (if vars.user == "alyx" then { - DP-1 = { - mode = { - height = 1080; - refresh = 239.76; - width = 1920; - }; - position = { - x = 2560; - y = 0; - }; - }; - DP-4 = { - mode = { - height = 1080; - refresh = 75.0; - width = 2560; - }; - position = { - x = 0; - y = 0; - }; - }; - } - else { - DP-1 = { - mode = { - height = 1080; - refresh = 239.76; - width = 1920; - }; - position = { - x = 2560; - y = 0; - }; - }; - }); spawn-at-startup = [ {command = ["waybar"];} {command = ["xwayland-satellite"];} {command = if vars.user == "alyx" then ["swaybg" "-m" "fill" "-i" "/home/${vars.user}/.config/nixos/assets/scenes.jpg"] else ["swaybg" "-m" "fill" "-i" "/home/${vars.user}/.config/nixos/assets/scenes.jpg"];} {command = ["udiskie" "--appindicator"];} - {command = [ "systemctl" "--user" "restart" "xdg-desktop-portal-gnome.service"];} + {command = ["kanshi"];} ]; environment = { DISPLAY = ":0";