mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-06-12 13:34:26 +02:00
feat(wm): add retile with resize socket msg
This commit adds a new SocketMessage variant, RetileWithResizeDimensions, to preserve any resize dimensions applied by the user. This new variant is now used when clicking on a workspace using the komorebi widget in komorebi-bar.
This commit is contained in:
@@ -164,7 +164,10 @@ impl BarWidget for Komorebi {
|
|||||||
proceed = false;
|
proceed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if proceed && komorebi_client::send_message(&SocketMessage::Retile).is_err() {
|
if proceed
|
||||||
|
&& komorebi_client::send_message(&SocketMessage::RetileWithResizeDimensions)
|
||||||
|
.is_err()
|
||||||
|
{
|
||||||
tracing::error!("could not send message to komorebi: Retile");
|
tracing::error!("could not send message to komorebi: Retile");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ pub enum SocketMessage {
|
|||||||
Stop,
|
Stop,
|
||||||
TogglePause,
|
TogglePause,
|
||||||
Retile,
|
Retile,
|
||||||
|
RetileWithResizeDimensions,
|
||||||
QuickSave,
|
QuickSave,
|
||||||
QuickLoad,
|
QuickLoad,
|
||||||
Save(PathBuf),
|
Save(PathBuf),
|
||||||
|
|||||||
@@ -632,6 +632,11 @@ impl WindowManager {
|
|||||||
border_manager::destroy_all_borders()?;
|
border_manager::destroy_all_borders()?;
|
||||||
self.retile_all(false)?
|
self.retile_all(false)?
|
||||||
}
|
}
|
||||||
|
SocketMessage::RetileWithResizeDimensions => {
|
||||||
|
border_manager::BORDER_TEMPORARILY_DISABLED.store(false, Ordering::SeqCst);
|
||||||
|
border_manager::destroy_all_borders()?;
|
||||||
|
self.retile_all(true)?
|
||||||
|
}
|
||||||
SocketMessage::FlipLayout(layout_flip) => self.flip_layout(layout_flip)?,
|
SocketMessage::FlipLayout(layout_flip) => self.flip_layout(layout_flip)?,
|
||||||
SocketMessage::ChangeLayout(layout) => self.change_workspace_layout_default(layout)?,
|
SocketMessage::ChangeLayout(layout) => self.change_workspace_layout_default(layout)?,
|
||||||
SocketMessage::CycleLayout(direction) => self.cycle_layout(direction)?,
|
SocketMessage::CycleLayout(direction) => self.cycle_layout(direction)?,
|
||||||
|
|||||||
Reference in New Issue
Block a user