Commit Graph
3112 Commits
Author SHA1 Message Date
LGUG2Z a830cfe58a build(rust): avoid calling shadow-rs twice 2025-11-07 14:40:23 -08:00
LGUG2Z 4e8caf2b2a chore(deps): flake.lock: Update
Flake lock file updates:

• Updated input 'crane':
    'github:ipetkov/crane/1979a2524cb8c801520bd94c38bb3d5692419d93' (2025-10-08)
  → 'github:ipetkov/crane/50700219af884287ad7c85507e2f163b23a027a9' (2025-11-03)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/87848bf0cc4f87717fc813a4575f07330c3e743c' (2025-10-20)
  → 'github:NixOS/nixpkgs/ffcdcf99d65c61956d882df249a9be53e5902ea5' (2025-11-05)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/a9121dc4ccd63e0309426b91bd7a494189516274' (2025-10-19)
  → 'github:oxalica/rust-overlay/9de55b59b6aaadbd9dbf223765a835239b767ee5' (2025-11-07)
2025-11-06 19:09:01 -08:00
LGUG2Z 8e7913c5ae chore(deps): cargo update 2025-11-06 19:06:04 -08:00
LGUG2Z db8cf858ff build(nix): pull git rev info from flake inputs
This commit adds a new workspace crate, version, which is consumed by
komorebi and komorebic.

If either of those binaries are being built by
the Nix Flake, the git rev info will be pulled from inputs.self.rev
instead of querying the git repo, because the git files are not passed
to the derivation.

The build.rs for the version crate decides if the build is happening by
querying the shadow-rs build output for BRANCH, which will always be
empty when a "nix build" is running.

Cargo builds will use the standard git information retrieval mechanisms
in shadow-rs.

The information in both cases is exposed as version::LONG_VERSION, and
passed to clap as the string to return when either binary is called with
the --version flag.
2025-11-06 16:57:17 -08:00
LGUG2Z 909b8b5df0 ci(github): add @acsandmann's codesigning trick to brew template 2025-11-05 08:43:45 -08:00
LGUG2Z 39e0ac31bd ci(github): add nightly version timestamp to brew formula 2025-11-05 08:36:27 -08:00
LGUG2Z df38facf9e feat(wm): make promote-swap reversible
This commit makes the komorebic promote-swap command reversible by
storing the previous container index in the Workspace state.

If the current container index is the same as the layout's primary
index, and there is a previous promotion swap container index available,
the two containers at those indices will be swapped, effectively making
a second call to promote-swap an undo.
2025-11-04 13:18:35 -08:00
LGUG2Z 6454393cb2 feat(wm): make promote-swap reversible
This commit makes the komorebic promote-swap command reversible by
storing the previous container index in the Workspace state.

If the current container index is the same as the layout's primary
index, and there is a previous promotion swap container index available,
the two containers at those indices will be swapped, effectively making
a second call to promote-swap an undo.
2025-11-04 13:14:32 -08:00
LGUG2Z 416dd94670 feat(wm): promote containers by swapping indices
This commit adds a new SocketMessage variant PromoteSwap and
corresponding komorebic promote-swap command.

PromoteSwap will also promote the focused window container to the
largest tile in the layout, but instead of removing the focused
container x from the Ring and inserting it into position 0, possibly
changing the positions of other windows between 0 and x, the indices x
and 0 in the Ring will be swapped directly.
2025-11-04 08:02:07 -08:00
LGUG2Z b09e979af5 feat(wm): promote containers by swapping indices
This commit adds a new SocketMessage variant PromoteSwap and
corresponding komorebic promote-swap command.

PromoteSwap will also promote the focused window container to the
largest tile in the layout, but instead of removing the focused
container x from the Ring and inserting it into position 0, possibly
changing the positions of other windows between 0 and x, the indices x
and 0 in the Ring will be swapped directly.
2025-11-04 07:53:29 -08:00
LGUG2Z d0ae92ca3a feat(wm): add visual feedback for preselection
This commit adds visual feedback in the form of a ghost tile for
preselections made by the preselect-direction command.

A container with the id "PRESELECT" will be added to the workspace, and
replaced when the next manage-able window is spawned.

A new command, cancel-preselect, has been added to remove both the
preselection index and the ghost tile if the user changes their mind.
2025-11-02 11:06:39 -08:00
LGUG2Z 4c0f34d7ef fix(wm): simplify stack-all command
Implements the equivalent of
https://github.com/LGUG2Z/komorebi/commit/18ee6678962bc31a39ce59fd4a1f6a9ee752ac5c

This commit makes the `stack-all` command simpler, by simply making a
`VecDeque` with all the tiled windows of the workspace, then it creates
a new container with that `VecDeque` and changes the workspace
containers to be just this new container which has all the windows in
it.

Then and only then do we focus and show the previously focused window
and hide all the rest.

This way we don't have a bunch of `FocusChange`/`Cloak`/`Uncloak` events
coming up which might conflict with each other when the user has
transparency and animations enabled.

