toml-config: add set/unset variants of toggle actions
This commit is contained in:
parent
c5818dcd32
commit
bc6a9ad94d
6 changed files with 72 additions and 0 deletions
|
|
@ -53,9 +53,13 @@ pub enum SimpleCommand {
|
|||
ReloadConfigToml,
|
||||
Split(Axis),
|
||||
ToggleFloating,
|
||||
SetFloating(bool),
|
||||
ToggleFullscreen,
|
||||
SetFullscreen(bool),
|
||||
ToggleMono,
|
||||
SetMono(bool),
|
||||
ToggleSplit,
|
||||
SetSplit(Axis),
|
||||
Forward(bool),
|
||||
EnableWindowManagement(bool),
|
||||
SetFloatAboveFullscreen(bool),
|
||||
|
|
|
|||
|
|
@ -104,12 +104,20 @@ impl ActionParser<'_> {
|
|||
"split-horizontal" => Split(Horizontal),
|
||||
"split-vertical" => Split(Vertical),
|
||||
"toggle-split" => ToggleSplit,
|
||||
"tile-horizontal" => SetSplit(Horizontal),
|
||||
"tile-vertical" => SetSplit(Vertical),
|
||||
"toggle-mono" => ToggleMono,
|
||||
"show-single" => SetMono(true),
|
||||
"show-all" => SetMono(false),
|
||||
"toggle-fullscreen" => ToggleFullscreen,
|
||||
"enter-fullscreen" => SetFullscreen(true),
|
||||
"exit-fullscreen" => SetFullscreen(false),
|
||||
"focus-parent" => FocusParent,
|
||||
"close" => Close,
|
||||
"disable-pointer-constraint" => DisablePointerConstraint,
|
||||
"toggle-floating" => ToggleFloating,
|
||||
"float" => SetFloating(true),
|
||||
"tile" => SetFloating(false),
|
||||
"quit" => Quit,
|
||||
"reload-config-toml" => ReloadConfigToml,
|
||||
"reload-config-so" => ReloadConfigSo,
|
||||
|
|
|
|||
|
|
@ -86,14 +86,18 @@ impl Action {
|
|||
SimpleCommand::Move(dir) => B::new(move || s.move_(dir)),
|
||||
SimpleCommand::Split(axis) => B::new(move || s.create_split(axis)),
|
||||
SimpleCommand::ToggleSplit => B::new(move || s.toggle_split()),
|
||||
SimpleCommand::SetSplit(b) => B::new(move || s.set_split(b)),
|
||||
SimpleCommand::ToggleMono => B::new(move || s.toggle_mono()),
|
||||
SimpleCommand::SetMono(b) => B::new(move || s.set_mono(b)),
|
||||
SimpleCommand::ToggleFullscreen => B::new(move || s.toggle_fullscreen()),
|
||||
SimpleCommand::SetFullscreen(b) => B::new(move || s.set_fullscreen(b)),
|
||||
SimpleCommand::FocusParent => B::new(move || s.focus_parent()),
|
||||
SimpleCommand::Close => B::new(move || s.close()),
|
||||
SimpleCommand::DisablePointerConstraint => {
|
||||
B::new(move || s.disable_pointer_constraint())
|
||||
}
|
||||
SimpleCommand::ToggleFloating => B::new(move || s.toggle_floating()),
|
||||
SimpleCommand::SetFloating(b) => B::new(move || s.set_floating(b)),
|
||||
SimpleCommand::Quit => B::new(quit),
|
||||
SimpleCommand::ReloadConfigToml => {
|
||||
let persistent = state.persistent.clone();
|
||||
|
|
|
|||
|
|
@ -1357,12 +1357,20 @@
|
|||
"split-horizontal",
|
||||
"split-vertical",
|
||||
"toggle-split",
|
||||
"tile-horizontal",
|
||||
"tile-vertical",
|
||||
"toggle-mono",
|
||||
"show-single",
|
||||
"show-all",
|
||||
"toggle-fullscreen",
|
||||
"enter-fullscreen",
|
||||
"exit-fullscreen",
|
||||
"focus-parent",
|
||||
"close",
|
||||
"disable-pointer-constraint",
|
||||
"toggle-floating",
|
||||
"float",
|
||||
"tile",
|
||||
"quit",
|
||||
"reload-config-toml",
|
||||
"reload-config-to",
|
||||
|
|
|
|||
|
|
@ -2991,14 +2991,38 @@ The string should have one of the following values:
|
|||
Toggle the split of the currently focused container between vertical and
|
||||
horizontal.
|
||||
|
||||
- `tile-horizontal`:
|
||||
|
||||
Sets the split of the currently focused container to horizontal.
|
||||
|
||||
- `tile-vertical`:
|
||||
|
||||
Sets the split of the currently focused container to vertical.
|
||||
|
||||
- `toggle-mono`:
|
||||
|
||||
Toggle the currently focused container between showing a single and all children.
|
||||
|
||||
- `show-single`:
|
||||
|
||||
Makes the currently focused container show a single child.
|
||||
|
||||
- `show-all`:
|
||||
|
||||
Makes the currently focused container show all children.
|
||||
|
||||
- `toggle-fullscreen`:
|
||||
|
||||
Toggle the currently focused window between fullscreen and windowed.
|
||||
|
||||
- `enter-fullscreen`:
|
||||
|
||||
Makes the currently focused window fullscreen.
|
||||
|
||||
- `exit-fullscreen`:
|
||||
|
||||
Makes the currently focused window windowed.
|
||||
|
||||
- `focus-parent`:
|
||||
|
||||
Focus the parent of the currently focused window.
|
||||
|
|
@ -3018,6 +3042,14 @@ The string should have one of the following values:
|
|||
|
||||
Toggle the currently focused window between floating and tiled.
|
||||
|
||||
- `float`:
|
||||
|
||||
Makes the currently focused window floating.
|
||||
|
||||
- `tile`:
|
||||
|
||||
Makes the currently focused window tiled.
|
||||
|
||||
- `quit`:
|
||||
|
||||
Terminate the compositor.
|
||||
|
|
|
|||
|
|
@ -726,11 +726,23 @@ SimpleActionName:
|
|||
description: |
|
||||
Toggle the split of the currently focused container between vertical and
|
||||
horizontal.
|
||||
- value: tile-horizontal
|
||||
description: Sets the split of the currently focused container to horizontal.
|
||||
- value: tile-vertical
|
||||
description: Sets the split of the currently focused container to vertical.
|
||||
- value: toggle-mono
|
||||
description: |
|
||||
Toggle the currently focused container between showing a single and all children.
|
||||
- value: show-single
|
||||
description: Makes the currently focused container show a single child.
|
||||
- value: show-all
|
||||
description: Makes the currently focused container show all children.
|
||||
- value: toggle-fullscreen
|
||||
description: Toggle the currently focused window between fullscreen and windowed.
|
||||
- value: enter-fullscreen
|
||||
description: Makes the currently focused window fullscreen.
|
||||
- value: exit-fullscreen
|
||||
description: Makes the currently focused window windowed.
|
||||
- value: focus-parent
|
||||
description: Focus the parent of the currently focused window.
|
||||
- value: close
|
||||
|
|
@ -743,6 +755,10 @@ SimpleActionName:
|
|||
The constraint will be re-enabled when the pointer re-enters the window.
|
||||
- value: toggle-floating
|
||||
description: Toggle the currently focused window between floating and tiled.
|
||||
- value: float
|
||||
description: Makes the currently focused window floating.
|
||||
- value: tile
|
||||
description: Makes the currently focused window tiled.
|
||||
- value: quit
|
||||
description: Terminate the compositor.
|
||||
- value: reload-config-toml
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue