mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-06-11 21:22:51 +02:00
feat(ffm): explicitly require flag to enable
Following the discovery that the custom FFM implementation significantly increases CPU usage, and that the underlying library used to track mouse events is already as optimised as possible for CPU usage, this commit makes the enabling of custom FFM explicit via a command line flag when launching the window manager. The underlying library does not provide for a way to clean up and recreate a message loop on demand, which means that once it starts, there is no way of reclaiming those CPU cycles even when FFM is disabled. If a user has not started komorebi with the --ffm flag and tries to enable or toggle custom FFM, a warning will be shown in the logs and komorebi will override their selection to operate on the Windows FFM implementation. In light of this, the default implementation values for komorebic's FFM commands have been updated to 'windows'. This commit also takes the opportunity to allow the state and stop commands to pass when the window manager is in a paused state. resolve #33
This commit is contained in:
@@ -171,12 +171,17 @@ desktop, the task bar, and the system tray as windows and switches focus to them
|
||||
implementation, which only considers windows managed by `komorebi` as valid targets to switch focus to when moving the
|
||||
mouse.
|
||||
|
||||
When calling any of the `komorebic` commands related to focus-follows-mouse functionality, the `komorebi`
|
||||
implementation will be chosen as the default implementation. You can optionally specify the `windows` implementation by
|
||||
To enable the `komorebi` implementation you must start the process with the `--ffm` flag to explicitly enable the feature.
|
||||
This is because the mouse tracking required for this feature significantly increases the CPU usage of the process (on my
|
||||
machine, it jumps from <1% to ~4~), and this CPU increase persists regardless of whether focus-follows-mouse is enabled
|
||||
or disabled at any given time via `komorebic`'s configuration commands.
|
||||
|
||||
When calling any of the `komorebic` commands related to focus-follows-mouse functionality, the `windows`
|
||||
implementation will be chosen as the default implementation. You can optionally specify the `komorebi` implementation by
|
||||
passing it as an argument to the `--implementation` flag:
|
||||
|
||||
```powershell
|
||||
komorebic.exe toggle-focus-follows-mouse --implementation windows
|
||||
komorebic.exe toggle-focus-follows-mouse --implementation komorebi
|
||||
```
|
||||
|
||||
## Configuration with `komorebic`
|
||||
|
||||
Reference in New Issue
Block a user