With this commit, there will only be one focus event for the focused
window and one cloak event for each of the other windows.
2025-11-02 11:03:16 -08:00
LGUG2Z 34db2e2c90 feat(wm): add visual feedback for preselections
This commit adds visual feedback in the form of a ghost tile for
preselections made by the preselect-direction command.

A container with the id "PRESELECT" will be added to the workspace, and
replaced when the next manage-able window is spawned.

A new command, cancel-preselect has been added to remove both the
preselection index and the ghost tile if the user changes their mind.
2025-11-02 11:03:11 -08:00
LGUG2Z 3491dc7590 docs(readme): add note for people looking for komorebi for mac 2025-10-31 19:26:25 -07:00
LGUG2Z fe8dbca204 fix(wm): expand hack from 4d25d4e for chrome
This commit expands the hack introduced in 4d25d4e which deals with
inconsistent window titles returned by apps from different macOS APIs.
The same issue that was happening with Activity Monitor was also
happening with Google Chrome, so this hack has been updated to a more
general "contains" check.
2025-10-31 19:17:46 -07:00
LGUG2Z 3128968634 feat(wm): add direction preselection
This commit adds a new feature to preselect the direction of the next
spawned window with a corresponding komorebic preselect-direction
command which takes an OperationDirection.

If the OperationDirection is valid from the current position, it will be
stored in the Workspace state, and then read, applied, and deleted when
the next manage-able window is spawned.
2025-10-31 15:12:19 -07:00
LGUG2Z adbb6c1cb0 feat(wm): add direction preselection
This commit adds a new feature to preselect the direction of the next
spawned window with a corresponding komorebic preselect-direction
command which takes an OperationDirection.

If the OperationDirection is valid from the current position, it will be
stored in the Workspace state, and then read, applied, and deleted when
the next manage-able window is spawned.

Direction preselection does not (yet?) support the Grid layout.
2025-10-31 15:08:57 -07:00
LGUG2Z 29d9f9ecaa fix(wm): add ws reconciliator cooldown period
I was running komorebi on a MacBook Pro today and ended up quite quickly
being able to reproduce the ws switching loops that I thought I had
fixed (well, I still can't reproduce them on my Mac Mini).

This commit adds an additional cooldown period of 1s to
workspace_reconciliator::send_notification, which seems to do the trick
for me on the MacBook Pro.
2025-10-31 13:47:23 -07:00
alex-ds13 18ee667896 fix(wm): simplify stack-all command
This commit makes the `stack-all` command simpler, by simply making a
`VecDeque` with all the tiled windows of the workspace, then it creates
a new container with that `VecDeque` and changes the workspace
containers to be just this new container which has all the windows in
it.

Then and only then do we focus and show the previously focused window
and hide all the rest.

This way we don't have a bunch of `FocusChange`/`Cloak`/`Uncloak` events
coming up which might conflict with each other when the user has
transparency and animations enabled.

With this commit, there will only be one focus event for the focused
window and one cloak event for each of the other windows.
2025-10-30 13:57:17 -07:00
LGUG2Z 270e0847c2 fix(wm): account for partially-shown scrolling windows
This commit makes some small tweaks to account for the hiding and
showing of partially visible windows on the Scrolling layout.

This can happen when resize dimensions have been applied which leaves
only a certain percentage of the window within the work area.

If a window is only partially within the work area, the call to hide
will silently fail.

In order to deal with this there is some jank added when hiding
workspaces and updating workspaces to see if we are leaving a Scrolling
workspace with a partially-visible window, and if we are, to reposition
that window to be fully on within the work area before hiding it.
2025-10-30 13:47:49 -07:00
LGUG2Z 2eea8b79a4 feat(wm): improve scrolling layout window hiding
This commit makes a small improvement to the Scrolling layout by hiding
windows to which layouts which are not contained within the horizontal
bounds of the work area would otherwise be applied.

This should also allow this layout to now be useable on configurations
using multiple monitors.
2025-10-30 07:23:50 -07:00
LGUG2Z 1a42c64620 feat(cli): add feedback to the license cmd 2025-10-29 08:48:25 -07:00
LGUG2Z 9711a00cd0 feat(cli): add feedback to the license cmd 2025-10-29 08:41:47 -07:00
LGUG2Z 9dbae50909 feat(wm): add a splash screen for mdm devices
A little nudge for people to do the right thing, 1990s vibes.
2025-10-28 18:25:05 -07:00
LGUG2Z b613986474 feat(wm): add a splash screen for mdm devices
A little nudge for people to do the right thing, 1990s vibes.
2025-10-28 18:03:17 -07:00
LGUG2Z 202238aecd docs(mkdocs): add homebrew installation instructions 2025-10-27 12:21:50 -07:00
LGUG2Z 2ecc2819ec feat(wm): order borders relative to tracking windows 2025-10-27 09:22:46 -07:00
dependabot[bot] e93751aa5f chore(deps): bump actions/upload-artifact from 4 to 5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 09:07:45 -07:00
dependabot[bot] 9872dcd0d7 chore(deps): bump actions/download-artifact from 5 to 6
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 09:07:32 -07:00
LGUG2Z fc9659d116 build(github): only publish gist from master branch 2025-10-27 09:06:24 -07:00
LGUG2Z e16a885a5e feat(config): add border radius option
This commit adds a border_radius configuratino option which defaults to
10, which matches the uniform radius on Sequoia. Tahoe is a mess, but
people can at least specify their own preferred border radius value now.
Eventually we should look up the radius of each individual window when
creating the borders like JankyBorders does (I think?)
2025-10-27 09:06:20 -07:00
LGUG2Z b2dd82ba4d ci(github): publish schema.json to a public gist 2025-10-27 08:20:00 -07:00
LGUG2Z b892504f9e chore(deps): cargo update + bump actions/upload-artifact 2025-10-27 08:15:58 -07:00
LGUG2Z 4d25d4efb0 fix(wm): add hack to manage activity monitor on start
I was running into this a lot when debugging the WindowServer memory
ballooning issue fixed in the last commit - the title returned by
CGWindowListCopyWindowInfo and the title returned by kAXWindowsAttribute
for Activity Monitor differs, so when restarting komorebi, if Activity
Monitor is open, it wouldn't get managed.

Added a little hack as a workaround for now.
2025-10-26 19:51:29 -07:00
LGUG2Z 2e4660dc12 fix(wm): ensure border resource cleanups
This commit wraps the various lifecycle methods for border creation,
update and destruction in autoreleasepools to ensure that WindowServer
memory doesn't balloon.
2025-10-26 19:37:40 -07:00
LGUG2Z f93cf44aba ci(github): attach homebrew formula to nightly release 2025-10-26 13:41:29 -07:00
LGUG2Z d62f824d2b ci(github): publish nightly releases 2025-10-25 13:08:08 -07:00
LGUG2Z a2831d2b7f ci(github): run checks and build with nix 2025-10-20 16:09:19 -07:00
LGUG2Z 0b88af0fee ci(github): switch to self-hosted runners 2025-10-20 09:58:01 -07:00
LGUG2Z f99c82f5d4 ci(github): reduce workflow costs 2025-10-20 08:12:27 -07:00
LGUG2Z 1abdf0a032 chore(deps): bump block2, netdev and which 2025-10-19 11:44:41 -07:00
LGUG2Z 8a9a9fe661 chore(deps): flake.lock: Update
Flake lock file updates:

• Updated input 'crane':
    'github:ipetkov/crane/1e7905b1eb1b551aade75169940557b6c51ed920' (2025-10-05)
  → 'github:ipetkov/crane/1979a2524cb8c801520bd94c38bb3d5692419d93' (2025-10-08)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/7df7ff7d8e00218376575f0acdcc5d66741351ee' (2025-10-02)
  → 'github:nixos/nixpkgs/544961dfcce86422ba200ed9a0b00dd4b1486ec5' (2025-10-15)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/edea9f33f9a03f615ad3609a40fbcefe0ec835ca' (2025-10-06)
  → 'github:oxalica/rust-overlay/a9121dc4ccd63e0309426b91bd7a494189516274' (2025-10-19)
2025-10-19 11:32:15 -07:00
LGUG2Z 3ab47e8a9c chore(deps): cargo update 2025-10-19 11:32:15 -07:00
LGUG2Z a9029fee41 build(nix): separate targets and add flake overlays 2025-10-19 11:32:15 -07:00
LGUG2Z 573469d1c3 ci(github): add build workflow 2025-10-19 11:32:11 -07:00
LGUG2Z b255058467 docs(cli): add eol annotations to ahk flags
Marking all --ahk flags in the start/stop/kill/enable-autostart commands
as EOL; there are any number of ways that users can manage their own
launching of AutoHotKey scripts and the complexity of the different ways
that AHK can be installed is not worth the maintenance burden for this
project.
2025-10-17 16:41:06 -07:00
LGUG2Z 2abe618354 feat(wm): add opt to constrain grid layout by rows
This commit adds a new LayoutOptions option, GridLayoutOptions,
currently with a single configurable "rows" opt which can be use to
constrain the grid by number of rows.
2025-10-17 16:41:03 -07:00
LGUG2Z f848c1d8f0 feat(wm): add opt to constrain grid layout by rows
This commit adds a new LayoutOptions option, GridLayoutOptions,
currently with a single configurable "rows" opt which can be use to
constrain the grid by number of rows.
2025-10-17 16:29:58 -07:00
LGUG2Z c255772897 fix(wm): add generic window validity check to reaper
Calibre was being very weird and failing layout updates when a menu
button was clicked (#justcalibrethings) so I've added a final window
validity escape hatch check to the reaper for now.
2025-10-16 10:09:32 -07:00
LGUG2Z e953715fef feat(wm): track virtual desktop ids on state and global state
Also moved out State and GlobalState to state.rs to match the emerging
pattern in komorebi for Mac.
2025-10-14 13:11:12 -07:00