feat(cli): add toggle-window-based-work-area-offset cmd

This commit adds a command to toggle the application of a monitor's
window-based work area offset for the focused workspace.

resolve #1285
This commit is contained in:
LGUG2Z
2025-02-20 20:38:10 -08:00
parent c095f8ae9f
commit 30c22f51c9
5 changed files with 27 additions and 0 deletions

View File

@@ -1155,6 +1155,8 @@ enum SubCommand {
/// Set offsets for a monitor to exclude parts of the work area from tiling
#[clap(arg_required_else_help = true)]
MonitorWorkAreaOffset(MonitorWorkAreaOffset),
/// Toggle application of the window-based work area offset for the focused workspace
ToggleWindowBasedWorkAreaOffset,
/// Set container padding on the focused workspace
#[clap(arg_required_else_help = true)]
FocusedWorkspaceContainerPadding(FocusedWorkspaceContainerPadding),
@@ -1878,6 +1880,9 @@ fn main() -> Result<()> {
bottom: arg.bottom,
}))?;
}
SubCommand::ToggleWindowBasedWorkAreaOffset => {
send_message(&SocketMessage::ToggleWindowBasedWorkAreaOffset)?;
}
SubCommand::ContainerPadding(arg) => {
send_message(&SocketMessage::ContainerPadding(
arg.monitor,