mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-17 14:21:22 +01:00
feat(wm): padding for named workspaces
workspace-padding and container-padding take the index of a workspace's monitor and its own index, so a script that names its workspaces still has to count them to pad one, while focus-named-workspace, named-workspace-layout and named-workspace-tiling already take the name. named-workspace-padding and named-workspace-container-padding take the name instead. They look the workspace up on every monitor the way the other named commands do, set the same padding the commands by index set, and change nothing for a name no workspace has. The tests check the messages the subcommands send, that a named workspace takes its paddings and the tile in front follows, and that a name nobody has changes nothing. The commands sweep of the VM suite sends both commands to a real session.
This commit is contained in:
1 parent
189aeb1005
commit
ac265de1e3
10 files changed
+198
-15
No files matched your search
@@ -0,0 +1,17 @@
|
||||
```text
|
||||
Set the container padding for the specified workspace
|
||||
|
||||
Usage: named-workspace-container-padding <WORKSPACE> <SIZE>
|
||||
|
||||
Arguments:
|
||||
<WORKSPACE>
|
||||
Target workspace name
|
||||
|
||||
<SIZE>
|
||||
Pixels to pad with as an integer
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
Print help
|
||||
|
||||
```
|
||||
@@ -0,0 +1,17 @@
|
||||
```text
|
||||
Set the workspace padding for the specified workspace
|
||||
|
||||
Usage: named-workspace-padding <WORKSPACE> <SIZE>
|
||||
|
||||
Arguments:
|
||||
<WORKSPACE>
|
||||
Target workspace name
|
||||
|
||||
<SIZE>
|
||||
Pixels to pad with as an integer
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
Print help
|
||||
|
||||
```
|
||||
@@ -405,13 +405,15 @@ focused is in no container of the focused workspace
|
||||
([`WindowManager::handle_unmanaged_window_behaviour`]).
|
||||
|
||||
`WorkspacePadding`, `ContainerPadding` and their `FocusedWorkspace` forms set a workspace's own
|
||||
padding, and `AdjustWorkspacePadding` and `AdjustContainerPadding` change the focused
|
||||
workspace's by a number of pixels, which needs a padding of its own to change
|
||||
([`WindowManager::adjust_workspace_padding`]). `WorkAreaOffset`, `MonitorWorkAreaOffset` and
|
||||
`WorkspaceWorkAreaOffset` set the offset of the window manager, of a monitor or of a workspace,
|
||||
and `ToggleWindowBasedWorkAreaOffset` sets whether the focused workspace takes its monitor's
|
||||
window-based offset ([`Workspace::apply_window_based_work_area_offset`]). Each tiles the
|
||||
workspace in front again, or every monitor.
|
||||
padding, and `NamedWorkspacePadding` and `NamedWorkspaceContainerPadding` do the same for the
|
||||
workspace with a name, which they look up like `NamedWorkspaceLayout` does
|
||||
([`WindowManager::monitor_workspace_index_by_name`]). `AdjustWorkspacePadding` and
|
||||
`AdjustContainerPadding` change the focused workspace's by a number of pixels, which needs a padding
|
||||
of its own to change ([`WindowManager::adjust_workspace_padding`]). `WorkAreaOffset`,
|
||||
`MonitorWorkAreaOffset` and `WorkspaceWorkAreaOffset` set the offset of the window manager, of a
|
||||
monitor or of a workspace, and `ToggleWindowBasedWorkAreaOffset` sets whether the focused workspace
|
||||
takes its monitor's window-based offset ([`Workspace::apply_window_based_work_area_offset`]). Each
|
||||
tiles the workspace in front again, or every monitor.
|
||||
|
||||
`ResizeWindowEdge` and `ResizeWindowAxis` resize the focused container
|
||||
([`WindowManager::resize_window`]). A resize is an adjustment of the container's tile, kept in
|
||||
|
||||
@@ -21,11 +21,18 @@ set the paddings of the focused workspace, and
|
||||
[`komorebic container-padding`](../cli/container-padding.md) those of a workspace given by the
|
||||
index of its monitor and its own, counted from 0.
|
||||
|
||||
[`komorebic named-workspace-padding`](../cli/named-workspace-padding.md) and
|
||||
[`komorebic named-workspace-container-padding`](../cli/named-workspace-container-padding.md) find
|
||||
the workspace by the [name](workspaces.md#names) it was given instead, on whichever monitor has
|
||||
it. A name no workspace has changes nothing.
|
||||
|
||||
```sh
|
||||
komorebic focused-workspace-padding 20
|
||||
komorebic focused-workspace-container-padding 10
|
||||
komorebic workspace-padding 0 1 0
|
||||
komorebic container-padding 0 1 0
|
||||
komorebic named-workspace-padding mail 0
|
||||
komorebic named-workspace-container-padding mail 0
|
||||
```
|
||||
|
||||
[`komorebic adjust-workspace-padding`](../cli/adjust-workspace-padding.md) and
|
||||
|
||||
Reference in new issue
Block a user