mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-25 01:58:51 +02:00
feat(wm): add new cmd to set active border offset
This commit introduces a new command, active-window-border-offset, which allows the user to offset the starting position of the active window border, thereby allowing for thicker or thinner active window borders, when used in conjunction with the active-window-border-width command. resolve #232
This commit is contained in:
@@ -450,6 +450,12 @@ struct ActiveWindowBorderWidth {
|
||||
width: i32,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
struct ActiveWindowBorderOffset {
|
||||
/// Desired offset of the active window border
|
||||
offset: i32,
|
||||
}
|
||||
|
||||
#[derive(Parser, AhkFunction)]
|
||||
struct Start {
|
||||
/// Allow the use of komorebi's custom focus-follows-mouse implementation
|
||||
@@ -755,6 +761,9 @@ enum SubCommand {
|
||||
/// Set the width for the active window border
|
||||
#[clap(arg_required_else_help = true)]
|
||||
ActiveWindowBorderWidth(ActiveWindowBorderWidth),
|
||||
/// Set the offset for the active window border
|
||||
#[clap(arg_required_else_help = true)]
|
||||
ActiveWindowBorderOffset(ActiveWindowBorderOffset),
|
||||
/// Enable or disable focus follows mouse for the operating system
|
||||
#[clap(arg_required_else_help = true)]
|
||||
FocusFollowsMouse(FocusFollowsMouse),
|
||||
@@ -1375,6 +1384,9 @@ fn main() -> Result<()> {
|
||||
SubCommand::ActiveWindowBorderWidth(arg) => {
|
||||
send_message(&SocketMessage::ActiveWindowBorderWidth(arg.width).as_bytes()?)?;
|
||||
}
|
||||
SubCommand::ActiveWindowBorderOffset(arg) => {
|
||||
send_message(&SocketMessage::ActiveWindowBorderOffset(arg.offset).as_bytes()?)?;
|
||||
}
|
||||
SubCommand::ResizeDelta(arg) => {
|
||||
send_message(&SocketMessage::ResizeDelta(arg.pixels).as_bytes()?)?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user