Elaborate set up for work
This commit is contained in:
parent
8860ed52da
commit
a6e46307b0
|
@ -8,12 +8,12 @@ let
|
|||
"work" = {
|
||||
name = "LG Electronics LG ULTRAFINE 301MAXSGHD10";
|
||||
mode = "3840x2160@60Hz";
|
||||
scale = "1.25";
|
||||
scale = 1.25;
|
||||
};
|
||||
"home_4k" = {
|
||||
name = "AOC U28G2G6B PPYP2JA000013";
|
||||
mode = "3840x2160@60Hz";
|
||||
scale = mkDefault "1.5";
|
||||
scale = 1.5;
|
||||
adaptive_sync = "on";
|
||||
# render_bit_depth = "10";
|
||||
};
|
||||
|
@ -33,7 +33,9 @@ let
|
|||
|
||||
eachMonitor = _name: monitor: {
|
||||
name = monitor.name;
|
||||
value = builtins.removeAttrs monitor [ "name" ];
|
||||
value = builtins.removeAttrs monitor [ "scale" "name" ] // (if monitor ? scale then {
|
||||
scale = toString monitor.scale;
|
||||
} else { });
|
||||
};
|
||||
in
|
||||
{
|
||||
|
@ -44,7 +46,7 @@ in
|
|||
config.common.monitors = monitors;
|
||||
config.home.packages = mkIf config.wayland.windowManager.sway.enable (with pkgs; [ kanshi ]);
|
||||
config.wayland.windowManager.sway.config.output = mkIf config.wayland.windowManager.sway.enable (
|
||||
mapAttrs' eachMonitor monitors
|
||||
mapAttrs' eachMonitor config.common.monitors
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -82,12 +82,12 @@
|
|||
};
|
||||
|
||||
# Multiple screen setup
|
||||
services.kanshi = {
|
||||
services.kanshi = with config.common.monitors; {
|
||||
enable = true;
|
||||
profiles.undocked.outputs = [{ criteria = "LVDS-1"; }];
|
||||
profiles.work-both.outputs = [
|
||||
{ criteria = "eDP-1"; position = "0,0"; status = "enable"; }
|
||||
{ criteria = config.common.monitors.work.name; position = "1920,0"; }
|
||||
{ criteria = "eDP-1"; position = "0,${toString (builtins.floor ((2160 / work.scale - 1200) + 1200 / 3))}"; status = "enable"; }
|
||||
{ criteria = work.name; position = "1920,0"; }
|
||||
];
|
||||
profiles.work-one.outputs = [
|
||||
{ criteria = "eDP-1"; status = "disable"; }
|
||||
|
|
Loading…
Reference in a new issue