Commit Graph
3112 Commits
Author SHA1 Message Date
LGUG2Z f6bfae3103 docs(schema): avoid duplicating display format enums in bar
This commit also addresses some clippy warnings.
2025-12-23 17:07:56 -08:00
LGUG2Z 1e71cb7d92 docs(schema): publish versioned schema docs to lgug2z.com 2025-12-23 12:00:13 -08:00
LGUG2Z 4d67f5fed3 build(just): update schemagen and add schemapub 2025-12-22 20:45:44 -08:00
LGUG2Z c91224295f docs(schema): avoid duplicating display format enums in bar 2025-12-22 19:30:29 -08:00
LGUG2Z 4b1e3bd448 docs(schema): add deprecations and improve formatting 2025-12-21 21:56:17 -08:00
LGUG2Z 1cb8ed7f10 chore(deps): bump schemars to 1.1 2025-12-21 16:26:25 -08:00
LGUG2Z 1cb3327395 chore(deps): bump schemars to 1.1 and netdev to 0.40 2025-12-21 10:00:55 -08:00
LGUG2Z 13635817c3 docs(schema): clarify that 'theme' takes priority over 'border_colours' 2025-12-20 22:21:19 -08:00
LGUG2Z 90271f1f99 docs(schema): clarify that 'theme' take priority over 'border_colours' 2025-12-20 21:12:56 -08:00
LGUG2Z 9fde9ed6f8 chore(deps): cargo update 2025-12-20 11:40:31 -08:00
dependabot[bot] c6a13b04fd chore(deps): bump actions/upload-artifact from 5 to 6
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-16 18:37:51 -08:00
LGUG2Z ce4479eb9f chore(deps): cargo update 2025-12-16 18:05:51 -08:00
LGUG2Z e15f3f0c22 chore(deps): cargo update 2025-12-16 17:21:26 -08:00
LGUG2Z 8dfc70e6d2 fix(wm): consume more appkit events and make border manager reconcile focus
This commit ensures that NSWorkspaceDidActivateApplicationNotification
and NSWorkspaceDidDeactivateApplicationNotification get emitted not just
for the loginwindow but for all apps with a valid name.

This helps us to catch events from windows which don't emit
AXWindowCreated consistently like Mail, Calendar, etc.

Additionally, if a window has been closed with cmd+w but the application
is still active, the border manager will pick a window container to mark
as the new focused window container, and call window.focus() on the
selected window to align the focus with the focused border color.
2025-12-15 20:31:24 -08:00
LGUG2Z f3b7f5ac42 chore(clippy): odd unused_assignment failures in rust 1.92.0 2025-12-14 20:00:18 -08:00
LGUG2Z 382896dfd2 docs(readme): add detailed instructions for students w/ mdm devices 2025-12-14 14:16:48 -08:00
LGUG2Z ff4187aecf chore(dev): begin v0.1.40-dev 2025-12-14 14:07:44 -08:00
LGUG2Z 8f982e45d1 chore(release): v0.1.39 v0.1.39 2025-12-09 17:06:14 -08:00
LGUG2Z 309bfdfee1 chore(deps): update dependencies.json 2025-12-09 16:55:47 -08:00
LGUG2Z a0239faea0 refactor(cli): use "args" var name uniformly 2025-12-07 19:09:56 -08:00
LGUG2Z 73705136f0 chore(deps): cargo update 2025-12-07 18:07:19 -08:00
LGUG2Z bc6236abc0 refactor(cli): use "args" var name uniformly 2025-12-07 17:27:07 -08:00
LGUG2Z 999dd5d20d chore(deps): cargo update 2025-12-06 14:02:52 -08:00
LGUG2Z e434526f06 chore(deps): flake.lock: Update
Flake lock file updates:

