mirror of
https://github.com/nix-community/home-manager
synced 2024-11-04 18:29:45 +01:00
i3-sway: allow "container" and "output" in focus.mouseWarping (#3154)
Allow specifying which kind of mouseWarping to use since sway supports `mouse_warping output|container|none`.
This commit is contained in:
parent
b382b59faf
commit
c5b4177bda
2 changed files with 12 additions and 2 deletions
|
@ -508,7 +508,10 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
mouseWarping = mkOption {
|
mouseWarping = mkOption {
|
||||||
type = types.bool;
|
type = if isSway then
|
||||||
|
types.oneOf [ types.bool (types.enum [ "container" "output" ]) ]
|
||||||
|
else
|
||||||
|
types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = ''
|
description = ''
|
||||||
Whether mouse cursor should be warped to the center of the window when switching focus
|
Whether mouse cursor should be warped to the center of the window when switching focus
|
||||||
|
|
|
@ -273,7 +273,14 @@ let
|
||||||
"focus_wrapping ${lib.hm.booleans.yesNo focus.forceWrapping}"
|
"focus_wrapping ${lib.hm.booleans.yesNo focus.forceWrapping}"
|
||||||
"focus_follows_mouse ${focus.followMouse}"
|
"focus_follows_mouse ${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 builtins.isString (focus.mouseWarping) then
|
||||||
|
focus.mouseWarping
|
||||||
|
else if focus.mouseWarping then
|
||||||
|
"output"
|
||||||
|
else
|
||||||
|
"none"
|
||||||
|
}"
|
||||||
"workspace_layout ${workspaceLayout}"
|
"workspace_layout ${workspaceLayout}"
|
||||||
"workspace_auto_back_and_forth ${
|
"workspace_auto_back_and_forth ${
|
||||||
lib.hm.booleans.yesNo workspaceAutoBackAndForth
|
lib.hm.booleans.yesNo workspaceAutoBackAndForth
|
||||||
|
|
Loading…
Reference in a new issue