feat(wm): add visual feedback for preselections

This commit adds visual feedback in the form of a ghost tile for
preselections made by the preselect-direction command.

A container with the id "PRESELECT" will be added to the workspace, and
replaced when the next manage-able window is spawned.

A new command, cancel-preselect has been added to remove both the
preselection index and the ghost tile if the user changes their mind.
This commit is contained in:
LGUG2Z committed 2025-11-02 11:03:11 -08:00
1 parent fe8dbca204
commit 34db2e2c90
8 files changed
+62 -5

No files matched your search

+5
View File
@@ -764,6 +764,8 @@ enum SubCommand {
/// Preselect the specified direction for the next window to be spawned on supported layouts
#[clap(arg_required_else_help = true)]
PreselectDirection(PreselectDirection),
/// Cancel a workspace preselect set by the preselect-direction command, if one exists
CancelPreselect,
/// Minimize the focused window
Minimize,
/// Close the focused window
@@ -1680,6 +1682,9 @@ fn main() -> eyre::Result<()> {
SubCommand::PreselectDirection(arg) => {
send_message(&SocketMessage::PreselectDirection(arg.operation_direction))?;
}
SubCommand::CancelPreselect => {
send_message(&SocketMessage::CancelPreselect)?;
}
SubCommand::CycleFocus(arg) => {
send_message(&SocketMessage::CycleFocusWindow(arg.cycle_direction))?;
}