sway: Finally get my multi-monitor setup fixed

This commit is contained in:
fleaz 2025-02-18 22:16:22 +01:00
parent 8cfe753e4e
commit 5b3e6d859b
No known key found for this signature in database
GPG key ID: 935474624265FE8F
2 changed files with 47 additions and 41 deletions

View file

@ -1,15 +1,18 @@
{ nixosConfig, ... }: { nixosConfig, ... }:
let let
machines = { machines = {
smithers = [{ smithers = [
profile.name = "laptop-only"; {
profile.outputs = [ profile.name = "laptop-only";
{ profile.outputs = [
criteria = "eDP-1"; {
scale = 1.3; criteria = "eDP-1";
} status = "enable";
]; scale = 1.3;
} mode = "2256x1504@59.999Hz";
}
];
}
{ {
profile.name = "homeoffice"; profile.name = "homeoffice";
profile.outputs = [ profile.outputs = [
@ -18,17 +21,20 @@ let
status = "disable"; status = "disable";
} }
{ {
criteria = "DP-10"; criteria = "Samsung Electric Company U28E590 HTPJ109320";
scale = 1.3; scale = 1.4;
position = "0,0"; position = "0,0";
mode = "3840x2160@60.000Hz";
} }
{ {
criteria = "DP-9"; criteria = "Samsung Electric Company U28E590 HTPM402579";
scale = 1.3; scale = 1.4;
position = "2952,0"; position = "2743,0";
mode = "3840x2160@60.000Hz";
} }
]; ];
}]; }
];
}; };
in in
{ {

View file

@ -16,36 +16,36 @@ in
focus.followMouse = false; focus.followMouse = false;
input = { input = {
"type:keyboard" = { xkb_layout = "eu"; }; "type:keyboard" = {
"type:mouse" = { pointer_accel = "-1"; }; xkb_layout = "eu";
"type:touchpad" = { tap = "enabled"; }; };
"1:1:AT_Translated_Set_2_keyboard" = { "type:mouse" = {
# Remap borken ctrl key on internal keyboard for XPS pointer_accel = "-1";
xkb_options = "caps:ctrl_modifier"; };
"type:touchpad" = {
tap = "enabled";
}; };
}; };
output = { output =
"*".bg = "/etc/nixos/wallpaper.jpg fill"; {
} // lib.optionalAttrs (nixosConfig.networking.hostName == "cray") { "*".bg = "/etc/nixos/wallpaper.jpg fill";
"DP-1" = { }
mode = "3840x2160"; // lib.optionalAttrs (nixosConfig.networking.hostName == "cray") {
scale = "1.3"; "DP-1" = {
position = "0,0"; mode = "3840x2160";
scale = "1.3";
position = "0,0";
};
"DP-3" = {
mode = "3840x2160";
scale = "1.3";
position = "2953,0";
};
}; };
"DP-3" = {
mode = "3840x2160";
scale = "1.3";
position = "2953,0";
};
} // lib.optionalAttrs (nixosConfig.networking.hostName == "smithers") {
"eDP-1" = {
mode = "2256x1504";
scale = "1.2";
position = "0,0";
};
};
gaps = { inner = 5; }; gaps = {
inner = 5;
};
window.border = 2; window.border = 2;
window.hideEdgeBorders = "smart"; window.hideEdgeBorders = "smart";
workspaceAutoBackAndForth = true; workspaceAutoBackAndForth = true;