home-manager/xps.nix

67 lines
2.3 KiB
Nix
Raw Normal View History

2024-07-12 20:25:03 +00:00
{ pkgs, ... }:
let
swaymsg = "${pkgs.sway}/bin/swaymsg";
acer_left = "Acer Technologies Acer PE270K 0x0027A130";
acer_right = "Acer Technologies Acer PE270K 0x0027A150";
in
2024-07-09 19:58:33 +00:00
{
services.kanshi = {
enable = true;
settings = [
{
profile = {
name = "undocked";
outputs = [
{
criteria = "eDP-1";
scale = 1.3;
status = "enable";
}
];
};
}
{
profile = {
name = "home_office";
outputs = [
{
2024-07-12 20:25:03 +00:00
criteria = acer_left;
2024-07-09 19:58:33 +00:00
mode = "3840x2160";
scale = 1.75;
status = "enable";
position = "0,0";
transform = "normal";
}
{
2024-07-12 20:25:03 +00:00
criteria = acer_right;
2024-07-09 19:58:33 +00:00
mode = "3840x2160";
scale = 1.75;
status = "enable";
position = "2194,0";
transform = "normal";
}
{
criteria = "eDP-1";
status = "disable";
}
];
exec = ''
2024-07-12 20:25:03 +00:00
exec ${swaymsg} workspace 10 output '"${acer_left}"', workspace 10, move workspace to output '"${acer_left}"'
exec ${swaymsg} workspace 8 output '"${acer_left}"', workspace 8, move workspace to output '"${acer_left}"'
exec ${swaymsg} workspace 6 output '"${acer_left}"', workspace 6, move workspace to output '"${acer_left}"'
exec ${swaymsg} workspace 4 output '"${acer_left}"', workspace 4, move workspace to output '"${acer_left}"'
exec ${swaymsg} workspace 2 output '"${acer_left}"', workspace 2, move workspace to output '"${acer_left}"'
2024-07-09 19:58:33 +00:00
2024-07-12 20:25:03 +00:00
exec ${swaymsg} workspace 9 output '"${acer_right}"', workspace 9, move workspace to output '"${acer_right}"'
exec ${swaymsg} workspace 7 output '"${acer_right}"', workspace 7, move workspace to output '"${acer_right}"'
exec ${swaymsg} workspace 5 output '"${acer_right}"', workspace 5, move workspace to output '"${acer_right}"'
exec ${swaymsg} workspace 3 output '"${acer_right}"', workspace 3, move workspace to output '"${acer_right}"'
exec ${swaymsg} workspace 1 output '"${acer_right}"', workspace 1, move workspace to output '"${acer_right}"'
2024-07-09 19:58:33 +00:00
'';
};
}
];
};
}