feat(wm): add toggle-focus-follows-mouse cmd

Decided there should be a quick way to toggle the native ffm
functionality, it gets especially annoying when trying to click drop
downs from the system tray etc.

re #7
This commit is contained in:
LGUG2Z
2021-08-23 14:08:02 -07:00
parent fb4fe4d9c3
commit 87fe718754
7 changed files with 170 additions and 133 deletions

View File

@@ -328,7 +328,7 @@ enum SubCommand {
Unmanage,
/// Reload ~/komorebi.ahk (if it exists)
ReloadConfiguration,
/// Toggle the automatic reloading of ~/komorebi.ahk (if it exists)
/// Enable or disable watching of ~/komorebi.ahk (if it exists)
#[clap(setting = AppSettings::ArgRequiredElseHelp)]
WatchConfiguration(WatchConfiguration),
/// Add a rule to always float the specified application
@@ -345,6 +345,8 @@ enum SubCommand {
IdentifyTrayApplication(IdentifyTrayApplication),
/// Enable or disable focus follows mouse for the operating system
FocusFollowsMouse(FocusFollowsMouse),
/// Toggle focus follows mouse for the operating system
ToggleFocusFollowsMouse,
/// Generate a library of AutoHotKey helper functions
AhkLibrary,
}
@@ -439,6 +441,9 @@ fn main() -> Result<()> {
&*SocketMessage::AdjustContainerPadding(arg.sizing, arg.adjustment).as_bytes()?,
)?;
}
SubCommand::ToggleFocusFollowsMouse => {
send_message(&*SocketMessage::ToggleFocusFollowsMouse.as_bytes()?)?;
}
SubCommand::ToggleTiling => {
send_message(&*SocketMessage::ToggleTiling.as_bytes()?)?;
}