mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-23 00:58:37 +02:00
feat(wm): make active border with configurable
This commit introduces a new command which lets the user set a custom width value for the active window border when it is enabled. Unfortunately a little more width is required when working with rounded windows on Windows 11 to fill the gap left by the rounding. The default width remains set at 20. re #232
This commit is contained in:
@@ -444,6 +444,12 @@ struct ActiveWindowBorderColour {
|
||||
b: u32,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
struct ActiveWindowBorderWidth {
|
||||
/// Desired width of the active window border
|
||||
width: i32,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
struct Start {
|
||||
/// Allow the use of komorebi's custom focus-follows-mouse implementation
|
||||
@@ -744,6 +750,9 @@ enum SubCommand {
|
||||
/// Set the colour for the active window border
|
||||
#[clap(arg_required_else_help = true)]
|
||||
ActiveWindowBorderColour(ActiveWindowBorderColour),
|
||||
/// Set the width for the active window border
|
||||
#[clap(arg_required_else_help = true)]
|
||||
ActiveWindowBorderWidth(ActiveWindowBorderWidth),
|
||||
/// Enable or disable focus follows mouse for the operating system
|
||||
#[clap(arg_required_else_help = true)]
|
||||
FocusFollowsMouse(FocusFollowsMouse),
|
||||
@@ -1358,6 +1367,9 @@ fn main() -> Result<()> {
|
||||
.as_bytes()?,
|
||||
)?;
|
||||
}
|
||||
SubCommand::ActiveWindowBorderWidth(arg) => {
|
||||
send_message(&SocketMessage::ActiveWindowBorderWidth(arg.width).as_bytes()?)?;
|
||||
}
|
||||
SubCommand::ResizeDelta(arg) => {
|
||||
send_message(&SocketMessage::ResizeDelta(arg.pixels).as_bytes()?)?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user