• Updated input 'crane':
    'github:ipetkov/crane/d9e753122e51cee64eb8d2dddfe11148f339f5a2' (2025-11-23)
  → 'github:ipetkov/crane/2b3a5a88d852575758e1eb6ac9ee677fcd633fc1' (2025-12-05)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/0d59e0290eefe0f12512043842d7096c4070f30e' (2025-11-27)
  → 'github:NixOS/nixpkgs/a672be65651c80d3f592a89b3945466584a22069' (2025-12-05)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/9623580f8ce09ec444b9aca107566ec5db110e62' (2025-11-28)
  → 'github:oxalica/rust-overlay/086fd19a68e80fcc8a298e9df4674982e4c498a6' (2025-12-06)
2025-12-06 12:45:46 -08:00
LGUG2Z 82de4dd230 build(nix): clean runtime build inputs 2025-11-30 13:47:08 -08:00
LGUG2Z dcef667811 fix(config): ensure pathext replaces ~ with $home 2025-11-30 11:53:41 -08:00
bilogic 69086299e1 ci(github): render backticks in bug report template 2025-11-30 11:30:39 -08:00
LGUG2Z 2ff76f0881 fix(wm): disable monocle mode if window is closed
This commit ensures that monocle mode will be automatically disabled if
the last window in a monocle container is closed.
2025-11-29 14:41:25 -08:00
LGUG2Z 6b980a0360 fix(border): close nswindow on main thread
This commit addresses a bug that was introduced/made visible in a5cbb4d.

The nixpkgs flake input (tracking nixpkgs-unstable) was updated from
github:NixOS/nixpkgs/f6b44b2401525650256b977063dbcf830f762369 to
github:NixOS/nixpkgs/0d59e0290eefe0f12512043842d7096c4070f30e and as a
result the version of AppKit being linked against jumped from
2022.44.149 to 2487.50.124.

Builds prior to a5cbb4d were building against macOS 13 (Ventura) era
frameworks due to the use of compatability stubs in nixpkgs, whereas the
nixpkgs-unstable update in a5cbb4d now links against the actual running
system's framework versions (in this case, macOS 15).

With github:NixOS/nixpkgs/f6b44b2401525650256b977063dbcf830f762369:

```
❯ otool -L target/debug/komorebi | grep -E 'AppKit|Foundation|CoreFoundation|libSystem'
        /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1775.118.101)
        /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 2022.44.149)
        /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1775.118.101)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.100.5)
```

With github:NixOS/nixpkgs/0d59e0290eefe0f12512043842d7096c4070f30e

```
❯ otool -L target/debug/komorebi | grep -E 'AppKit|Foundation|CoreFoundation|libSystem'
        /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 2420.0.0)
        /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 2487.50.124)
        /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 2420.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.100.2)
```

Somewhere between macOS 13 and macOS 15 Apple added stricter
thread-safety assertions in the AppKit framework, which resulted in the
calls to `NSWindow::close()` in border.rs to crash on an assertion
failure ("transaction must be valid")

```
* thread #9, stop reason = EXC_BREAKPOINT (code=1, subcode=0x19e543cc0)
    frame #0: 0x000000019e543cc0 AppKit`-[NSWMWindowCoordinator performTransactionUsingBlock:] + 752
