mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-23 17:18:40 +02:00
feat(wm): add cmd to id apps that overflow borders
Applications like Spotify and Discord draw over the default invisible borders of Windows 10, which means that when komorebi is setting their positions, the offset is always off by the amount of pixels of the invisible borders on each side. This commit makes it possible to identify applications that have overflowing borders so that they can be handled appropriately by the window manager. This commit also takes the opportunity to consolidate the tray and multi window identifiers into a single vector instead of spreading them across multiple vectors by identifier type. resolve #32
This commit is contained in:
@@ -219,6 +219,7 @@ gen_application_target_subcommand_args! {
|
||||
FloatRule,
|
||||
ManageRule,
|
||||
IdentifyTrayApplication,
|
||||
IdentifyBorderOverflow,
|
||||
}
|
||||
|
||||
#[derive(Clap, AhkFunction)]
|
||||
@@ -371,6 +372,9 @@ enum SubCommand {
|
||||
/// Identify an application that closes to the system tray
|
||||
#[clap(setting = AppSettings::ArgRequiredElseHelp)]
|
||||
IdentifyTrayApplication(IdentifyTrayApplication),
|
||||
/// Identify an application that has overflowing borders
|
||||
#[clap(setting = AppSettings::ArgRequiredElseHelp)]
|
||||
IdentifyBorderOverflow(IdentifyBorderOverflow),
|
||||
/// Enable or disable focus follows mouse for the operating system
|
||||
#[clap(setting = AppSettings::ArgRequiredElseHelp)]
|
||||
FocusFollowsMouse(FocusFollowsMouse),
|
||||
@@ -701,6 +705,11 @@ fn main() -> Result<()> {
|
||||
.as_bytes()?,
|
||||
)?;
|
||||
}
|
||||
SubCommand::IdentifyBorderOverflow(target) => {
|
||||
send_message(
|
||||
&*SocketMessage::IdentifyBorderOverflow(target.identifier, target.id).as_bytes()?,
|
||||
)?;
|
||||
}
|
||||
SubCommand::Manage => {
|
||||
send_message(&*SocketMessage::ManageFocusedWindow.as_bytes()?)?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user