From 1e229c2d1fda4fcb021cb3d7758474b1f780b81f Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 30 May 2024 11:49:10 +0100 Subject: [PATCH] Enable work laptop screen when docked --- home/Tone.nix | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/home/Tone.nix b/home/Tone.nix index c8e1703..06f3ecb 100644 --- a/home/Tone.nix +++ b/home/Tone.nix @@ -1,34 +1,33 @@ {...}: { imports = [./work.nix]; wayland.windowManager.sway.config.output = { - "eDP-1".scale = "1.25"; - "Dell Inc. DELL P3223QE CCG8YN3".scale = "1.5"; + "eDP-1" = { + scale = "1.25"; + position = "2560 576"; + }; + "Dell Inc. DELL P3223QE CCG8YN3" = { + scale = "1.5"; + position = "0 0"; + }; }; services.kanshi = { enable = true; systemdTarget = "sway-session.target"; - profiles = { + profiles = let + laptopScreen = { + criteria = "eDP-1"; + status = "enable"; + }; + monitor = { + criteria = "Dell Inc. DELL P3223QE CCG8YN3"; + status = "enable"; + }; + in { undocked = { - outputs = [ - { - criteria = "eDP-1"; - status = "enable"; - scale = 1.25; - } - ]; + outputs = [laptopScreen]; }; docked = { - outputs = [ - { - criteria = "Dell Inc. DELL P3223QE CCG8YN3"; - status = "enable"; - scale = 1.5; - } - { - criteria = "eDP-1"; - status = "disable"; - } - ]; + outputs = [monitor laptopScreen]; }; }; };