AppKit`-[NSWMWindowCoordinator performTransactionUsingBlock:]:
->  0x19e543cc0 <+752>: brk    #0x1
    0x19e543cc4 <+756>: adrp   x0, 827
    0x19e543cc8 <+760>: add    x0, x0, #0x4ba ; "assertion failure: transaction must be valid"
    0x19e543ccc <+764>: bl     0x19e6eb58c    ; symbol stub for: _os_crash
Target 0: (komorebi) stopped.
(lldb) bt
* thread #9, stop reason = EXC_BREAKPOINT (code=1, subcode=0x19e543cc0)
  * frame #0: 0x000000019e543cc0 AppKit`-[NSWMWindowCoordinator performTransactionUsingBlock:] + 752
    frame #1: 0x000000019e372a00 AppKit`-[NSWindow(NSWMWindowManagement) window:didUpdateWithChangedProperties:] + 104
    frame #2: 0x000000027a366720 WindowManagement`-[_WMWindow performUpdatesUsingBlock:] + 100
    frame #3: 0x000000027a365714 WindowManagement`-[_WMWindow applyTags😷] + 712
    frame #4: 0x000000027a365cf8 WindowManagement`-[_WMWindow setVisible:] + 84
    frame #5: 0x000000019d91b064 AppKit`-[NSWindow _setVisible:] + 268
    frame #6: 0x000000019da16df0 AppKit`-[NSWindow _doWindowWillBecomeHidden] + 88
    frame #7: 0x000000019e3662e0 AppKit`-[NSWindow _reallyDoOrderWindowOutRelativeTo:] + 160
    frame #8: 0x000000019e366794 AppKit`-[NSWindow _reallyDoOrderWindow:] + 80
    frame #9: 0x000000019e3669e4 AppKit`-[NSWindow _doOrderWindow:] + 264
    frame #10: 0x000000019e360c84 AppKit`-[NSWindow _finishClosingWindow] + 444
    frame #11: 0x000000019daa6cc8 AppKit`-[NSWindow _close] + 380
    frame #12: 0x0000000100c3380c komorebi`_$LT$$LP$$RP$$u20$as$u20$objc2..encode..EncodeArguments$GT$::__invoke::h1be54296556f108b(msg_send_fn=(libobjc.A.dylib`objc_msgSend), receiver=0x0000000132e09ea0, sel=Sel @ 0x0000000170b58e38, (null)=<unavailable>) at encode.rs:433:26
    frame #13: 0x0000000100c30f84 komorebi`objc2::runtime::message_receiver::msg_send_primitive::send::h0de1c4d240a2223f(receiver=0x0000000132e09ea0, sel=Sel @ 0x0000000170b58e78, args=<unavailable>) at message_receiver.rs:172:18
    frame #14: 0x0000000100c2e904 komorebi`objc2::runtime::message_receiver::MessageReceiver::send_message::h86c04ca17a2b6faf(self=0x0000000132e09ea0, sel=Sel @ 0x0000000170b58ed0, args=<unavailable>) at message_receiver.rs:432:38
    frame #15: 0x0000000100b9b1bc komorebi`_$LT$MethodFamily$u20$as$u20$objc2..__macro_helpers..msg_send_retained..MsgSend$LT$Receiver$C$Return$GT$$GT$::send_message::h6cb30a52e558d44c(receiver=0x0000000132e09ea0, sel=Sel @ 0x0000000170b58f48, args=<unavailable>) at msg_send_retained.rs:35:28
    frame #16: 0x0000000100ba14b8 komorebi`objc2_app_kit::generated::__NSWindow::NSWindow::close::h34bc4ef6fc286b23(self=0x0000000132e09ea0) at extern_methods.rs:266:14
    frame #17: 0x00000001002b22f0 komorebi`komorebi::border_manager::border::Border::destroy::_$u7b$$u7b$closure$u7d$$u7d$::h61d54fa62ea0b107((null)=AutoreleasePool @ 0x0000000170b58fb8) at border.rs:161:35
