mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-24 01:28:39 +02:00
feat(wm): make invisible borders configurable
Following the changes I witnessed in the invisible window border size following an OS update, this commit makes the invisible border offset configurable via a new komorebic command 'invisible-borders'. When sending a new set of invisible border offset dimensions via komorebic, a full retile across all monitors will take place after the new values have been set. The default values have been set to what is currently correct for my machine, and will likely be updated again in the same way in the future if further changes occur in subsequent OS updates. This commit also updates some dependencies to their latest releases, and removes from the CI workflow a line that attempts to delete the rustup-init.exe binary after installation which has been causing builds to fail. resolve #35
This commit is contained in:
@@ -33,6 +33,7 @@ use komorebi_core::Flip;
|
||||
use komorebi_core::FocusFollowsMouseImplementation;
|
||||
use komorebi_core::Layout;
|
||||
use komorebi_core::OperationDirection;
|
||||
use komorebi_core::Rect;
|
||||
use komorebi_core::Sizing;
|
||||
use komorebi_core::SocketMessage;
|
||||
use komorebi_core::StateQuery;
|
||||
@@ -150,6 +151,18 @@ struct Resize {
|
||||
sizing: Sizing,
|
||||
}
|
||||
|
||||
#[derive(Clap, AhkFunction)]
|
||||
struct InvisibleBorders {
|
||||
/// Size of the left invisible border
|
||||
left: i32,
|
||||
/// Size of the top invisible border (usually 0)
|
||||
top: i32,
|
||||
/// Size of the right invisible border (usually left * 2)
|
||||
right: i32,
|
||||
/// Size of the bottom invisible border (usually the same as left)
|
||||
bottom: i32,
|
||||
}
|
||||
|
||||
#[derive(Clap, AhkFunction)]
|
||||
struct EnsureWorkspaces {
|
||||
/// Monitor index (zero-indexed)
|
||||
@@ -305,6 +318,9 @@ enum SubCommand {
|
||||
FocusWorkspace(FocusWorkspace),
|
||||
/// Create and append a new workspace on the focused monitor
|
||||
NewWorkspace,
|
||||
/// Set the invisible border dimensions around each window
|
||||
#[clap(setting = AppSettings::ArgRequiredElseHelp)]
|
||||
InvisibleBorders(InvisibleBorders),
|
||||
/// Adjust container padding on the focused workspace
|
||||
#[clap(setting = AppSettings::ArgRequiredElseHelp)]
|
||||
AdjustContainerPadding(AdjustContainerPadding),
|
||||
@@ -459,6 +475,17 @@ fn main() -> Result<()> {
|
||||
SubCommand::SendToWorkspace(arg) => {
|
||||
send_message(&*SocketMessage::SendContainerToWorkspaceNumber(arg.target).as_bytes()?)?;
|
||||
}
|
||||
SubCommand::InvisibleBorders(arg) => {
|
||||
send_message(
|
||||
&*SocketMessage::InvisibleBorders(Rect {
|
||||
left: arg.left,
|
||||
top: arg.top,
|
||||
right: arg.right,
|
||||
bottom: arg.bottom,
|
||||
})
|
||||
.as_bytes()?,
|
||||
)?;
|
||||
}
|
||||
SubCommand::ContainerPadding(arg) => {
|
||||
send_message(
|
||||
&*SocketMessage::ContainerPadding(arg.monitor, arg.workspace, arg.size)
|
||||
|
||||
Reference in New Issue
Block a user