i3-sway: config.focus.wrapping deprecates forceWrapping (#3467)
Stop using the legacy syntax described in the i3 documentation: https://i3wm.org/docs/userguide.html#_focus_wrapping
This commit is contained in:
parent
2827b53064
commit
d633afe0d9
|
@ -160,7 +160,7 @@ let
|
||||||
"floating_modifier ${floating.modifier}"
|
"floating_modifier ${floating.modifier}"
|
||||||
(windowBorderString window floating)
|
(windowBorderString window floating)
|
||||||
"hide_edge_borders ${window.hideEdgeBorders}"
|
"hide_edge_borders ${window.hideEdgeBorders}"
|
||||||
"force_focus_wrapping ${lib.hm.booleans.yesNo focus.forceWrapping}"
|
"focus_wrapping ${focus.wrapping}"
|
||||||
"focus_follows_mouse ${lib.hm.booleans.yesNo focus.followMouse}"
|
"focus_follows_mouse ${lib.hm.booleans.yesNo focus.followMouse}"
|
||||||
"focus_on_window_activation ${focus.newWindow}"
|
"focus_on_window_activation ${focus.newWindow}"
|
||||||
"mouse_warping ${if focus.mouseWarping then "output" else "none"}"
|
"mouse_warping ${if focus.mouseWarping then "output" else "none"}"
|
||||||
|
@ -256,15 +256,14 @@ in {
|
||||||
++ flatten (map (b:
|
++ flatten (map (b:
|
||||||
optional (isList b.fonts)
|
optional (isList b.fonts)
|
||||||
"Specifying i3.config.bars[].fonts as a list is deprecated. Use the attrset version instead.")
|
"Specifying i3.config.bars[].fonts as a list is deprecated. Use the attrset version instead.")
|
||||||
cfg.config.bars);
|
cfg.config.bars) ++ [
|
||||||
})
|
(mkIf (any (s: s.workspace != null) cfg.config.startup)
|
||||||
|
|
||||||
(mkIf (cfg.config != null
|
|
||||||
&& (any (s: s.workspace != null) cfg.config.startup)) {
|
|
||||||
warnings = [
|
|
||||||
("'xsession.windowManager.i3.config.startup.*.workspace' is deprecated, "
|
("'xsession.windowManager.i3.config.startup.*.workspace' is deprecated, "
|
||||||
+ "use 'xsession.windowManager.i3.config.assigns' instead."
|
+ "use 'xsession.windowManager.i3.config.assigns' instead."
|
||||||
+ "See https://github.com/nix-community/home-manager/issues/265.")
|
+ "See https://github.com/nix-community/home-manager/issues/265."))
|
||||||
|
(mkIf cfg.config.focus.forceWrapping
|
||||||
|
("'xsession.windowManager.i3.config.focus.forceWrapping' is deprecated, "
|
||||||
|
+ "use 'xsession.windowManager.i3.config.focus.wrapping' instead."))
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -510,13 +510,28 @@ in {
|
||||||
if (isSway && isBool val) then (lib.hm.booleans.yesNo val) else val;
|
if (isSway && isBool val) then (lib.hm.booleans.yesNo val) else val;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
wrapping = mkOption {
|
||||||
|
type = types.enum [ "yes" "no" "force" "workspace" ];
|
||||||
|
default = {
|
||||||
|
i3 = if cfg.config.focus.forceWrapping then "force" else "yes";
|
||||||
|
# the sway module's logic was inverted and incorrect,
|
||||||
|
# so preserve it for backwards compatibility purposes
|
||||||
|
sway = if cfg.config.focus.forceWrapping then "yes" else "no";
|
||||||
|
}.${moduleName};
|
||||||
|
description = ''
|
||||||
|
Whether the window focus commands automatically wrap around the edge of containers.
|
||||||
|
|
||||||
|
See <link xlink:href="https://i3wm.org/docs/userguide.html#_focus_wrapping"/>
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
forceWrapping = mkOption {
|
forceWrapping = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to force focus wrapping in tabbed or stacked container.
|
Whether to force focus wrapping in tabbed or stacked containers.
|
||||||
|
|
||||||
See <link xlink:href="https://i3wm.org/docs/userguide.html#_focus_wrapping"/>
|
This option is deprecated, use <option>focus.wrapping</option> instead.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -271,7 +271,7 @@ let
|
||||||
"floating_modifier ${floating.modifier}"
|
"floating_modifier ${floating.modifier}"
|
||||||
(windowBorderString window floating)
|
(windowBorderString window floating)
|
||||||
"hide_edge_borders ${window.hideEdgeBorders}"
|
"hide_edge_borders ${window.hideEdgeBorders}"
|
||||||
"focus_wrapping ${lib.hm.booleans.yesNo focus.forceWrapping}"
|
"focus_wrapping ${focus.wrapping}"
|
||||||
"focus_follows_mouse ${focus.followMouse}"
|
"focus_follows_mouse ${focus.followMouse}"
|
||||||
"focus_on_window_activation ${focus.newWindow}"
|
"focus_on_window_activation ${focus.newWindow}"
|
||||||
"mouse_warping ${
|
"mouse_warping ${
|
||||||
|
@ -442,7 +442,10 @@ in {
|
||||||
++ flatten (map (b:
|
++ flatten (map (b:
|
||||||
optional (isList b.fonts)
|
optional (isList b.fonts)
|
||||||
"Specifying sway.config.bars[].fonts as a list is deprecated. Use the attrset version instead.")
|
"Specifying sway.config.bars[].fonts as a list is deprecated. Use the attrset version instead.")
|
||||||
cfg.config.bars);
|
cfg.config.bars) ++ [
|
||||||
|
(mkIf cfg.config.focus.forceWrapping
|
||||||
|
"sway.config.focus.forceWrapping is deprecated, use focus.wrapping instead.")
|
||||||
|
];
|
||||||
})
|
})
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,7 +3,7 @@ floating_modifier Mod1
|
||||||
default_border normal 2
|
default_border normal 2
|
||||||
default_floating_border normal 2
|
default_floating_border normal 2
|
||||||
hide_edge_borders none
|
hide_edge_borders none
|
||||||
force_focus_wrapping no
|
focus_wrapping yes
|
||||||
focus_follows_mouse yes
|
focus_follows_mouse yes
|
||||||
focus_on_window_activation smart
|
focus_on_window_activation smart
|
||||||
mouse_warping output
|
mouse_warping output
|
||||||
|
|
|
@ -3,7 +3,7 @@ floating_modifier Mod1
|
||||||
default_border normal 2
|
default_border normal 2
|
||||||
default_floating_border normal 2
|
default_floating_border normal 2
|
||||||
hide_edge_borders none
|
hide_edge_borders none
|
||||||
force_focus_wrapping no
|
focus_wrapping yes
|
||||||
focus_follows_mouse no
|
focus_follows_mouse no
|
||||||
focus_on_window_activation smart
|
focus_on_window_activation smart
|
||||||
mouse_warping output
|
mouse_warping output
|
||||||
|
|
|
@ -3,7 +3,7 @@ floating_modifier Mod1
|
||||||
default_border normal 2
|
default_border normal 2
|
||||||
default_floating_border normal 2
|
default_floating_border normal 2
|
||||||
hide_edge_borders none
|
hide_edge_borders none
|
||||||
force_focus_wrapping no
|
focus_wrapping yes
|
||||||
focus_follows_mouse yes
|
focus_follows_mouse yes
|
||||||
focus_on_window_activation smart
|
focus_on_window_activation smart
|
||||||
mouse_warping output
|
mouse_warping output
|
||||||
|
|
|
@ -3,7 +3,7 @@ floating_modifier Mod1
|
||||||
default_border normal 2
|
default_border normal 2
|
||||||
default_floating_border normal 2
|
default_floating_border normal 2
|
||||||
hide_edge_borders none
|
hide_edge_borders none
|
||||||
force_focus_wrapping no
|
focus_wrapping yes
|
||||||
focus_follows_mouse yes
|
focus_follows_mouse yes
|
||||||
focus_on_window_activation smart
|
focus_on_window_activation smart
|
||||||
mouse_warping output
|
mouse_warping output
|
||||||
|
|
|
@ -3,7 +3,7 @@ floating_modifier Mod1
|
||||||
default_border normal 2
|
default_border normal 2
|
||||||
default_floating_border normal 2
|
default_floating_border normal 2
|
||||||
hide_edge_borders none
|
hide_edge_borders none
|
||||||
force_focus_wrapping no
|
focus_wrapping yes
|
||||||
focus_follows_mouse yes
|
focus_follows_mouse yes
|
||||||
focus_on_window_activation smart
|
focus_on_window_activation smart
|
||||||
mouse_warping output
|
mouse_warping output
|
||||||
|
|
|
@ -3,7 +3,7 @@ floating_modifier Mod1
|
||||||
default_border normal 2
|
default_border normal 2
|
||||||
default_floating_border normal 2
|
default_floating_border normal 2
|
||||||
hide_edge_borders none
|
hide_edge_borders none
|
||||||
force_focus_wrapping no
|
focus_wrapping yes
|
||||||
focus_follows_mouse yes
|
focus_follows_mouse yes
|
||||||
focus_on_window_activation smart
|
focus_on_window_activation smart
|
||||||
mouse_warping output
|
mouse_warping output
|
||||||
|
|
Loading…
Reference in a new issue