```

To fix this, this commit ensures that the call to `NSWindow::close()` is
made on the main thread using `DispatchQueue::main().exec_sync()`.
2025-11-29 14:09:26 -08:00
LGUG2Z a5cbb4dc2a chore(deps): flake.lock: Update
Flake lock file updates:

• Updated input 'crane':
    'github:ipetkov/crane/0cea393fffb39575c46b7a0318386467272182fe' (2025-11-07)
  → 'github:ipetkov/crane/d9e753122e51cee64eb8d2dddfe11148f339f5a2' (2025-11-23)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/f6b44b2401525650256b977063dbcf830f762369' (2025-11-08)
  → 'github:NixOS/nixpkgs/0d59e0290eefe0f12512043842d7096c4070f30e' (2025-11-27)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/aa1e85921cfa04de7b6914982a94621fbec5cc02' (2025-11-12)
  → 'github:oxalica/rust-overlay/9623580f8ce09ec444b9aca107566ec5db110e62' (2025-11-28)
2025-11-28 13:27:04 -08:00
LGUG2Z 0b34b8bfb1 build(nix): use flake-parts and treefmt 2025-11-28 13:27:04 -08:00
LGUG2Z 48a21eba61 fix(wm): explicitly init and process nsapplication events
For reasons unknown, CFRunLoop::run_in_mode no longer processes
NSApplication events on Tahoe.

Display callbacks seem to now be more tightly coupled to the
NSApplication event loop, so we initialize NSApplication with
sharedApplication as early as possible to establish a window server
connection, and then in our main loop we poll app.nextEvent every 0.1s
for NSApplication events, which is where the
DisplayReconfigurationListener callback will finally kick in again.
2025-11-26 09:18:47 -08:00
LGUG2Z 23a2cccdf6 docs(cli): improve quickstart output formatting 2025-11-25 20:18:40 -08:00
LGUG2Z 4114b10b05 chore(deps): cargo update 2025-11-25 09:00:14 -08:00
LGUG2Z 71402fe01b docs(wm): update splash for students 2025-11-25 08:59:35 -08:00
dependabot[bot] 5c2767d589 chore(deps): bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 14:42:05 -08:00
LGUG2Z f27cbc7121 fix(github): reduce artifact retention due to limits 2025-11-24 11:12:11 -08:00
LGUG2Z a03c466eed fix(bar): update the network widget in a separate thread
This commit was originally contributed as faed6ec by LGUG2Z/komorebi by
@CtByte

This commit changes the way how the default interface and network
activity is loaded by spawning a new thread on each request. This way
the main thread is not blocked by this process.

There has been instances where getting the default interface blocked the
egui ui thread, resulting in a frozen bar.
2025-11-23 11:31:24 -08:00
LGUG2Z ac67c41377 docs(schema): update jsonschema 2025-11-23 10:56:01 -08:00
Csaba faed6ec535 fix(bar): update the network widget in a separate thread
This commit changes the way how the default interface and network
activity is loaded by spawning a new thread on each request. This way
the main thread is not blocked by this process.

There has been instances where getting the default interface blocked the
egui ui thread, resulting in a frozen bar.

fix #1423 #1499
2025-11-23 10:55:55 -08:00
LGUG2Z 39e4aef485 chore(deps): cargo update 2025-11-22 13:01:56 -08:00
LGUG2Z 1a7d1a4cf2 fix(wm): promoting a container shouldn't change resize dimensions
This commit was originally contributed as 31c969f to LGUG2Z/komorebi by
@alex-ds13

- When promoting a container it is using the
  `remove_focused_container()` and `insert_container_at_idx` functions
  which will remove the focused container size from `resize_dimensions`
  and then add the new container with size `None`. Then it was adding
  the previously stored size of the main container back to the first
  one. However this would result in at least 3 issues:

    1. We were removing the size from index 0, however when inserting it
       back on the primary_idx we might not add it to index 0, specially
       now that there could be locked containers so if container 0 is
       locked we would be adding it to the next container, which would
       result in the main container having no size information which
       would result in a recalculation on the next update and it would
       revert back to default, so if a user had resized their containers
       that information would be lost.

    2. We were removing the size from index 0. Then on
       `remove_focused_container` it would remove the size from the
       focused container index, but since we had already removed one
       size from the `resize_dimensions` that index would no longer
       match the actual focused container, so once again we would be
       losing information.

    3. Since we were removing the size of the focused container idx from
       `resize_dimensions` (albeit the wrong one as stated above), this
       would mean that the container that moved to that position would
       have no resize information so it would show up as if the main
       container was taking up half width of the area, ignoring any user
       resize, until the next workspace update was triggered.

- This commit completely ignores the `resize_dimensions` since promoting
  a container simply means moving one container from one position to the
  main one (usually index 0) and then shift all the rest to the "right".
  The existing `resize_dimensions` should be kept untouched. To do this
  we use the functions `remove_respecting_locks` and
  `insert_respecting_locks` on the containers themselves, which simply
  move the container and shifts the others which is precisely what we
  want.
2025-11-22 12:59:38 -08:00
LGUG2Z 4ebba08b7d chore(deps): bump whkd to v0.2.10 2025-11-22 12:47:11 -08:00
alex-ds13 a733fecb49 fix(client): expose more useful structs 2025-11-22 12:44:48 -08:00
alex-ds13 31c969fc55 fix(wm): promoting a container shouldn't change resize dimensions
- When promoting a container it is using the
  `remove_focused_container()` and `insert_container_at_idx` functions
  which will remove the focused container size from `resize_dimensions`
  and then add the new container with size `None`. Then it was adding
  the previously stored size of the main container back to the first
  one. However this would result in at least 3 issues:

    1. We were removing the size from index 0, however when inserting it
       back on the primary_idx we might not add it to index 0, specially
       now that there could be locked containers so if container 0 is
       locked we would be adding it to the next container, which would
       result in the main container having no size information which
       would result in a recalculation on the next update and it would
       revert back to default, so if a user had resized their containers
       that information would be lost.

    2. We were removing the size from index 0. Then on
       `remove_focused_container` it would remove the size from the
       focused container index, but since we had already removed one
       size from the `resize_dimensions` that index would no longer
       match the actual focused container, so once again we would be
       losing information.

    3. Since we were removing the size of the focused container idx from
       `resize_dimensions` (albeit the wrong one as stated above), this
       would mean that the container that moved to that position would
       have no resize information so it would show up as if the main
       container was taking up half width of the area, ignoring any user
       resize, until the next workspace update was triggered.

- This commit completely ignores the `resize_dimensions` since promoting
  a container simply means moving one container from one position to the
  main one (usually index 0) and then shift all the rest to the "right".
  The existing `resize_dimensions` should be kept untouched. To do this
  we use the functions `remove_respecting_locks` and
  `insert_respecting_locks` on the containers themselves, which simply
  move the container and shifts the others which is precisely what we
  want.
2025-11-22 12:43:02 -08:00
LGUG2Z df2adde13d feat(wm): remove scrolling layout column fallbacks
This commit removes the fallback to the columns layout when the number
of columns on the scrolling layout is less than 3.
2025-11-18 16:00:28 -08:00
LGUG2Z a77b3e774a fix(docs): replace deprecated aliases in komorebi.bar.example.json
This commit ensures that we are using show_total_activity and
show_activity instead of show_total_data_transmitted and
show_network_activity in the komorebi.bar.example.json file which is
populated for users in the quickstart command.

JSONSchema is not smart enough to resolve aliases for backwards compat,
which results in confusing behaviour for new users trying to edit this
file.

fix #1596
2025-11-14 08:02:04 -08:00
LGUG2Z 5304a32d91 chore(deps): flake.lock: Update
Flake lock file updates:

• Updated input 'crane':
    'github:ipetkov/crane/50700219af884287ad7c85507e2f163b23a027a9' (2025-11-03)
  → 'github:ipetkov/crane/0cea393fffb39575c46b7a0318386467272182fe' (2025-11-07)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/ffcdcf99d65c61956d882df249a9be53e5902ea5' (2025-11-05)
  → 'github:NixOS/nixpkgs/f6b44b2401525650256b977063dbcf830f762369' (2025-11-08)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/9de55b59b6aaadbd9dbf223765a835239b767ee5' (2025-11-07)
  → 'github:oxalica/rust-overlay/aa1e85921cfa04de7b6914982a94621fbec5cc02' (2025-11-12)
2025-11-12 16:31:05 -08:00
LGUG2Z 66b8f838bd chore(deps): handle egui-related upgrades 2025-11-12 16:29:06 -08:00
LGUG2Z c8c4c3507c chore(deps): handle egui-related upgrades 2025-11-12 16:20:19 -08:00