mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01:00
i3-sway: multiple outputs (#4223)
multiple outputs can be assigned to a workspace
This commit is contained in:
parent
d2e47de536
commit
f63b39a67d
6 changed files with 17 additions and 3 deletions
|
@ -150,7 +150,8 @@ rec {
|
||||||
windowCommandsStr = { command, criteria, ... }:
|
windowCommandsStr = { command, criteria, ... }:
|
||||||
"for_window ${criteriaStr criteria} ${command}";
|
"for_window ${criteriaStr criteria} ${command}";
|
||||||
workspaceOutputStr = item:
|
workspaceOutputStr = item:
|
||||||
''workspace "${item.workspace}" output "${item.output}"'';
|
let outputs = concatMapStringsSep " " strings.escapeNixString item.output;
|
||||||
|
in ''workspace "${item.workspace}" output ${outputs}'';
|
||||||
|
|
||||||
indent = list:
|
indent = list:
|
||||||
{ includesWrapper ? true, level ? 1 }:
|
{ includesWrapper ? true, level ? 1 }:
|
||||||
|
|
|
@ -912,11 +912,12 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
output = mkOption {
|
output = mkOption {
|
||||||
type = str;
|
type = with types; either str (listOf str);
|
||||||
default = "";
|
default = "";
|
||||||
|
apply = lists.toList;
|
||||||
example = "eDP";
|
example = "eDP";
|
||||||
description = ''
|
description = ''
|
||||||
Name of the output from <command>
|
Name(s) of the output(s) from <command>
|
||||||
${if isSway then "swaymsg" else "i3-msg"} -t get_outputs
|
${if isSway then "swaymsg" else "i3-msg"} -t get_outputs
|
||||||
</command>.
|
</command>.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -98,3 +98,4 @@ workspace "1" output "eDP"
|
||||||
workspace "ABC" output "DP"
|
workspace "ABC" output "DP"
|
||||||
workspace "3: Test" output "HDMI"
|
workspace "3: Test" output "HDMI"
|
||||||
workspace "!"§$%&/(){}[]=?\*#<>-_.:,;²³" output "DVI"
|
workspace "!"§$%&/(){}[]=?\*#<>-_.:,;²³" output "DVI"
|
||||||
|
workspace "Multiple" output "DVI" "HDMI" "DP"
|
||||||
|
|
|
@ -6,6 +6,7 @@ let
|
||||||
ws2 = "ABC";
|
ws2 = "ABC";
|
||||||
ws3 = "3: Test";
|
ws3 = "3: Test";
|
||||||
ws4 = ''!"§$%&/(){}[]=?\*#<>-_.:,;²³'';
|
ws4 = ''!"§$%&/(){}[]=?\*#<>-_.:,;²³'';
|
||||||
|
ws5 = "Multiple";
|
||||||
};
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
@ -31,6 +32,10 @@ in {
|
||||||
workspace = "${i3.ws4}";
|
workspace = "${i3.ws4}";
|
||||||
output = "DVI";
|
output = "DVI";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
workspace = "${i3.ws5}";
|
||||||
|
output = [ "DVI" "HDMI" "DP" ];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -107,4 +107,5 @@ workspace "1" output "eDP"
|
||||||
workspace "ABC" output "DP"
|
workspace "ABC" output "DP"
|
||||||
workspace "3: Test" output "HDMI"
|
workspace "3: Test" output "HDMI"
|
||||||
workspace "!"§$%&/(){}[]=?\*#<>-_.:,;²³" output "DVI"
|
workspace "!"§$%&/(){}[]=?\*#<>-_.:,;²³" output "DVI"
|
||||||
|
workspace "Multiple" output "DVI" "HDMI" "DP"
|
||||||
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL; systemctl --user start sway-session.target"
|
exec "/nix/store/00000000000000000000000000000000-dbus/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL; systemctl --user start sway-session.target"
|
||||||
|
|
|
@ -6,6 +6,7 @@ let
|
||||||
ws2 = "ABC";
|
ws2 = "ABC";
|
||||||
ws3 = "3: Test";
|
ws3 = "3: Test";
|
||||||
ws4 = ''!"§$%&/(){}[]=?\*#<>-_.:,;²³'';
|
ws4 = ''!"§$%&/(){}[]=?\*#<>-_.:,;²³'';
|
||||||
|
ws5 = "Multiple";
|
||||||
};
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
@ -34,6 +35,10 @@ in {
|
||||||
workspace = "${i3.ws4}";
|
workspace = "${i3.ws4}";
|
||||||
output = "DVI";
|
output = "DVI";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
workspace = "${i3.ws5}";
|
||||||
|
output = [ "DVI" "HDMI" "DP" ];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue