hyprland: make workspaces host-defined
This commit is contained in:
@@ -56,13 +56,14 @@ in
|
||||
description = "Monitor names for hyprlock backgrounds (null for all monitors)";
|
||||
};
|
||||
|
||||
workspaceStrategy = mkOption {
|
||||
type = types.enum [
|
||||
"numbered"
|
||||
"named"
|
||||
extraWorkspaces = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
example = [
|
||||
"1, monitor:eDP-1, persistent:true, default:true"
|
||||
"2, monitor:eDP-1, persistent:true"
|
||||
];
|
||||
default = "numbered";
|
||||
description = "Workspace naming strategy: numbered (1-6) or named per monitor";
|
||||
description = "Extra workspace definitions for Hyprland";
|
||||
};
|
||||
|
||||
monitorVariables = mkOption {
|
||||
@@ -281,22 +282,8 @@ in
|
||||
];
|
||||
|
||||
workspace =
|
||||
if cfg.workspaceStrategy == "named" then
|
||||
[
|
||||
"name:T1, monitor:$mon_top, persistent:true, default:true"
|
||||
"name:T2, monitor:$mon_top, persistent:true, default:false"
|
||||
"name:L1, monitor:$mon_left, persistent:true, default:true"
|
||||
"name:L2, monitor:$mon_left, persistent:true, default:false"
|
||||
"name:R1, monitor:$mon_right, persistent:true, default:true"
|
||||
"name:R2, monitor:$mon_right, persistent:true, default:false"
|
||||
"name:c1, monitor:$mon_center, persistent:true, default:true"
|
||||
"name:c2, monitor:$mon_center, persistent:true, default:false"
|
||||
"name:c3, monitor:$mon_center, persistent:true, default:false"
|
||||
"name:c4, monitor:$mon_center, persistent:true, default:false"
|
||||
"special:special, on-created-empty:kitty, rounding:true, decorate:false, border:false"
|
||||
]
|
||||
else
|
||||
[ "special:special, on-created-empty:kitty, rounding:true, decorate:false, border:false" ];
|
||||
[ "special:special, on-created-empty:kitty, rounding:true, decorate:false, border:false" ]
|
||||
++ cfg.extraWorkspaces;
|
||||
|
||||
bindm = [
|
||||
"$mainMod,mouse:272,movewindow"
|
||||
@@ -335,38 +322,6 @@ in
|
||||
"$shiftMainMod,o,exec, hl-no-opacity"
|
||||
]
|
||||
++ cfg.extraKeybinds
|
||||
++ (
|
||||
if cfg.workspaceStrategy == "numbered" then
|
||||
[
|
||||
"$mainMod,1,workspace,1"
|
||||
"$mainMod,2,workspace,2"
|
||||
"$mainMod,3,workspace,3"
|
||||
"$mainMod,4,workspace,4"
|
||||
"$mainMod,5,workspace,5"
|
||||
"$mainMod,6,workspace,6"
|
||||
"$shiftMainMod,1,movetoworkspace,1"
|
||||
"$shiftMainMod,2,movetoworkspace,2"
|
||||
"$shiftMainMod,3,movetoworkspace,3"
|
||||
"$shiftMainMod,4,movetoworkspace,4"
|
||||
"$shiftMainMod,5,movetoworkspace,5"
|
||||
"$shiftMainMod,5,movetoworkspace,6"
|
||||
]
|
||||
else
|
||||
[
|
||||
"$mainMod,1,workspace,name:c1"
|
||||
"$mainMod,2,workspace,name:c2"
|
||||
"$mainMod,3,workspace,name:c3"
|
||||
"$mainMod,4,workspace,name:c4"
|
||||
"$mainMod,5,workspace,5"
|
||||
"$mainMod,6,workspace,6"
|
||||
"$shiftMainMod,1,movetoworkspace,name:c1"
|
||||
"$shiftMainMod,2,movetoworkspace,name:c2"
|
||||
"$shiftMainMod,3,movetoworkspace,name:c3"
|
||||
"$shiftMainMod,4,movetoworkspace,name:c4"
|
||||
"$shiftMainMod,5,movetoworkspace,5"
|
||||
"$shiftMainMod,6,movetoworkspace,6"
|
||||
]
|
||||
)
|
||||
++ [
|
||||
# Special workspace
|
||||
"$mainMod,c,togglespecialworkspace"
|
||||
|
||||
Reference in New Issue
Block a user