mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19: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, ... }:
|
||||
"for_window ${criteriaStr criteria} ${command}";
|
||||
workspaceOutputStr = item:
|
||||
''workspace "${item.workspace}" output "${item.output}"'';
|
||||
let outputs = concatMapStringsSep " " strings.escapeNixString item.output;
|
||||
in ''workspace "${item.workspace}" output ${outputs}'';
|
||||
|
||||
indent = list:
|
||||
{ includesWrapper ? true, level ? 1 }:
|
||||
|
|
|
@ -912,11 +912,12 @@ in {
|
|||
};
|
||||
|
||||
output = mkOption {
|
||||
type = str;
|
||||
type = with types; either str (listOf str);
|
||||
default = "";
|
||||
apply = lists.toList;
|
||||
example = "eDP";
|
||||
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
|
||||
</command>.
|
||||
'';
|
||||
|
|
|
@ -98,3 +98,4 @@ workspace "1" output "eDP"
|
|||
workspace "ABC" output "DP"
|
||||
workspace "3: Test" output "HDMI"
|
||||
workspace "!"§$%&/(){}[]=?\*#<>-_.:,;²³" output "DVI"
|
||||
workspace "Multiple" output "DVI" "HDMI" "DP"
|
||||
|
|
|
@ -6,6 +6,7 @@ let
|
|||
ws2 = "ABC";
|
||||
ws3 = "3: Test";
|
||||
ws4 = ''!"§$%&/(){}[]=?\*#<>-_.:,;²³'';
|
||||
ws5 = "Multiple";
|
||||
};
|
||||
|
||||
in {
|
||||
|
@ -31,6 +32,10 @@ in {
|
|||
workspace = "${i3.ws4}";
|
||||
output = "DVI";
|
||||
}
|
||||
{
|
||||
workspace = "${i3.ws5}";
|
||||
output = [ "DVI" "HDMI" "DP" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -107,4 +107,5 @@ workspace "1" output "eDP"
|
|||
workspace "ABC" output "DP"
|
||||
workspace "3: Test" output "HDMI"
|
||||
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"
|
||||
|
|
|
@ -6,6 +6,7 @@ let
|
|||
ws2 = "ABC";
|
||||
ws3 = "3: Test";
|
||||
ws4 = ''!"§$%&/(){}[]=?\*#<>-_.:,;²³'';
|
||||
ws5 = "Multiple";
|
||||
};
|
||||
|
||||
in {
|
||||
|
@ -34,6 +35,10 @@ in {
|
|||
workspace = "${i3.ws4}";
|
||||
output = "DVI";
|
||||
}
|
||||
{
|
||||
workspace = "${i3.ws5}";
|
||||
output = [ "DVI" "HDMI" "DP" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue