Add a new "completions" command which takes a supported shell as an
argument. This command outputs a completions file to stdout, which can
be redirected to a file.
Mainly a cleanup PR - there were some subtle bugs introduced trying to
exclude the ManualNotification for cmd+tab focus changes, but since this
is all being delegated to the workspace reconciliator now, we can remove
those confusing matches! guards and that variant all together.
Screen locking and unlocking is a bit weird in macOS because it's
implemented as a separate app which is activated and deactivated, so
unique events for screen lock and unlock are never emitted by the
system.
This commit encapsulates the logic to detect the relevant events on the
loginwindow into the creation of ScreenLock and ScreenUnlock
WindowManagerEvent variants.
Hello infinite workspace switching loop, my old friend.
Reimplemented the old workspace reconciliator from komorebi for Windows
with additional source debouncing and tested by furiously mashing alt-1
and alt+2 for 20s. No loop!
Stupid Apple stuff. Something was up with Messages leaving a ghost tile
when being closed by the red dot vs. cmd+w - this change fixes that, but
will probably break something else.
This commit adds a new monitor configuration option
"window_hiding_position", which takes an enum with the variants
BottomLeft and BottomRight.
Until now the behaviour had been hard-coded to hide windows at the
bottom left of every monitor.
If no value is given on a monitor configuration object, this option will
default to BottomLeft.
This commit improves browser video fullscreen handling with borders. We
are now emitting an event for
AppKitWorkspaceNotification::NSWorkspaceActiveSpaceDidChangeNotification,
even though it doesn't have a pid, by passing a dummy 0 pid.
This is really stupid and I shouldn't do this.
This lets us act with more granularity in process_event to destroy or
redraw borders when entering or exiting browser video fullscreen.
In addition, the reaper has been updated to not reap fullscreen windows
so that they can be reintegrated into the layout without issue when
fullscreen is exited.
Doing runtime lookups via methods on Window in komorebi-bar won't work
because the AccessibilityObserver is not serialized and sent as part of
the notifications.
Instead, the notifications now take a snapshot of WindowDetails and
embed them so they can be read directly in komorebi-bar.
This commit migrates the komorebi-bar from komorebi for Windows. Mostly
lifting and shifting code, exposing stuff we need in komorebi-client
etc.
A few widgets will need to be reworked completely so they have been
removed for now.
Mouse and command stuff also needs updating a little so that has also
been removed for now.
This commit fixes a crash for subscribers who try to deserialize state
from notifications. Even though skip_deserializing is used on the
AccessibilityObserver, we still need a sane Default, so we wrap the
inner AXObserver in an Option and default to None.
This commit implements per-monitor and per-workspace wallpapers and
integrates with the theme manager to optionally generate themes based on
the palette of the wallpaper image.
Mostly a lift-and-shift from komorebi for Windows.
This commit enables the border, border_width, border_offset and
border_colours options in StaticConfig, and hooks them up to the
relevant variables in the border manager module.
This commit introduces a very introductory attempt at a border manager.
All of the colors work, from some brief usage it seems to behave as
expected based on windows, with some caveats.
There are issues with the window layering and popups which are annoyng -
the borders always stay drawn on top of RustRover popups, for example.
Also, the window tracking is incredibly slow and laggy when you try to
move or resize using the mouse.
Probably because the implementation uses NSWindow under the hood which
according to Google is notoriously unperformant. None of the config
options have been brought over yet.
The border manager is defaulting to off for now in the absence of config
- anyone at this commit who really wants to try it out should set
BORDER_ENABLED in border_manager/mod.rs to "true".
This commit switches from executing things which need a MainThreadMarker
in our main loop in main.rs to executing them via Grand Central Dispatch
using the dispatch2 crate.
All the monitor reconciliator stuff is now much faster.
This commit fixes a subtle boolean logic bug that I think was introduced
by a "cargo clippy --fix" to apply some new boolean chaining stuff in
Rust 2024.
Gotta be more careful.
This commit implements moving and resizing by mouse as it works in
komorebi for Windows. We're able to make this a bit nicer here because
macOS emits separate events for resizing and movement, so now we have
MoveStart/MoveEnd and ResizeStart/ResizeEnd.
Resizing is a little janky because the system does not update the
position of resized windows quickly enough, so if you do a quick drag
and release the left mouse button, sometimes the accessibility
attributes for the size and position of that window won't have been
updated, and no resize will take place.
Looks like macOS spams every single possible CGDisplayChangeSummaryFlag
whenever a display is added or removed, which ends up with a lot of
calls to the monitor reconciliator and a lot of locks on the wm state.
To better handle the spam this commit ensures we only send monitor
reconciliation notifications on the DesktopShapeChanged, Add and Remove
flags.
This commit implements the komorebic quickstart command, adds a sample
komorebi.json and a sample skhdrc file which get built into the
komorebic binary, and updates the default config path on macOS to
$HOME/.config/komorebi
This commit ensures that the floating layer behaviour configured by the
user at the top level of the config is propagated properly, and also
that it is respected during FocusChange events.
This commit adds a docgen command to generate markdown documentation
files of all of the CLI commands, and a justfile target to generate
JSONSchema files.
This commit fixes another deadlock and a forces the hiding of
non-focused workspaces on all monitors after a DisplayConnectionChange
event results in a different number of total monitors in the wm state.
This commit switches to using absolute intead of relative monitor sizes,
I don't fully understand by the NS APIs and the CG APIs return totally
different coordinate systems.
There was also a deadlock in the monitor reconciliator which I think I
figured out; it's a little ugly both in code and in execution but the
deadlocks and pkill -9s can be put away from now.
Cross-monitor moves aren't working which I'll look into next.
This is gonna drive me insane. Previous fix for something broke this.
Now we only try to focus in FocusChange on a base case if the workspace
we are on contains the target window.
This lets us fall through to the end of the handler which will try to
switch workspace if we know it's on another workspace.
Also fixed another bug around focusing the correct window on the
workspace switched to (since all the apps fire AX events when the
workspace is switched) by introducing a new ManualNotification which
lets us target the specific window that was cmd+tabbed to.