Compare commits

...

1060 Commits

Author SHA1 Message Date
Rejdukien
10af1f3c84 fix(wm): clear last error before calling GetWindowLongPtrW
Apparently there is a quirk of GetWindowLongPtr when querying styles. If
the style bits are genuinely 0, the API returns 0 but does not clear the
last error.

If a previous API call set an error, GetWindowLongPtr might define
"failure" as "return 0 AND GetLastError != 0".

Hence, it is important to clear the last/previous error before calling
GetWindowLongPtrW to ensure that we don't misinterpret a valid 0 return
value as an error.
2026-01-08 18:51:06 -08:00
LGUG2Z
dcb1cd32fa chore(deps): cargo update 2026-01-08 18:25:33 -08:00
LGUG2Z
17a8ac5810 feat(config): add default_workspace_layout opt
This commit adds a default_workspace_layout opt, which defaults to BSP
to maintain backwards compatibility. This can also be set to "None".

When set to "None" or omitted, the default behaviour for new or
undefined workspaces (i.e. on monitors without config blocks) will be
non-tiling.  Otherwise, the given value will be the default layout
applied.
2026-01-08 18:12:30 -08:00
LGUG2Z
8805fafa99 feat(bar): make explicit monitor config optional
This commit makes the monitor configuration option for the komorebi-bar
optional, defaulting to index 0.
2026-01-04 19:15:24 -08:00
LGUG2Z
1219c3d118 refactor(bar): inline defaults in schemars attrs 2026-01-04 19:08:41 -08:00
LGUG2Z
b792328676 fix(splash): show mdm workspace tenant name instead of mdm url
The WorkspaceTenantName is populated far more consistently than MdmUrl.

This commit switches to extracting that instead and passing it on to the
MDM splash screen so that users on non-corporate devices who may have
unintentionally enrolled themselves into BYOD MDM by logging into an
account a clicking "Yes" on some dark pattern pop-up have a clear
indication of why they are seeing the splash, and can take the
appropriate steps to remove the MDM profile from their system if
desired.
2026-01-04 07:33:32 -08:00
LGUG2Z
a7380db47c docs(readme): add debugging instructions for people who don't know they've been mdm'd 2026-01-04 07:15:59 -08:00
LGUG2Z
086993a7c0 fix(cli): respect --bar flag in start even when no config is resolved
I think this got broken as part of the automatic Rust version syntax
upgrades which joined two if clauses together with && which should have
been kept separate.

Now, if the user gives the --bar flag to the start command, and a static
config file is not resolved, or if the static config file does not have
a bar_configurations stanza, it will fallthrough to the default
PowerShell snippet to try and start komorebi-bar without an explicit
--config flag.
2026-01-03 16:55:59 -08:00
LGUG2Z
51e1337f40 fix(wm): consider window count when calculating scrolling column width
This commit fixes the stupidest of stupid bugs. Column width
calculations on the Scrolling layout should take the number of windows
into account, especially when lower than the configured column count.
2026-01-01 13:07:18 -08:00
LGUG2Z
6cef8d9ef6 refactor(schema): simplify defaults in static_config 2025-12-31 13:04:34 -08:00
LGUG2Z
6e36b81669 build(nix): add flake.nix for cross-compilation from darwin and linux
I was getting really tired of having to switch between display inputs to
different platform-specific machines to be able to make and test changes
on komorebi for Windows and komorebi for Mac.

With this commit, the `flake.nix` provides a Nix devShell and crane
build for users to make and validate changes with `cargo check`, `cargo
clippy` and `cargo build` with the Windows MSVC toolchain on Linux and
macOS.
2025-12-28 17:24:41 -08:00
LGUG2Z
0758c7d900 refactor(theme): centralize theme-related code in komorebi-themes
Getting tired of making little changes in both this and the komorebi for
Mac repo - I think eventually either komorebi-themes will live in its
own repo or komorebi for Mac will be integrated here.

But for now, at least everything is defined in komorebi-themes and I
don't have to redefine any theme-related stuff in komorebi for Mac.
2025-12-27 21:58:39 -08:00
LGUG2Z
f77a303b30 docs(schema): ensure every enum variant has a renderable title 2025-12-27 20:34:31 -08:00
LGUG2Z
3a81f7babb docs(schema): ensure all public-facing bar config opts have docstrings 2025-12-27 13:40:45 -08:00
LGUG2Z
3d8778a7d6 docs(schema): ensure all public-facing static config opts have docstrings 2025-12-27 12:58:46 -08:00
LGUG2Z
a42e809ade docs(config): encode defaults of unwrapped options into schema
This commit ensures that the various default values that the different
Option<T> config properties can be unwrapped to are encoded by schemars
so that they can be picked up by docgen.
2025-12-26 18:16:55 -08:00
LGUG2Z
66c5766848 feat(cli): add custom output fir for docgen cmd 2025-12-26 10:26:00 -08:00
LGUG2Z
ac56590791 chore(clippy): address warnings 2025-12-23 17:19:00 -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
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
LGUG2Z
ce4479eb9f chore(deps): cargo update 2025-12-16 18:05:51 -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 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
999dd5d20d chore(deps): cargo update 2025-12-06 14:02:52 -08:00
bilogic
69086299e1 ci(github): render backticks in bug report template 2025-11-30 11:30:39 -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
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
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
c8c4c3507c chore(deps): handle egui-related upgrades 2025-11-12 16:20:19 -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
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
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
3491dc7590 docs(readme): add note for people looking for komorebi for mac 2025-10-31 19:26:25 -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
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
1a42c64620 feat(cli): add feedback to the license cmd 2025-10-29 08:48:25 -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
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
f99c82f5d4 ci(github): reduce workflow costs 2025-10-20 08:12:27 -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
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
LGUG2Z
2ac1929117 feat(wm): add opt to keep focused column centered on scrolling layout
This commit adds a new option under layout_options.scrolling -
"center_focused_column", which defaults to false. When

set to true, and when the number of scrolling columns is an odd number
>=3, komorebi will, if there are enough windows being managed on the
workspace, and if the focused window is not too close to either the
beginning or the end of the workspace ring, keep the focused window in a
centered position in the layout
2025-10-10 17:39:32 -07:00
LGUG2Z
e33a5f28f0 chore(deps): bump windows-rs 2025-10-07 09:43:39 -07:00
LGUG2Z
15d069f2bf chore(deps): bump sysinfo and which 2025-10-07 09:11:20 -07:00
LGUG2Z
3e9947c2e2 ci(github): make sure clippy is installed 2025-10-01 16:04:28 -07:00
LGUG2Z
1c23439f95 chore(deps): bump egui and eframe to 0.32 2025-09-30 18:30:04 -07:00
LGUG2Z
6eb2905e00 refactor(rust): use eyre::Result uniformly
Matching the emerging style in komorebi for Mac
2025-09-30 18:21:14 -07:00
LGUG2Z
52a745d0a3 refactor(rust): upgrade to edition 2024 part 2 (clippy --fix) 2025-09-24 11:15:03 -07:00
LGUG2Z
80877cc449 refactor(rust): upgrade to edition 2024 part 1 2025-09-24 11:09:08 -07:00
LGUG2Z
160cb7202d chore(deps): cargo update 2025-09-20 16:59:07 -07:00
Csaba
8d085df1ba fix(bar): update network interface less frequently
This commit ensures that the default interface for the network widget does not update on every render of the bar.

Some people have experienced the bar being frozen and hopefully this will remediate that issue.
2025-09-20 15:59:59 -07:00
LGUG2Z
5d48a5c5b4 chore(clippy): apply latest fixes 2025-09-20 14:47:35 -07:00
LGUG2Z
539aeec965 refactor(rust): remove getset dependency 2025-09-20 14:34:19 -07:00
LGUG2Z
bcfb058bc3 refactor(rust): standardize on ok_or_eyre and bail!
This commit standardizes the codebase to disallow usage of the raw eyre!
macro for creating errors, instead using ok_or_eyre() when constructing
ad-hoc errors from Result and Option types, and otherwise using the
bail! macro in response to failed boolean conditions.
2025-09-20 12:59:09 -07:00
LGUG2Z
e07b464b0d chore(dev): begin 0.1.39-dev 2025-09-20 12:59:09 -07:00
LGUG2Z
ffa76ea28c chore(release): v0.1.38 2025-09-12 17:36:04 -07:00
Lucas de Linhares
2c00d79968 perf(cargo): add release-opt profile 2025-09-12 17:05:24 -07:00
LGUG2Z
78177af6b8 docs(mkdocs): run docgen, depgen and jsonschema targets 2025-09-09 08:56:29 -07:00
dependabot[bot]
86e0d40828 chore(deps): bump actions/github-script from 7 to 8
Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 10:03:38 -07:00
LGUG2Z
48f6ac8964 chore(deps): cargo update 2025-09-08 08:17:40 -07:00
omark96
1db572f789 feat(wm): implement Clone for State, Notification and NotificationEvent
This implements Clone for State, Notification and NotificationEvent to allow for the use of these
types in Rhai scripts.
2025-09-02 07:53:36 -07:00
1337cookie
3dad77533b feat(bar): add config opts for ro and removable disks
This lets the user enable or disable showing removable or read only
disks in the komorebi-bar storage widget.

Removable disks are set to show by default.

Read-only disks are set not to show by default. Having windows sandbox
installed displays a very long read only disk which could be problematic
for new users.
2025-09-01 15:15:41 -07:00
omark96
f40fb9a251 feat(wm): add config option to set tiling
This commit adds the option to set whether a workspace should be tiled or not by default. It retains
the default behaviour of komorebi, but adds the option to set a workspace to not be tiled by
default, but still be able to change the default layout for that workspace.
2025-09-01 15:04:59 -07:00
omark96
b4e16e43e9 feat(cli): change quickstart to prompt user before writing files
This commit makes it so the quickstart command first checks for the existence of the config files.
If they don't exist it writes them, if they do exist it prompts the user to whether or not they want
to overwrite the existing files. Lastly it prints the full path to the files that were written. This
is to prevent users from accidentally overwriting their configs as well as making it clearer where
komorebi places the config files for new users.
2025-09-01 15:03:48 -07:00
LGUG2Z
4c2e8ff6d2 chore(deps): cargo update 2025-09-01 15:03:09 -07:00
Jerry Kingsbury
c879aae1e7 test(wm): monocle on and off on nonexistent container
Created a test that tests moving a nonexistent container to monocle and
retreiving a nonexistent container from monocle. The test ensures we
receive an error when attempting to use monocle_on or monocle_off when a
container doesn't exist.
2025-08-27 18:05:07 -07:00
Jerry Kingsbury
7e87e83189 test(wm): toggle monocle on nonexistent container
Created a test to test toggle monocle when a container doesn't exist in
the monitor. The test ensures that we receive an error when attempting
to call toggle monocle when a monitor doesn't contain a container.
2025-08-27 18:05:07 -07:00
Jerry Kingsbury
aae9338f66 test(wm): toggle maximize a nonexistent window
The test ensures that we receive an error when attempting to toggle
maximize a window that doesn't exist.
2025-08-27 18:05:07 -07:00
Jerry Kingsbury
f68a709f1d test(wm): float nonexistent window
Created a test to test trying to float a nonexistent window. The test
ensures that we receive an error when trying to float a window in an
empty container
2025-08-27 18:05:07 -07:00
Jerry Kingsbury
c76846ac63 test(wm): cycle windows in an empty container
Created a test to test cycling windows in an empty container. The test
ensures that when attempting to cycle windows in an empty container it
will push out an error.
2025-08-27 18:05:07 -07:00
Jerry Kingsbury
b29dd8b1d1 test(wm): remove nonexistent window from container
Created a test that tests removing a nonexistent window from a
container. The test creates a monitor containing an empty container and
attempts to remove a window from the container. The test ensures that
the result is an error when calling remove_window_from_container.
2025-08-27 18:05:07 -07:00
omark96
59c3c14731 feat(config): add work-area-offset per workspace
This commit adds the option to set 'work_area_offset' per workspace. If
no workspace work area offset is set for that workspace it will instead
use the value of the globals.work_area_offset for that workspace.

This commit adds a command to set the work area offset of a workspace
given a monitor index and a workspace index.
2025-08-27 18:05:07 -07:00
dependabot[bot]
db96f2cc5a chore(deps): bump reqwest from 0.12.22 to 0.12.23
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.12.22 to 0.12.23.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.22...v0.12.23)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-version: 0.12.23
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-27 18:05:07 -07:00
dependabot[bot]
a37a6752a8 chore(deps): bump clap from 4.5.41 to 4.5.45
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.41 to 4.5.45.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.41...clap_complete-v4.5.45)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.45
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-27 18:05:07 -07:00
loeiks
4d0df9c5b5 fix(cli): fix typo in the toggle-pause docs 2025-08-27 18:05:07 -07:00
dependabot[bot]
f8ea62f857 chore(deps): bump shadow-rs from 1.2.0 to 1.2.1
Bumps [shadow-rs](https://github.com/baoyachi/shadow-rs) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/baoyachi/shadow-rs/releases)
- [Commits](https://github.com/baoyachi/shadow-rs/compare/v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: shadow-rs
  dependency-version: 1.2.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-17 10:09:45 -07:00
dependabot[bot]
93bb41737b chore(deps): bump serde_json from 1.0.141 to 1.0.142
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.141 to 1.0.142.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.141...v1.0.142)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-version: 1.0.142
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-17 10:09:35 -07:00
dependabot[bot]
280352eeef chore(deps): bump actions/download-artifact from 4 to 5
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-17 10:06:45 -07:00
dependabot[bot]
7619b9b4ed chore(deps): bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [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/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-17 10:06:36 -07:00
dependabot[bot]
72a4d5276e chore(deps): bump slab from 0.4.10 to 0.4.11
Bumps [slab](https://github.com/tokio-rs/slab) from 0.4.10 to 0.4.11.
- [Release notes](https://github.com/tokio-rs/slab/releases)
- [Changelog](https://github.com/tokio-rs/slab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/slab/compare/v0.4.10...v0.4.11)

---
updated-dependencies:
- dependency-name: slab
  dependency-version: 0.4.11
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 07:07:54 -07:00
JustForFun88
4bb3b83d57 refactor(bar) split komorebi widget into smaller parts
This PR significantly refactors the komorebi  bar rendering logic,
simplifying state management, and addressing some found bugs. The
primary motivation was to make the codebase more readable and
maintainable.

Key Changes:

- Allocation Reduction: Removed most per-frame structure allocations.

- Runtime Matching Elimination: Replaced runtime pattern matching with
  pre-selected function pointers determined at initialization. Widget
  validations and configurations are now performed during widget
  creation rather than per-frame checks. For example, widget enablement
  is now handled by an Option that wraps each ..Bar structure. If a
  widget is enabled, its structure is present; otherwise, it is None.
  This eliminates the need for runtime enabled checks.

- Widget Modularity: Code is split into smaller parts, reducing
  complexity.

Bug Fixes:

- Corrected icon sizing for floating windows following regular
  containers, ensuring icons revert correctly from icon_size to
  text_size.

- There was also another bug with a floating window positioned above a
  monocle container, but I forgot the details 😅
2025-07-31 17:14:39 -07:00
omark96
ccd2f3a464 fix(wm): move last_focused_workspace logic to focus_workspace method
There are currently a number of commands that do not update the previously focused workspace
correctly. The previous method relied on handling each case, this change makes it so that
last_focused_workspace is always updated whenever the focus is changed.
2025-07-23 09:47:57 -07:00
dependabot[bot]
7e242ada66 chore(deps): bump netdev from 0.35.3 to 0.36.0
---
updated-dependencies:
- dependency-name: netdev
  dependency-version: 0.36.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-21 10:59:39 -07:00
dependabot[bot]
5b2acd0f12 chore(deps): bump shadow-rs from 1.1.1 to 1.2.0
Bumps [shadow-rs](https://github.com/baoyachi/shadow-rs) from 1.1.1 to 1.2.0.
- [Release notes](https://github.com/baoyachi/shadow-rs/releases)
- [Commits](https://github.com/baoyachi/shadow-rs/compare/v1.1.1...v1.2.0)

---
updated-dependencies:
- dependency-name: shadow-rs
  dependency-version: 1.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-20 19:14:59 -07:00
LGUG2Z
ec0bbaae98 chore(deps): cargo update 2025-07-20 18:49:37 -07:00
LGUG2Z
3c44f3bfdb refactor(clippy): apply lints 2025-07-19 16:42:25 -07:00
Martin Hjulstad Bednar
7839980ddf feat(shortcuts): show all hotkey bindings
- Removed command filtering logic from the shortcuts UI.
- All hotkey bindings are now shown regardless of command.
- Improved UI with hint text for the filter input.
2025-07-16 21:04:15 -07:00
JustForFun88
6416c0b6eb refactor(wm): move 'locked' flag down to containers
Key Changes
- Added `locked: bool` field directly to the `Container` struct.
- Removed `locked_containers` from `Workspace`.
- Updated `komorebi_bar` to access `locked` directly
  from `Container`.

Insert and swap operations respects `locked` container
indexes in the sequence
2025-06-15 12:30:03 -07:00
LGUG2Z
f6ccec9505 chore(deps): cargo update 2025-06-14 16:44:55 -07:00
LGUG2Z
21cb5e1e6f feat(stackbar): set title as default label
Following discussing in #1475, and considering the default of the
komorebi widget in komorebi-bar, this commit updates the default
StackbarLabel from Process to Title.

resolve #1475
2025-06-05 22:03:53 -07:00
LGUG2Z
009c0dcd28 chore(deps): cargo update 2025-06-04 15:54:15 -07:00
LGUG2Z
98c5ab3b9b fix(wm): prevent stack-all issues with n>1 stacks on ws
This commit ensures that unstack_all is called on a workspace before
attempting to proceed with stack_all to avoid stacking loops that can
occur when there are multiple pre-existing stacks already created on the
workspace.
2025-06-04 15:51:05 -07:00
dependabot[bot]
d4eeec994f chore(deps): bump netdev from 0.34.0 to 0.35.1
Bumps [netdev](https://github.com/shellrow/netdev) from 0.34.0 to 0.35.1.
- [Release notes](https://github.com/shellrow/netdev/releases)
- [Commits](https://github.com/shellrow/netdev/commits)

---
updated-dependencies:
- dependency-name: netdev
  dependency-version: 0.35.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 10:47:34 -07:00
dependabot[bot]
e9ed1cfd3b chore(deps): bump reqwest from 0.12.15 to 0.12.19
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.12.15 to 0.12.19.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.15...v0.12.19)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-version: 0.12.19
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 10:47:05 -07:00
dependabot[bot]
4a2eb391f7 chore(deps): bump clap from 4.5.38 to 4.5.39
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.38 to 4.5.39.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.38...clap_complete-v4.5.39)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.39
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 10:46:48 -07:00
LGUG2Z
41e18bccc6 fix(stackbar): show regular cursor on hover
This commit ensures that the WM_SETCURSOR message is handled by stackbar
windows by setting the cursor to the default IDC_ARROW, which prevents
the spinning "Loading" icon from showing on hover.

re #1456
2025-05-27 08:12:58 -07:00
LGUG2Z
3d373b3630 fix(schema): flatten bar mouse config opts 2025-05-26 09:52:14 -07:00
LGUG2Z
b4e61b079c feat(wm): add scrolling layout
This commit adds a new DefaultLayout::Scrolling variant, along with a
new LayoutOptions configuration which will initially be used to allow
the user to declaratively specify the number of visible columns for the
Scrolling layout, and a new komorebic "scrolling-layout-columns" command
to allow the user to modify this value for the focused workspace at
runtime.

The Scrolling layout is inspired by the Niri scrolling window manager,
presenting a workspace as an infinite scrollable horizontal strip with a
viewport which includes the focused window + N other windows in columns.
There is no support for splitting columns into multiple rows.

This layout can currently only be applied to single-monitor setups as
the scrolling would result in layout calculations which push the windows
in the columns moving out of the viewport onto adjacent monitors.

This implementation in the current state is enough to be useable for me
personally, but if others want to iterate on this, make it handle
hiding/restoring windows correctly when scrolling the viewport so that
adjacent monitors don't get impacted etc., patches are always welcome.

resolve #1434
2025-05-17 21:12:51 -07:00
LGUG2Z
eec6312a51 chore(dev): begin v0.1.38-dev 2025-05-17 20:26:13 -07:00
LGUG2Z
00384ce333 chore(release): v0.1.37 2025-05-17 11:44:55 -07:00
LGUG2Z
e75578d9ce ci(github): skip backwards compat test 2025-05-17 08:25:23 -07:00
alex-ds13
50c850cb02 feat(wm): floating over monocle
This commit allows for floating windows on the floating workspace layer
to be toggled on and off when monocle mode is enabled on a workspace.
2025-05-16 16:35:47 -07:00
Jerry Kingsbury
5a1af5b133 test(wm): swap container with non-existent container
Created a test for swapping a container with a container that doesn't
exist, which ensures that we receive an error and that the contents of
the container is still available when attempting to swap a container
with a non-existent one.

A bug was discovered where the origin container was being removed even
though the swap_container function would return an error.

@LGUGZ discovered that the issue was due to the origin container being
removed before verifying that both containers exist. The fix that @LGUGZ
came up with is included.
2025-05-16 16:24:02 -07:00
Jerry Kingsbury
74c433185a test(wm): switch focus to non-existent monitor
Created a test for focusing on a monitor that doesn't exist, which
ensures that we receive an error and that we are still focused on the
current monitor when attempting to focus a non-existent monitor.
2025-05-16 16:24:02 -07:00
Jerry Kingsbury
71bb346c89 test(wm): swap workspace with non-existent monitor
Created a test for swapping workspaces with a monitor that doesn't
exist, which ensures that we receive an error and that none of the
workspaces were moved when attempting to swap workspaces with a monitor
that doesn't exist.
2025-05-16 16:23:55 -07:00
LGUG2Z
3feff1dca9 docs(schema): update jsonschema and docgen 2025-05-15 18:28:27 -07:00
JustForFun88
3019eaf89c refactor(bar): app widget and icon caching
PR #1439 authored and submitted by @JustForFun88

I understand this PR combines two areas of work — refactoring the
Applications widget and introducing a new icon caching system —
which would ideally be submitted separately.

Originally, I only intended to reduce allocations and simplify icon
loading in `applications.rs`, but as I worked through it, it became
clear that a more general-purpose caching system was needed. One
improvement led to another ... 😄

Apologies for bundling these changes together. If needed, I’m happy to
split this PR into smaller, focused ones.

Key Changes

- Introduced `IconsCache` with unified in-memory image & texture
  management.
- Added `ImageIcon` and `ImageIconId` (based on path or HWND) for
  caching and reuse.
- `Icon::Image` now wraps `ImageIcon`, decoupled from direct `RgbaImage`
  usage.
- Extracted app launch logic into `UserCommand` with built-in cooldown.
- Simplified config parsing and UI hover rendering in `App`.
- Replaced legacy `ICON_CACHE` in
  `KomorebiNotificationStateContainerInformation`
  → Now uses the shared `ImageIcon::try_load(hwnd, ..)` with caching and fallback.

Motivation

- Reduce redundant image copies and avoid repeated pixel-to-texture
  conversions.
- Cleanly separate concerns for launching and icon handling.
- Reuse icons across `Applications`, Komorebi windows, and potentially
  more in the future.

Tested

- Works on Windows 11.
- Verified path/exe/HWND icon loading and fallback.
2025-05-15 18:17:27 -07:00
LGUG2Z
ce59bd9ae4 chore(deps): cargo update 2025-05-15 17:59:57 -07:00
LGUG2Z
309dd159ca docs(mkdocs): updates to prepare for v0.1.37 2025-05-15 17:45:16 -07:00
LGUG2Z
6f1d6dbdc7 fix(wm): disallow toggle-float if ws has a monocle container
This commit ensures that the user can't get into a weird state by
attempting to float a monocle container. If a user attempts to call
toggle-float on a monocle container, a warning will be logged and the
command will be ignored.
2025-05-15 08:09:10 -07:00
LGUG2Z
6a10d583a6 build(cargo): propagate expensive schemars feature correctly 2025-05-11 20:00:15 -07:00
LGUG2Z
270ea5aa46 feat(cli): add focused-container-kind state query
This commit adds a new StateQuery variant, FocusedContainerKind, which
will will return None if there is not focused container on the current
workspace (ie. it is empty), Single if the focused container contains a
single window, or Stack if the focused container contains more than one
window.
2025-05-11 18:23:53 -07:00
dependabot[bot]
a9d2738733 chore(deps): bump chrono from 0.4.40 to 0.4.41
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.40 to 0.4.41.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.40...v0.4.41)

---
updated-dependencies:
- dependency-name: chrono
  dependency-version: 0.4.41
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-10 15:22:32 -07:00
Csaba
3d8f68e559 feat(bar): send commands by mouse/touchpad/screen
This commit makes it possible to send commands from the bar by using the
mouse/touchpad/touchscreen.

Komorebi or custom commands can be sent by clicking on the mouse's
primary, secondary, middle, back or forward buttons.

As the primary single click is already used by widgets, only primary
double clicks can send commands. This limitation is due to Egui also
triggering 2 single clicks before a double click is triggered. Egui does
not have an implementation for stopping event propagation out of the box
and would be too much work to include.

Similarly, commands can be sent on every "tick" of mouse scrolling,
touchpad or touchscreen swiping in any of the 4 directions. This "tick"
can be adjusted to fit user's preference.

This is due to the fact, that Egui does not have an event for when a
mouse "tick" occurs. It instead gives a number of points that the user
scrolled/swiped on each frame.

PR: #1403
2025-05-10 15:19:24 -07:00
Jerry Kingsbury
80bb7288c4 test(wm): transfer window to nonexistent monitor
Created a test for the transfer_window function.

The tests attempts to transfer a window to a monitor that doesn't exist,
and checks to see if we return an error. The test successfully gets an
error but there is a bug where the window isn't in the contiainer after
a failed transfer. I wrote a note comment to explain the bug just in
case we need to reference back to it.
2025-05-10 15:01:17 -07:00
Jerry Kingsbury
76c833f661 test(wm): move workspace to non existent monitor
Created a test for moving the focused workspace to a monitor that hasn't
been created. The test ensures that we receive an error when moving a
workspace to a monitor that doesn't exist.
2025-05-10 15:01:17 -07:00
Jerry Kingsbury
80bce4be7e test(workspace): move window to non existent container
Created a test for moving a window to a container that doesn't exist.
The test ensures that we receive an error when moving a window to a
container that doesn't exist.
2025-05-10 15:01:17 -07:00
Jerry Kingsbury
8c10547325 test(workspace): remove a non existent window
Created a test for removing a window that doesn't exist.

The test creates a container with a window and then attempts to remove a
window that doesn't exist. The test will check the result to ensure that
the result returned an error and that we still have the expected number
of windows.
2025-05-10 15:01:10 -07:00
Jerry Kingsbury
8f886b3fe4 test(monitor): move container to a nonexistent workspace
Created a test for moving a container to a workspace that doesn't exist.

The test ensures when a container is moved to a workspace that doesn't
exist, the workspace is created and that the workspace contains the
container.

It also checks that there are N workspaces available where N is the
largest workspace number.
2025-05-10 15:01:06 -07:00
Jerry Kingsbury
53c38e157f test(monitor): remove nonexistent workspace
Created a test for moving a workspace that doesn't exist. The test
attempts to remove a workspace that doesn't exist and checks to ensure
the removed_workspace variable is None.
2025-05-10 14:58:17 -07:00
LGUG2Z
70f561e6ac feat(shortcuts): add helper written in egui
This commit adds a simple egui helper application which shows a list of
shortcuts defined in a user's whkdrc file. Parsing AHK files is not
supported.

In addition to listing out shortcuts defined in the whkdrc file, the top
line allows users to add filter a filter to narrow down the list of
commands and key bindings to the ones they are interested in.

A new komorebic command "toggle-shortcuts" has been introduced which
will first attempt to kill "komorebi-shortcuts.exe", and then exit if
the kill signal was successful (ie. a process was closed), or proceed to
open "komorebi-shortcuts.exe" if the kill signal was not successful (ie.
no process was closed, so we should open one).

"komorebi-shortcuts.exe" has been added as a floating application in
lib.rs to allow for users to use the "komorebic move" command to
manipulate its position via their existing keyboard bindings.
2025-05-07 08:52:08 -07:00
LGUG2Z
4ea835fa59 feat(wm): toggle monocle off on monitor container moves
This commit ensures that if a user sends one of the various messages
which ultimately call move_container_to_monitor, if the target workspace
on the target monitor currently has a monocle container, it will be
toggled off to allow space for the container being moved to be rendered.
2025-05-07 08:19:22 -07:00
LGUG2Z
09137af305 feat(wm): toggle monocle off on ws container moves
This commit ensures that if a user sends one of the various messages
which ultimately call move_container_to_workspace, if the target
workspace currently has a monocle container, it will be toggled off to
allow space for the container being moved to be rendered.
2025-05-06 17:03:57 -07:00
LGUG2Z
ee89b344df chore(deps): update dependencies.json 2025-05-04 11:38:03 -07:00
LGUG2Z
46d5ea4a1d refactor(wm): log errors when allow_set_foreground_window fails
This startup Win32 API call can sporadically fail, so this commit adds
some retry logic and logging of errors every time it fails. If it
crosses the retry threshold, the application will exit (because you
can't really have a tiling window manager running that doesn't let you
set the foreground window).
2025-05-02 17:49:29 -07:00
LGUG2Z
82c2241601 fix(wm): don't reap ws windows when using hide instead of cloak
This commit ensures that workspace windows that are hidden when the user
is using HidingBehaviour::Hide will not be unintentionally reaped by a
hard-coded workaround for Microsoft Office's continuing
enshittification.

HidingBehaviour::Hide has also been marked in the docs as an EOL
feature, and some dead code that was ultimately migrated to reaper.rs
has been cleaned up.

fix #1426
2025-05-02 17:29:41 -07:00
dependabot[bot]
c28773b96a chore(deps): bump miette from 7.5.0 to 7.6.0
Bumps [miette](https://github.com/zkat/miette) from 7.5.0 to 7.6.0.
- [Release notes](https://github.com/zkat/miette/releases)
- [Changelog](https://github.com/zkat/miette/blob/main/CHANGELOG.md)
- [Commits](https://github.com/zkat/miette/commits/miette-derive-v7.6.0)

---
updated-dependencies:
- dependency-name: miette
  dependency-version: 7.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-29 08:27:05 -07:00
LGUG2Z
577364a556 feat(bar): hide when leaving komorebi's virtual desktop
This commit adds a new VirtualDesktopNotification which is used to
notify subscribers when the user leaves and enters the virtual desktop
associated with komorebi.

komorebi-bar consumes these notifications to minmize and restore the bar
appropriately depending on the currently focused virtual desktop.

re #1420
2025-04-28 14:33:39 -07:00
LGUG2Z
17cd0308cb feat(bar): improve path handling on apps widget
This commit improves path handling for commands and icons in the new
Application widget by making use of PathExt::replace_env when loading
the user-specified ApplicationsConfig.

Crucially for scoop users, this means that user-agnostic references to
scoop apps can now be made like this:

```
$Env:USERPROFILE/scoop/apps/zed-nightly/current/zed.exe
```

When attempting to look up an icon for a command, we now split the
command on ".exe", and if this is a complete path to a file, we try to
use it to extract an icon, otherwise we try to resolve a complete path
using "which" before doing the same.
2025-04-27 11:47:19 -07:00
Alisher Galiev
10424b696f feat(bar): add applications widget
This pull request introduces a new Applications widget that displays a
user-defined list of application launchers in the UI. Each app entry
supports an icon, a label, and executes its configured command on click.

The design of this widget is inspired by the Applications Widget of YASB
Reborn. I personally missed this functionality and aimed to bring a
similar experience to komorebi-bar.

Further information is in the text of PR #1415
2025-04-27 11:45:06 -07:00
LGUG2Z
6e7d8fb922 fix(animation): avoid redundant async window pos calls
As pointed out by @alex-ds13, animations run on a separate thread and so
unresponsive apps will not block komorebi.
2025-04-25 17:53:57 -07:00
LGUG2Z
917cd9b7db fix(borders): destroy all if a different vd is detected
This commit ensures that all borders will destroyed if komorebi detects
that the user has switched to a Windows Virtual Desktop different from
the one it was launched on and associated with.

There is still some work to be done to forcibly redraw the borders when
a navigation back to the VD associated with komorebi is detected, but
that requires tracking the state of the current VD ID outside of the
process_event handler somewhere.

re #1420
2025-04-24 21:41:21 -07:00
LGUG2Z
bdbd665b21 refactor(wm): add window handling sync/async enum
This commit adds a dedicated WindowHandlingBehaviour enum with Sync and
Async variants, and reverts a change to the render fn in window.rs to
use move_window instead of position_window if the
WindowHandlingBehaviour variant is Sync.
2025-04-24 18:50:54 -07:00
Kuukunen
f3f2098451 feat(wm): add configuration option for async window handling
Add configuration option for enabling/disabling the asynchronous window
handling. The feature might cause unforeseen issues, so by default it is
off. It can be enabled with setting the option async_window_handling to
true.
2025-04-24 18:50:21 -07:00
Kuukunen
4ca2e8388b fix(wm): fix unresponsiveness by using asynchronous window handling
Unresponsive windows might cause Komorebi to hang because functions like
SetWindowPos wait for the target window's WindowProc.

I changed most SetWindowPos calls to use the SWP_ASYNCWINDOWPOS flag,
which should avoid hanging, and I changed the one
WindowsApi::move_window call to use position_window instead. I also
changed the ShowWindow to ShowWindowAsync.

The only issue I noticed was that it caused the stackbar to disappear
(and/or flicker), probably because the window is modified right after
moving it, so I disabled the async position_window for that.
2025-04-24 18:50:21 -07:00
thearturca
31752e422a feat(animation): cubic-bezier for styles
This commit adds ability to use cubic-bezier as an animation style,
which allows users to customize the smoothness of animations.
2025-04-24 17:42:04 -07:00
Jerry Kingsbury
5e308b9131 test(wm): add window handle to move based on workspace rules test
Created a simple test for the
add_window_handle_to_move_based_on_workspace_rules function.

The test creates mock data representing window and the movement details.

The test will call the function with an empty vector to hold the
workspace rules and then check that the workspace rules are in the
vector.
2025-04-22 18:03:42 -07:00
Jerry Kingsbury
1bf53b89af test(wm): ensure named workspace for monitor test
Created a test for the ensure_named_workspace_for_monitor function.

The test creates two monitors and holds a list of workspace names.

When calling the ensure_named_workspace_for_monitor_function the test
checks to ensure that the the the monitor contains the length of the
list workspaces and that the workspaces uses the name in the list.

The test adds more names to the list and repeats the check on the other
monitor.
2025-04-22 18:03:13 -07:00
Jerry Kingsbury
11690c6004 test(wm): test toggle_monocle and toggle_maximize
Created tests for the toggle_monocle and toggle_maximize functions. The
test are simialar to the maximize and unmaximize test and the monocle on
and off test.
2025-04-22 18:02:59 -07:00
Jerry Kingsbury
3457dfc04c test(wm): monocle on and off test
Created a test for the monocle_on and monocle_off functions.

The test checks to ensure that the focused workspace container becomes a
monocle container when calling the monocle_on function.

The test will also ensure that the container is moved to the workspace's
container ring when the monocle_off function is called.
2025-04-22 18:02:23 -07:00
Jerry Kingsbury
af1c9b5aa9 test(wm): test maximize and unmaximize window
Created a test for maximizing and unmaximizing a window.

The test ensures that the when calling maximize_window, the focused
window is added to the maximized_window list.

When calling unmaximized window, the checks to ensure that None is
returned to ensure that the maximized window is removed from the list.

The test switches to a different window and performs the same checks.
2025-04-22 18:01:55 -07:00
dependabot[bot]
22fac5a9fb chore(deps): bump netdev from 0.33.0 to 0.34.0
Bumps [netdev](https://github.com/shellrow/netdev) from 0.33.0 to 0.34.0.
- [Release notes](https://github.com/shellrow/netdev/releases)
- [Commits](https://github.com/shellrow/netdev/compare/v0.33.0...v0.34.0)

---
updated-dependencies:
- dependency-name: netdev
  dependency-version: 0.34.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-21 17:16:48 -07:00
LGUG2Z
7a3990f106 chore(deps): cargo update 2025-04-20 10:39:28 -07:00
alex-ds13
74e93e5524 fix(wm): ensure default CrossBoundaryBehaviour consistency
This commit fixes the default for `CrossBoundaryBehaviour` which was set
to `Monitor` when loading a user configuration but was set to
`Workspace` if starting from fresh without a user config.

The docs also stated that this value was `Monitor` by default.
2025-04-20 10:26:01 -07:00
alex-ds13
86e78570d6 fix(wm): reset global configs to default on removal 2025-04-20 10:26:01 -07:00
alex-ds13
3ee3aac806 feat(wm): float placement configs
This commit adds a few more options to combine with the
`FloatingLayerBehaviour` which determine placement in different
situations:

- `"toggle_float_placement"`: the placement to be used by a floating
  window when it is forced to float with the `toggle-float` command.
- `"floating_layer_placement"`: the placement to be used by a floating
  window when it is spawned on the floating layer and the user has the
  floating layer behaviour set to float.
- `"floating_override_placement"`: the placement to be used by a window
  that is spawned when float override is active.
- `"float_rule_placement"`: the placement to be used by a window that
  matches a 'floating_applications' rule.

Each `Placement` can be one of the following types:

- "None": windows are spawned wherever Windows positions them with
  whatever size they had. Komorebi does not change its size or position.
- "Center": windows are centered without changing their size.
- "CenterAndResize": windows are centered and resized according to the
defined aspect ratio.

By default the placements are as follows:
- `"toggle_float_placement"`: `"CenterAndResize"`
- `"floating_layer_placement"`: `"Center"`
- `"floating_override_placement"`: `"None"`
- `"float_rule_placement"`: `"None"`

This commit also adds the `floating_layer_behaviour` as a global config.
2025-04-20 10:25:57 -07:00
alex-ds13
c408c1149c fix(wm): fix eager focus on hidden stacked window
When using the eager focus command to focus a window that was hidden on
a stack on an unfocused workspace it would load the workspace focus the
correct window but keep it cloaked with the previously focused window
showing. This would happen because we were focusing the workspace before
focusing the window which would create two window focus events, the
first one for the previously focused window and the second one for the
target window we wanted. The problem was that when the first event was
handled it would again refocus that window and cloak the target window
again so when the target window focus event came it would ignore it
since the `should_manage` function would return `false` because the
window was cloaked and had all its window styles as `None`, unless we
had transparency enabled, in that case it would override it and create a
focus loop.

This commit fixes this by not loading the newly focused workspace
immediately. Instead we first focus the workspace if it is needed
without loading it and mark it as needing to be loaded. Then we focus
the correct target window and only then do we load the workspace. This
way the workspace loads with the correct window already focused.

This is the same approach that is currently being done on the
`perform_reconciliation` function when there is an alt-tab.
2025-04-17 07:57:45 -07:00
LGUG2Z
a8b02f40fd chore(dev): begin 0.1.37-dev 2025-04-13 09:38:12 -07:00
LGUG2Z
6608e5a5bb docs(schema): update schema.json 2025-04-13 09:37:13 -07:00
LGUG2Z
8ef1bcf26e chore(release): v0.1.36 2025-04-12 10:52:31 -07:00
LGUG2Z
d146f35c25 chore(deps): cargo update 2025-04-12 10:52:31 -07:00
dependabot[bot]
fc07ba3dd9 chore(deps): bump crossbeam-channel from 0.5.14 to 0.5.15
Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.14 to 0.5.15.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.14...crossbeam-channel-0.5.15)

---
updated-dependencies:
- dependency-name: crossbeam-channel
  dependency-version: 0.5.15
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-10 09:54:12 -07:00
LGUG2Z
3a8a61119d fix(config): update monitor wallpaper on reload 2025-04-09 16:09:17 -07:00
LGUG2Z
d24beb60b1 feat(config): add per-monitor floating layer behaviour opt
This commit adds an option to set the floating layer behaviour for all
workspaces on a monitor.

Overrides set on an individual workspace level will take precedence over
the option set at the monitor level.
2025-04-09 09:42:46 -07:00
Jerry Kingsbury
7daf3242e2 test(wm): add float and lock toggle tests
Created a test for the toggle_lock function. The test creates a
workspace with multiple containers and checks to see whether the
container was added or removed from the locked containers list when
calling the toggle_lock function.

Created a test for the float_window function. The test checks to ensure
that when calling the float_window function, the window is added to the
floating_windows list and removed from the containers window list. The
test will also check the count and ensure the expected window was added.
2025-04-09 08:55:10 -07:00
LGUG2Z
b6e261aef6 fix(bar): avoid retile messages on ws switch
This commit removes RetileWithResizeDimensions messages from the batches
that are sent to komorebi when changing workspace.

I'm not really sure why this was added in the first place, but removing
it doesn't seem to impact layouts on workspace switch, and more
important, by removing this message I'm no longer able to reproduce the
sudden exits of komorebi.exe under sustained workspace switching calls
made via the bar.
2025-04-08 17:20:02 -07:00
LGUG2Z
d40c304324 fix(borders): avoid deadlock on state hashmaps
This commit addresses a deadlock on WINDOW_BORDERS which can occur under
load, particularly when switching workspaces.

When switching workspaces using the komorebi-bar,
RetileWithResizeDimensions is also called, which calls
border_manager::destroy_all_borders.

At the same time, border_manager::window_border is called when hiding
borders from the previous workspace. Both of these functions try to take
locks on WINDOWS_BORDERS and BORDER_STATE.

border_manager::window_border is called in a new thread by hide_border,
so if this has not finished with the lock by the time
destroy_all_borders requests it, we get stuck in a deadlock.

The changes in this commit ensure that the BORDER_STATE lock is dropped
as early as possible in destroy_all_borders, and that we are not holding
the WINDOWS_BORDERS lock in window_border while trying to get the
BORDER_STATE lock to look up BorderInfo.

The logs which show the initial deadlock being detected:

2025-04-08T22:49:37.641888Z  WARN komorebi::process_command: could not acquire window manager lock, not processing message: FocusWorkspaceNumber
2025-04-08T22:49:38.294952Z  WARN komorebi::process_command: could not acquire window manager lock, not processing message: FocusWorkspaceNumber
2025-04-08T22:49:39.225645Z ERROR komorebi: 1 deadlocks detected
2025-04-08T22:49:39.225826Z ERROR komorebi: deadlock #0
2025-04-08T22:49:39.225950Z ERROR komorebi: thread id: 9896
2025-04-08T22:49:39.226072Z ERROR komorebi:    0:     0x7ff68fd33dec - backtrace::backtrace::dbghelp64::trace
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\backtrace-0.3.71\src\backtrace\dbghelp64.rs:99
                           backtrace::backtrace::trace_unsynchronized<backtrace::capture::impl$1::create::closure_env$0>
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\backtrace-0.3.71\src\backtrace\mod.rs:66
   1:     0x7ff68fd33c87 - backtrace::backtrace::trace<backtrace::capture::impl$1::create::closure_env$0>
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\backtrace-0.3.71\src\backtrace\mod.rs:53
   2:     0x7ff68fd3c03e - backtrace::capture::Backtrace::create
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\backtrace-0.3.71\src\capture.rs:193
   3:     0x7ff68fd3bfae - backtrace::capture::Backtrace::new
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\backtrace-0.3.71\src\capture.rs:158
   4:     0x7ff68f937b54 - parking_lot_core::parking_lot::deadlock_impl::on_unpark
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\parking_lot_core-0.9.10\src\parking_lot.rs:1211
   5:     0x7ff68f921f0e - parking_lot_core::parking_lot::deadlock::on_unpark
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\parking_lot_core-0.9.10\src\parking_lot.rs:1144
   6:     0x7ff68f92bf88 - parking_lot_core::parking_lot::park::closure$0<parking_lot::raw_mutex::impl$3::lock_slow::closure_env$0,parking_lot::raw_mutex::impl$3::lock_slow::closure_env$1,parking_lot::raw_mutex::impl$3::lock_slow::closure_env$2>
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\parking_lot_core-0.9.10\src\parking_lot.rs:637
   7:     0x7ff68f92a777 - parking_lot_core::parking_lot::with_thread_data
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\parking_lot_core-0.9.10\src\parking_lot.rs:207
                           parking_lot_core::parking_lot::park<parking_lot::raw_mutex::impl$3::lock_slow::closure_env$0,parking_lot::raw_mutex::impl$3::lock_slow::closure_env$1,parking_lot::raw_mutex::impl$3::lock_slow::closure_env$2>
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\parking_lot_core-0.9.10\src\parking_lot.rs:600
   8:     0x7ff68f926fa0 - parking_lot::raw_mutex::RawMutex::lock_slow
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\parking_lot-0.12.3\src\raw_mutex.rs:262
   9:     0x7ff68f1daac6 - parking_lot::raw_mutex::impl$0::lock
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\parking_lot-0.12.3\src\raw_mutex.rs:72
  10:     0x7ff68ef05eb3 - lock_api::mutex::Mutex<parking_lot::raw_mutex::RawMutex,std::collections::hash::map::HashMap<isize,alloc::string::String,std::hash::random::RandomState> >::lock<parking_lot::raw_mutex::RawMutex,std::collections::hash::map::HashMap<isize,alloc::string::Str
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\lock_api-0.4.12\src\mutex.rs:223
  11:     0x7ff68ef0713d - komorebi::border_manager::destroy_all_borders
                               at komorebi\src\border_manager\mod.rs:139
  12:     0x7ff68f194e61 - komorebi::window_manager::WindowManager::process_command<ref_mut$<uds_windows::stdnet::net::UnixStream> >
                               at komorebi\src\process_command.rs:918
  13:     0x7ff68ef1fdcf - komorebi::process_command::read_commands_uds
                               at komorebi\src\process_command.rs:2292
  14:     0x7ff68f231eb5 - komorebi::process_command::listen_for_commands::closure$0::closure$0::closure$0
                               at komorebi\src\process_command.rs:123
  15:     0x7ff68f32bcf3 - core::hint::black_box
                               at C:\Users\LGUG2Z\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\hint.rs:477
                           std::sys::backtrace::__rust_begin_short_backtrace<komorebi::process_command::listen_for_commands::closure$0::closure$0::closure_env$0,tuple$<> >
                               at C:\Users\LGUG2Z\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\sys\backtrace.rs:152
  16:     0x7ff68f00d1b4 - std::thread::impl$0::spawn_unchecked_::closure$1::closure$0<komorebi::process_command::listen_for_commands::closure$0::closure$0::closure_env$0,tuple$<> >
                               at C:\Users\LGUG2Z\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\thread\mod.rs:559
  17:     0x7ff68f356ea1 - core::panic::unwind_safe::impl$25::call_once<tuple$<>,std::thread::impl$0::spawn_unchecked_::closure$1::closure_env$0<komorebi::process_command::listen_for_commands::closure$0::closure$0::closure_env$0,tuple$<> > >
                               at C:\Users\LGUG2Z\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\panic\unwind_safe.rs:272
  18:     0x7ff68f1d1e00 - std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<std::thread::impl$0::spawn_unchecked_::closure$1::closure_env$0<komorebi::process_command::listen_for_commands::closure$0::closure$0::closure_env$0,tuple$<> > >,tuple$<> >
                               at C:\Users\LGUG2Z\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:587
  19:     0x7ff68f0102b3 - std::thread::impl$7::drop::closure$0<enum2$<core::result::Result<tuple$<>,eyre::Report> > >
  20:     0x7ff68f007be7 - std::panicking::try
                               at C:\Users\LGUG2Z\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panicking.rs:550
                           std::panic::catch_unwind
                               at C:\Users\LGUG2Z\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\panic.rs:358
                           std::thread::impl$0::spawn_unchecked_::closure$1<komorebi::process_command::listen_for_commands::closure$0::closure$0::closure_env$0,tuple$<> >
                               at C:\Users\LGUG2Z\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\std\src\thread\mod.rs:557
  21:     0x7ff68ecfeb8e - core::ops::function::FnOnce::call_once<std::thread::impl$0::spawn_unchecked_::closure_env$1<komorebi::process_command::listen_for_commands::closure$0::closure$0::closure_env$0,tuple$<> >,tuple$<> >
                               at C:\Users\LGUG2Z\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\ops\function.rs:250
  22:     0x7ff68fe84f1d - alloc::boxed::impl$28::call_once
                               at /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library\alloc\src\boxed.rs:1976
                           alloc::boxed::impl$28::call_once
                               at /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library\alloc\src\boxed.rs:1976
                           std::sys::pal::windows::thread::impl$0::new::thread_start
                               at /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library\std\src\sys\pal\windows\thread.rs:56
  23:     0x7ff8ef27257d - BaseThreadInitThunk
  24:     0x7ff8f042af28 - RtlUserThreadStart

2025-04-08T22:49:39.228617Z ERROR komorebi: thread id: 62364
2025-04-08T22:49:39.228731Z ERROR komorebi:    0:     0x7ff68fd33dec - backtrace::backtrace::dbghelp64::trace
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\backtrace-0.3.71\src\backtrace\dbghelp64.rs:99
                           backtrace::backtrace::trace_unsynchronized<backtrace::capture::impl$1::create::closure_env$0>
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\backtrace-0.3.71\src\backtrace\mod.rs:66
   1:     0x7ff68fd33c87 - backtrace::backtrace::trace<backtrace::capture::impl$1::create::closure_env$0>
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\backtrace-0.3.71\src\backtrace\mod.rs:53
   2:     0x7ff68fd3c03e - backtrace::capture::Backtrace::create
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\backtrace-0.3.71\src\capture.rs:193
   3:     0x7ff68fd3bfae - backtrace::capture::Backtrace::new
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\backtrace-0.3.71\src\capture.rs:158
   4:     0x7ff68f937b54 - parking_lot_core::parking_lot::deadlock_impl::on_unpark
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\parking_lot_core-0.9.10\src\parking_lot.rs:1211
   5:     0x7ff68f921f0e - parking_lot_core::parking_lot::deadlock::on_unpark
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\parking_lot_core-0.9.10\src\parking_lot.rs:1144
   6:     0x7ff68f92bf88 - parking_lot_core::parking_lot::park::closure$0<parking_lot::raw_mutex::impl$3::lock_slow::closure_env$0,parking_lot::raw_mutex::impl$3::lock_slow::closure_env$1,parking_lot::raw_mutex::impl$3::lock_slow::closure_env$2>
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\parking_lot_core-0.9.10\src\parking_lot.rs:637
   7:     0x7ff68f92a777 - parking_lot_core::parking_lot::with_thread_data
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\parking_lot_core-0.9.10\src\parking_lot.rs:207
                           parking_lot_core::parking_lot::park<parking_lot::raw_mutex::impl$3::lock_slow::closure_env$0,parking_lot::raw_mutex::impl$3::lock_slow::closure_env$1,parking_lot::raw_mutex::impl$3::lock_slow::closure_env$2>
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\parking_lot_core-0.9.10\src\parking_lot.rs:600
   8:     0x7ff68f926fa0 - parking_lot::raw_mutex::RawMutex::lock_slow
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\parking_lot-0.12.3\src\raw_mutex.rs:262
   9:     0x7ff68f1daac6 - parking_lot::raw_mutex::impl$0::lock
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\parking_lot-0.12.3\src\raw_mutex.rs:72
  10:     0x7ff68ef05d93 - lock_api::mutex::Mutex<parking_lot::raw_mutex::RawMutex,std::collections::hash::map::HashMap<alloc::string::String,alloc::boxed::Box<komorebi::border_manager::border::Border,alloc::alloc::Global>,std::hash::random::RandomState> >::lock<parking_lot::raw_mu
                               at C:\Users\LGUG2Z\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\lock_api-0.4.12\src\mutex.rs:223
  11:     0x7ff68f2064de - komorebi::border_manager::window_border::closure$0
                               at komorebi\src\border_manager\mod.rs:109
  12:     0x7ff68eddeca9 - enum2$<core::option::Option<ref$<alloc::string::String> > >::and_then<ref$<alloc::string::String>,komorebi::border_manager::BorderInfo,komorebi::border_manager::window_border::closure_env$0>
                               at C:\Users\LGUG2Z\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core\src\option.rs:1452
  13:     0x7ff68ef06339 - komorebi::border_manager::window_border
                               at komorebi\src\border_manager\mod.rs:108
2025-04-08 16:14:41 -07:00
LGUG2Z
69d252ba12 feat(wm): drop empty containers on ws update
We shouldn't ever have empty containers, but never say never because
someone on the Discord has an empty container with no Windows that
continues to take up a tile. This commit adds a call to drop all
containers without any windows whenever Workspace::update is called.
2025-04-07 15:28:29 -07:00
LGUG2Z
2ac477d89f docs(mkdocs): reduce number of tabs to improve nav 2025-04-07 11:02:57 -07:00
alex-ds13
6db73151f7 fix(wm): remove border width/offset when disabled
This commit makes sure the border's width and offset is removed when you
disable the borders.

If you want to still have that size on your gaps when borders are
disabled then you should add it to the `default_container_padding` or to
the per-monitor or per-workspace `container_padding`.
2025-04-07 10:12:18 -07:00
alex-ds13
2d6ff0708f fix(docs): borders are enabled by default 2025-04-07 10:12:18 -07:00
Csaba
13a519fb29 fix(cli): restart bar on replace-configuration
This commit ensures that the replace-configuration command also replaces
bars.

Already running bars are stopped and new bars are started using the new
configuration.
2025-04-06 21:19:41 -07:00
amrbashir
9f8e4b9dca feat(core): use PathExt to unify env var resolution
This new implementation allows for expanding any environment variable so
it is not limited to just `~`, `$HOME`, `$Env:USERPROFILE` and
`$Env:KOMOREBI_CONFIG_HOME`.

It expands the follwing formats:
- CMD: `%variable%`
- PowerShell: `$Env:variable`
- Bash: `$variable`

I searched throughout the code base for path and migrate any code that
might need to PathExt::replace_env.

It is possible that I might have missed a few places due to my
unfamiliarity with the code base, so if you find any, please let me
know.

Most of the paths that needed this trait, are in:

- Clap arguments, and that was handled by #[value_parse] attribute and a
  helper function.
- SocketMessage and that was handled by custom deserialization with the
  help of serde_with crate
2025-04-06 21:17:35 -07:00
Jerry Kingsbury
5a0196ac9d test(monitor.rs): ensure workspace count test
Created tests for the ensure_workspace_count function. The function is
tested by calling the function with only the default workspace, after
creating a workspace, and after we already have at least the number of
monitors passed into the funtion.
2025-04-05 12:14:10 -07:00
Jerry Kingsbury
46d0e340f9 test(monitor.rs): move container to workspace test
Created a test for the move_container_to_workspace funtion. The test
creates a workspace with 3 containers and an empty workspace, and
ensuresthat the container is moved to the correct workspace and that if
the workspace focus has changed when setting follow focus to true.
2025-04-05 12:14:10 -07:00
Jerry Kingsbury
371ef88ecb test(workspace): visible windows test
Created a test for the visible_windows function. The test creates two
windows in a workspace and checks to see if the the first created window
is the visible window. The test then maximizes the second window and
checks to ensure both windows are visible.

Expanded visible window test to ensure that a visible window will
display when adding another container.
2025-04-05 12:14:02 -07:00
dependabot[bot]
f5b5070436 chore(deps): bump openssl from 0.10.71 to 0.10.72
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.71 to 0.10.72.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.71...openssl-v0.10.72)

---
updated-dependencies:
- dependency-name: openssl
  dependency-version: 0.10.72
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-04 16:29:12 -07:00
LGUG2Z
c8320552b0 feat(cli): add session float rule cmds
This commit introduces three new commands, session-float-rule,
session-float-rules, and clear-session-float-rules, which add a
composite float rule for the currently focused window for the duration
of the komorebi session, print the float rules scoped to the current
komorebi session, and clear any float rules scoped to the current
komorebi session respectively.

The composite rule created is fairly strict, using
MatchingStrategy::Equals on the Exe, Class and Title.

Users can run session-float-rule as they are working to avoid having to
break their workflow and edit their configuration file, and when they
are ready, they can run session-float-rules to print out the composite
rules which have been generated and added to the current session to
further refine before adding them to their configuration files.

re #1402
2025-04-04 11:56:25 -07:00
alex-ds13
2a5a960c34 feat(wm): allow setting wallpaper per monitor
This commit adds the option to set `Wallpaper` per monitor. When
changing workspaces it will first check for a workspace wallpaper, if
there is none it then checks for a monitor wallpaper.
2025-04-04 11:12:47 -07:00
alex-ds13
10ab43a8ae fix(wm): properly update border colors
This commit changes the border manager notification to an enum that can
be a `Notification::Update(Option<isize>)` which should work like before
or a `Notification::ForceUpdate` which will always update the borders
and it will also update the border's brushes. To do so, this commit
moved the brush creation from the `create()` function to a new
`update_brushes` function on the `Border` itself and it changed the
`Border` `render_target` from a `OnceLock` to an `Option<RenderTarget>`
so that we can always change it when we need to.
This commit also adds a new function called `send_force_update()` to the
border manager to make it easier to send this notification.

This commit also added a check for `force_update_borders` on the
`process_command` function so that any command that reloads the
configuration, changes the theme or changes any border config can set it
to `true`. When this is true we send the `ForceUpdate` notification, if
false we send the normal `Update` notification as before.

The theme manager now always sends the `ForceUpdate` notification to the
border manager.

This commit adds a new function to the window manager called
`apply_wallpaper_for_monitor_workspace` which in turn calls the
`apply_wallpaper` function for the workspace specified with the
`monitor_idx` and `workspace_idx` given (if the workspace in question
doesn't have a wallpaper defined this won't do anything).

All these changes make it so the wallpaper theme generation colors are
properly applied in all situations.
2025-04-04 11:08:45 -07:00
alex-ds13
0e8ed8aa40 feat(wm): apply wallpapers per monitor 2025-04-04 11:08:45 -07:00
alex-ds13
fa2ccad5bf fix(wm): skip serde on WorkspaceGlobals 2025-04-04 11:08:45 -07:00
Csaba
3c4ccd2504 feat(bar): changing battery icons
This commit is changing the icon on the battery widget based on the
current level.

level | icon
------------
100 - 75: discharging
75 - 50: high
50 - 25: medium
25 - 10: low
10 - 0: warning

PR: #1398
2025-04-03 15:04:23 -07:00
LGUG2Z
7d821cd3db refactor(clippy): apply new rust lint fixes 2025-04-03 08:41:55 -07:00
Csaba
f4bbee0a2e feat(bar): auto select/hide widget based on value
This commit adds new settings to some widgets that allows to auto
select/hide them based on their current values.

The cpu/memory/network/storage widgets get a setting that auto selects
the widget if the current value/percentage is over a value.

The battery widget gets a setting that auto selects the widget if the
current percentage is under a value.

The storage widget gets a setting that auto hides the disk widget if the
percentage is under a value.

Also added 2 new settings (auto_select_fill and auto_select_text) to the
theme, in order to select the fill and text colors of an auto selected
widget.

(Easter egg: the network icons change if the value is over the limit)

PR: #1353
2025-04-03 07:42:27 -07:00
Lenus Walker
2934d011fd docs(mkdocs): add nvidia bar transparency workaround
Updated troubleshooting.md with the workaround for an issue where the
Komorebi Bar does not render transparency properly with Nvidia GPUs.
2025-04-02 17:22:06 -07:00
LGUG2Z
71762a5961 feat(cli): add datadir cmd
Because I'm tired of trying to find this stupid directory in
explorer.exe all the time.
2025-04-02 17:20:35 -07:00
zepocas
76aeefa9f7 feat(cli): add focused-workspace-layout query
This commit adds StateQuery::FocusedWorkspaceLayout variant to allow
queries for focused workspace layout via komorebic query.

This handles floating workspaces returning "None".
2025-04-02 15:33:46 -07:00
LGUG2Z
4968b0fe37 feat(themes): generate base16 palette from wallpaper
This commit adds a new Wallpaper configuration option to the
WorkspaceConfig, allowing the user to specify a path to a wallpaper
image file, and to specify whether to generate a base16 palette from the
colours of that image file.

Theme generation is enabled by default when a wallpaper is selected.

A set of theme options can be given to customize the colours of various
borders and accents.

The themes generated are also plumbed through to the komorebi-bar.

The palette generation algorithm from "flavours" (which has been forked
and updated) is quite slow, so the outputs are cached to file in
DATA_DIR, and keyed by ThemeVariant (Light or Dark).

The Win32 COM API to set the desktop wallpaper is also quite slow,
however this calls is async so it doesn't block komorebi's main thread.
2025-04-02 13:24:24 -07:00
LGUG2Z
b4b400b236 feat(themes): add custom base16 theme variant
This commit adds a custom Base16 theme variant and plumbs it throughout
the komorebi and komorebi-bar packages.
2025-04-02 13:23:31 -07:00
LGUG2Z
2ee0bbc0c7 refactor(themes): move colour.rs to komorebi-themes 2025-04-02 13:23:31 -07:00
Csaba
d38d3c956d feat(bar): add locked container widget, use accent colour for icons
This commit adds a new komorebi widget to indicate whether or not the
focused container is locked.

This commit also includes an icon colour change on the layer and layout
widgets to the accent colour.

The commit also renames the locked_window widget to locked_container as
it is more suitable.

PR: #1394
2025-04-02 13:23:02 -07:00
Csaba
052eb1c763 fix(bar): re-introduce retain exact workspace indices
This commit re-introduces a commit that was lost

original: 36e3eaad36

blame: bb31e7155d

fixes: https://github.com/LGUG2Z/komorebi/issues/1388
2025-04-01 10:08:22 -07:00
alex-ds13
58730b81b4 feat(gui): add floating and locked border colours 2025-04-01 05:53:33 -07:00
alex-ds13
274ae43e8f feat(wm): add unfocused_locked to border_colours
This commit adds the `unfocused_locked` color to the border_colours so
that users that don't use themes can still customize this color like
they do the others.
2025-04-01 05:53:26 -07:00
LGUG2Z
2a30f09bbd feat(cli): add version as state query variant
This commit adds a new StateQuery::Version, which allows integrators to
make decisions about how to handle different versions of komorebi's
state schema based on the version of komorebi that is running on a
user's machine.
2025-03-31 17:41:36 -07:00
alex-ds13
8fd18048a4 remove(wm): remove workspace_reconciliator 2025-03-31 15:23:33 -07:00
alex-ds13
5809735024 refactor(wm): refactor alt-tab reconciliation
This commit changes the way the alt-tab reconciliation is done.

It no longer uses the `workspace_reconciliator` with the sending of
notifications.

Instead there is a simple function that checks if the shown/uncloaked
window is already handled by komorebi and if it is it will check if it
is on an unfocused workspace and/or if it is an unfocused window of a
stacked container, returning the monitor/workspace index pair of said
window.

If we get this pair then we perform the reconciliation immediately by
focusing the monitor, workspace, container and window indices
corresponding to that window.
2025-03-31 15:23:14 -07:00
alex-ds13
96fdbbd1fb fix(client): re-export FloatingLayerBehaviour 2025-03-31 15:23:10 -07:00
Jerry Kingsbury
de131e9ca5 test(workspace): add more workspace tests
Added tests for the focus_container_by_window and
contains_managed_window functions.

test_focus_container_by_window crates two containers with different
distinct windows. The test checks to see if we are focused on the
expected container and window.

test_contains_managed_window creates two containers and checks to ensure
that when calling the function returns the expected result when checking
if a window is available in one of the containers.

Added a test for adding a new floating window. The test creates a
container with three windows and attempts to add one of the windows to
the list of floating windows, then checks to see if the first window in
the container was added to the floating window list and also checks the
list of windows and floating windows to ensure we get the expected
result.
2025-03-30 14:35:59 -07:00
LGUG2Z
07dba03255 docs(license): bump to 2.0.0 2025-03-30 12:59:41 -07:00
LGUG2Z
acd53dec1b feat(wm): add flag to set logging verbosity
This commit adds a --log-level flag to komorebi.exe which allows the
user to set the logging verbosity without setting the RUST_LOG
environment variable directly. If the RUST_LOG environment variable is
set, it will take precedence over the --log-level flag.
2025-03-28 19:03:07 -07:00
LGUG2Z
a98968d179 feat(config): add floating ws layer behaviour opt
This commit adds a new option to the WorkspaceConfig object,
floating_layer_behaviour, which allows the user to either set
FloatingLayerBehaviour::Tile or FloatingLayerBehaviour::Float. Although

I prefer Float as a default, there was a good enough argument to make
Tile the default based on the fact that the Floating layer is
automatically engaged based on the focused window, and previously when
the focused window was a floating window, new windows would be tiled
unless they matched floating rules.
2025-03-28 16:38:00 -07:00
LGUG2Z
8a32219867 docs(coc): move document from discord to github 2025-03-27 09:07:57 -07:00
Jerry Kingsbury
ce4b75cc3c test(monitor_reconciliator): add initial tests
Added a test for sending a MonitorNotification using the
send_notification function. The test sends a MonitorNotification and
tests that the notification was recieved using event_rx.

Added a test for inserting a monitor into the cache. The test creates
a monitor and uses the insert_in_monitor_cache function to insert the
monitor into cache, and will attempt to retrieve the monitor from the
cache and check to see if it matches the expected value.

Addaded a test for channel capacity. The test will send 20 notifications
and then another notification, then check to ensure that all 20
messages match the notification we sent. The test will also check to
ensure the last notification sent wasn't received.

Added a test for the notification listener. The test will create a
window manager and setup the notification listener, then check to see if
we can send a notification and receive the notification.

Created a Mock Monitor that can be used with testing functions that call
the Win32 API.

Added a test for the attach_display_devices function. The test will
create a Mock Monitor and add the monitor to a closure that simulates a
display_provider. The test passes the display_provider into the
attach_display_devices function and checks to ensure we recieve the
monitor we passed in.
2025-03-26 19:38:24 -07:00
alex-ds13
e4226ce623 feat(wm): show float windows in order on layer toggle
This commit raises and lowers all the floating windows so that they show
up with the smaller windows on top and the bigger windows on the bottom
when we toggle between layers.
2025-03-26 15:48:35 -07:00
alex-ds13
4bfd7febb4 feat(wm): focus floats depending on direction
This commit tries to focus the floating windows depending on the
direction used. It takes into account the top left corner of each window
and uses that to look for the closest top left corner in the direction
provided.

If there are no windows found in that direction, it then checks if it
can focus across monitor.
2025-03-26 15:48:15 -07:00
alex-ds13
5cc688dc6b feat(wm): track focused floating window
This commit changes the `floating_windows` from a `Vec<Window>` to a
`Ring<Window>` which allows us to keep track of the focused floating
window.

This combined with the existing layer switch allows us to know when we
should focus the focused container or the focused floating window.
2025-03-26 15:48:07 -07:00
LGUG2Z
d897890032 fix(bar): fall back to older pid icon lookups
This commit imports an older revision of my fork of windows-icons to
call when attempting to look up the icon of an application by it's
process id. This needs to be cleaned up before the next release.
2025-03-26 15:39:17 -07:00
LGUG2Z
e702d93a8a feat(cli): add move/send-to-last-workspace cmds
This commit adds two new komorebic commands, move-to-last-workspace and
send-to-last-workspace, which move or send the focused window to the
last focused workspace on the focused monitor.
2025-03-23 16:07:43 -07:00
LGUG2Z
a8c687d3d5 chore(deps): cargo update 2025-03-22 20:22:44 -07:00
alex-ds13
30fbc1ae73 feat(client): reexport win32_display_data
This commit reexports the `win32_display_data` crate so that any 3rd
party app that needs it can get it through the `komorebi-client` without
having to keep manually synchronizing it with the version used by komorebi.
2025-03-22 19:35:23 -07:00
LGUG2Z
cb60e91842 feat(bar): show icons for uwp apps
This commit integrates the excellent investigation and work done by
@davor-skontra on the windows-icons repo to enable the retrieval of UWP
applications, including all those annoying Microsoft applications which
all share the ApplicationFrameHost.exe executable and the
ApplicationFrameWindow class.

Since these applications share the same executable, the icon cache in
komorei-bar has been updated to use the window hwnd as a key intead of
the window executable.

resolve #1226
2025-03-22 19:31:30 -07:00
LGUG2Z
64d29d606a refactor(wm): add dep injection to monitor reconiliator
This commit adds some dependency injection to the monitor reconciliator
module to make it easier to test the behaviour when different kinds of
data are returned from win32_display_data.
2025-03-22 13:16:15 -07:00
LGUG2Z
072a62c314 perf(wm): clone-free locked deque insert/remove
This commit replaces my initial clumsy LockedDeque insert/remove
implementations with Clone-free implementations by @alex-ds13.
2025-03-22 12:33:40 -07:00
LGUG2Z
a95e6e9644 refactor(wm): consolidate handling of ws container insertion/removal 2025-03-22 12:33:39 -07:00
LGUG2Z
6ba19d3ea2 feat(wm): add locked containers per workspace
This commit adds the concept of locked container indexes to komorebi
workspaces.

When a container index is locked, it can only be displaced by manual
user actual - usually when another container is moved there, and when
this happens, that container becomes the locked container.

In the locked state, the container at the locked index should never be
displaced by new windows opening or existing windows around it being
closed.

When the total number of containers on a workspace falls below the
number of the locked index, the locked index will be removed.

A locked index can be identified by a special border color linked to the
new WindowKind::UnfocusedLocked variant.

The implementation of locked container indexes is backed by a new data
structure called a LockedDeque, which is a VecDeque with an auxiliary
HashSet which keeps track of locked indices.

A new komorebic command "toggle-lock" has been added to support
programmatic use of this feature, as well as the
LockMonitorWorkspaceContainer and UnlockMonitorWorkspaceContainer
SocketMessage variants which can be used by status bars.
2025-03-22 12:28:15 -07:00
LGUG2Z
edf1943157 chore(dev): begin v0.1.36-dev 2025-03-22 12:14:43 -07:00
LGUG2Z
d0c847e5bc docs(mkdocs): fix some broken relative links 2025-03-22 11:55:36 -07:00
LGUG2Z
992bc2abfe chore(release): v0.1.35 2025-03-20 21:17:55 -07:00
Jerry Kingsbury
fa07f2d2f8 test(monitor): add tests for ws and containers fns
Added tests around adding and removing workspaces and containers.
2025-03-20 18:36:40 -07:00
Jerry Kingsbury
cc4e204191 test(container): add tests for addition and removal
Added tests for the various add, remove, and contains functions.
2025-03-20 18:35:55 -07:00
alex-ds13
24791f0ce5 fix(wm): change when floating windows are centered
This commit changes the behaviour of when floating windows are centered
by making them only center when we are on a `WorkspaceLayer::Floating`
and the window doesn't match a `floating_windows` rule and the workspace
is not a floating workspace.
2025-03-20 18:34:35 -07:00
LGUG2Z
6b95bf95f9 fix(wm): unset all duplicate monitor serial ids
This commit fixes a rare issue, seen exclusively with Acer monitors so
far, where two monitors of the same model can have an identical serial
number id.

If we encounter a system which has two connected monitors with the same
serial id number, the serial id number will be forcefully unset and
blacklisted for the rest of the session.

In this case, users must fall back to using device_id for options like
display_index_preferences.

Possibly a little overkill, but since this has been such a headache I'm
going to opt for this approach over #1368 for now.
2025-03-20 09:08:47 -07:00
LGUG2Z
c0e1e9366d chore(deps): bump windows-rs from 0.60 to 0.61 2025-03-18 08:54:55 -07:00
Jerry Kingsbury
532436fe1a test(workspace): add container and window tests
Added tests for functions related to removing, adding, and focusing a
container and windows.
2025-03-18 08:48:11 -07:00
LGUG2Z
532949409c fix(borders): show regular cursor on hover
This commit ensures that the WM_SETCURSOR message is handled by border
windows by setting the cursor to the default IDC_ARROW, which prevents
the spinning "Loading" icon from showing on hover.

Some credit is due to the user steiner5 on Discord for whining about me
not being interested in working on this while more generally complaining
about komorebi, which consequently made me want to work on this out of
spite since he's probably going to bounce off the software anyway.
2025-03-17 19:18:40 -07:00
dependabot[bot]
ec4a5e6491 chore(deps): bump reqwest from 0.12.12 to 0.12.14
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.12.12 to 0.12.14.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/v0.12.14/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.12...v0.12.14)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-17 19:00:16 -07:00
dependabot[bot]
f6e99eaac1 chore(deps): bump uuid from 1.15.1 to 1.16.0
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.15.1 to 1.16.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/v1.15.1...v1.16.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-17 19:00:09 -07:00
dependabot[bot]
a6cf801a6b chore(deps): bump starship-battery from 0.10.0 to 0.10.1
Bumps [starship-battery](https://github.com/starship/rust-battery) from 0.10.0 to 0.10.1.
- [Release notes](https://github.com/starship/rust-battery/releases)
- [Changelog](https://github.com/starship/rust-battery/blob/main/CHANGELOG.md)
- [Commits](https://github.com/starship/rust-battery/compare/v0.10.0...v0.10.1)

---
updated-dependencies:
- dependency-name: starship-battery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-17 19:00:02 -07:00
Jerry Kingsbury
83d11c6f0f test(workspace): add container manipulation tests
Added tests for the different container adding and removing functions.

Also added a test for the contains_window function.
2025-03-17 18:32:47 -07:00
Jerry Kingsbury
1ba1c57ba0 test(wm): add cycle window tests
Added a test for the cycle_window_in_direction function. The function is
tested by creating 3 windows and cycling in both the next a previous
direction. The test will ensure that the windows were cycled by checking
the window index to ensure it is the expected window.

Created a test for cycling the window by index. This test is similar to
the other cycle window test and performs the same steps as that one,
except it uses the test_cycle_container_index_in_direction function
instead.
2025-03-17 18:20:47 -07:00
alex-ds13
9f16894a09 fix(wm): correct workspace restore + remove workarounds
This commit removes some workarounds on the `update_focused_workspace`
function that were there to fix issues related to some bugs on the
`workspace.restore()` function.

This commit fixes the bugs on the `restore` function instead. The
`update_focused_workspace` function should be used only to update a
workspace layout.
2025-03-17 18:17:30 -07:00
alex-ds13
df9ae931cc feat(wm): toggle float override with floating layer
This commit ensures that when the user switches to the flooating layer
any new spawned window will be spawned floating as if the float override
was set.

This results in a workflow which makes it easier to spawn floating
windows on the fly.

This effectively reverts commit ff2aa5e51a.
2025-03-17 18:16:16 -07:00
alex-ds13
be2af9fdcb fix(borders): update monitor_idx on all borders
This fixes the issue where borders moved to other monitors would
sometimes be removed by their initial monitor because this data wasn't
being updated.

This effectively reverts commit 5919f88b38.
2025-03-17 18:15:27 -07:00
alex-ds13
c083484ef0 fix(wm): correctly focus workspace on eager-focus 2025-03-17 18:12:51 -07:00
Jerry Kingsbury
1804b21c4a test(wm): add tests for ws movement + tiling state
Added a test for moving a workspace from one monitor to another. The
test will ensure that after calling the function, the current monitor
index is the one where the workspace was transfered to. Test also will
check the count to ensure the new workspace was added to the new monitor
and that the old monitor has one less.

Added a test for swapping monitor workspaces. The test will create two
monitors one with a workspace that has a container containing multiple
windows and another with one. The test calls the swap_monitor_workspaces
function and then checks to see if the two workspaces were successfully
swapped.

Added a test to test toggling the tiling state. After each switch the
test will test the current state to ensure that it is the expected
state.
2025-03-16 15:55:00 -07:00
LGUG2Z
b6bd191cf5 feat(wm): center windows spawned during float override
It's very annoying and unclear when enabling the float override to open
the next window as floating to have that window appear immediately over
an existing tile.

This commit sets an explicit behaviour to center windows spawned while
the float override is active.
2025-03-16 15:48:28 -07:00
LGUG2Z
5919f88b38 fix(borders): do multiple render passes when required
This commit addresses a border rendering issue when moving a window from
a higher-indexed monitor to a lower-indexed monitor.

Previously, we would do a single render pass across all monitors in
order of their indexes, destroying borders no longer needed, and
creating new borders for new windows.

This resulted in the window being moved to the lower-indexed monitor
still existing in the global border cache when that monitor's borders
were updated, but then being removed when the borders of the origin,
higher-indexed monitor were updated.

With the changes in this commit, if we encounter a situation like this,
an additional render pass will be executed to ensure that the window
will have a corresponding border created on the destination
lower-indexed monitor.
2025-03-16 14:33:22 -07:00
LGUG2Z
ff2aa5e51a feat(wm): toggle float override with floating layer
This commit ensures that a workspace float override will also be applied
when the user switches to the floating layer, and removed when the user
switches to the tiling layer. This results in a workflow which makes it
easier to spawn floating windows on the fly.
2025-03-16 13:32:18 -07:00
LGUG2Z
42c12d5ec3 docs(mkdocs): add initial pages of usage section 2025-03-15 20:28:14 -07:00
LGUG2Z
f0ce8e8572 fix(wm): focus when switching to ws with only floating windows
This commit ensures that if a user switches from a workspace with
managed windows to a workspace without any managed windows but only
floating windows, the focused window from the previous workspace will
lose focus as it should, and the first floating window on the new
workspace will gain focus as it should.
2025-03-15 13:34:31 -07:00
Csaba
bdea4821c3 refactor(bar): move widgets to new folder
This commit moves all the widgets to a new folder in order to organize
the code while hoping to make it easier to find and add a widget.
2025-03-15 09:47:45 -07:00
Jerry Kingsbury
229aeb7ddc test(wm): add tests for additions, removals and swaps
Added a test for removing a window from a container. The test checks to
ensure a new container is created and that the removed window from the
original container is added to the new container. Also ensures that the
old container has one less container after the function is called.

Added a test for removing a workspace. The test keeps track of the
number of workspaces and the current workspace index.

Added test for swapping containers from different monitors. The test
will create two monitors and containers with different amount of
windows. Test will verify that the swap is successful by checking that
the number of windows in the container matches the number of windows it
was created with in the previous monitor. The same will be done with the
other container.
2025-03-15 09:45:57 -07:00
alex-ds13
17cbdc8663 docs(mkdocs): add multi monitor common-workflows section 2025-03-14 16:51:02 -07:00
Csaba
9f3d806f79 fix(bar): limit new state freq on time and date
This commit limits the number of times the time and date widgets get a
new state.

Even though having a limit of 1 second on the ui repaint, when the bar
is focused or hovered, this is ignored and state of these widgets were
updated many more times a second.

The time widget looked less accurate and lagging (especially with
multiple showing seconds) so the refresh interval is set to be 500 ms
instead of 1 second.
2025-03-14 15:59:51 -07:00
LGUG2Z
fe9a1416e7 feat(config): allow multiple asc files
This commit allows either the single canonical applications.json file,
or multiple files which adhere to the asc scheme to be given to the
app_specific_configuration_path config option.

I thought I had already implemented this earlier, but evidently I
hadn't.

This will be useful for people who want to maintain their own
independent set of asc rules, as they can be kept in a dedicated file
which won't be overwritten by the fetch-asc command.

resolve #736
2025-03-13 19:35:14 -07:00
Csaba
3618beb366 fix(bar): add focus-monitor-at-cursor msg to buttons
This commit adds the FocusMonitorAtCursor SocketMessage on all the
toggle buttons as the monitor idx is not sent as a parameter and the
monitor needs to be focused when these buttons are clicked on the bar
(especially for multiple bars).
2025-03-13 16:57:32 -07:00
alex-ds13
a4de2ee841 fix(wm): use preferred id when caching monitors
Use the preferred id set by the user as the key when caching monitors.
This way if a user is having issues with the device_id on their system
they can use the serial_number_id on display_index_preferences.

If instead a user is having issues with the serial_number_id they can
make sure to use the device_id on display_index_preferences. Komorebi
will use the preferred one as a key when caching the monitors.

This PR also includes a change of the DISPLAY_INDEX_PREFERENCES from a
Mutex to RwLock.

I believe the RwLock is better since it allows multiple readers at the
same time, while the mutex blocks on all calls even if you just want to
read or compare some value.

For display index preferences (same thing applies to other existing
mutexes) most times we access it is a read-only access. We only ever
change it when applying a config or when a command is used to change it.

Every other use is a read-only use so it doesn't make sense to block on
those situations
2025-03-13 09:12:15 -07:00
alex-ds13
60e1834b43 fix(wm): correct float window move/resize
This commit fixes an issue where the move/resize functions for floating
windows weren't properly taking into account the coordinates of
secondary monitors and were only working correctly on the main monitor
where top/left was 0/0.
2025-03-11 17:58:05 -07:00
alex-ds13
54323c4c6a fix(wm): update layer on cross monitor moves 2025-03-11 15:19:27 -07:00
LGUG2Z
6516c808ee chore(deps): cargo update 2025-03-10 20:52:42 -07:00
Jerry Kingsbury
894b6f3d96 test(wm): add container transfer and cycle tests
Implemented drop to ensure that the socket is deleted whenever the
function goes out of scope. This will ensure that if the test fails, the
test socket file will still be removed.

Added a test for cycling to the next and previous container in a
workspace.

Added a test for transfering a window from Monitor 1 to Monitor 2

Added a test for transfering a container to another montior. Also
updated the transfer window test to transfer the window back to the
original container. Both tests will check both monitors to ensure the
expected number of containers are in both.
2025-03-10 20:43:55 -07:00
dependabot[bot]
7ccdff4986 chore(deps): bump netdev from 0.32.0 to 0.33.0
Bumps [netdev](https://github.com/shellrow/netdev) from 0.32.0 to 0.33.0.
- [Release notes](https://github.com/shellrow/netdev/releases)
- [Commits](https://github.com/shellrow/netdev/compare/v0.32.0...v0.33.0)

---
updated-dependencies:
- dependency-name: netdev
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-10 08:33:09 -07:00
dependabot[bot]
c48e1db0ff chore(deps): bump random_word from 0.4.3 to 0.5.0
Bumps [random_word](https://github.com/MitchellRhysHall/random_word) from 0.4.3 to 0.5.0.
- [Commits](https://github.com/MitchellRhysHall/random_word/commits)

---
updated-dependencies:
- dependency-name: random_word
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-10 08:32:59 -07:00
alex-ds13
ea9752d5e1 fix(wm): focus correct window if monocled stack
Previously if we had a stack on a monocle container and tried to cycle
stack or move the window within the stack or even using the focus stack
window from a bar it would focus the wrong window and temporarely show
that wrong window. This commit fixes this.
2025-03-10 08:23:49 -07:00
Csaba
acf780767c feat(bar): add changing icons based on the time
This commit adds a little Easter egg on the time widget.

Use the `changing_icon` setting to enable this feature.

Based on the current time, the widget will use different icons to
indicate certain activities of the day.

00:00 MOON
06:00 ALARM
06:01 BREAD
06:30 BARBELL
08:00 COFFEE
08:30 CLOCK
12:00 HAMBURGER
12:30 CLOCK_AFTERNOON
18:00 FORK_KNIFE
18:30 MOON_STARS
2025-03-09 11:48:46 -07:00
Jerry Kingsbury
8e588d0284 test(wm): add workspace and monitor tests
Added tests to test switching monitor focus, setting workspace name, and
monitor size.
2025-03-08 13:49:51 -08:00
dependabot[bot]
91ff9b8852 chore(deps): bump ring from 0.17.11 to 0.17.13
Bumps [ring](https://github.com/briansmith/ring) from 0.17.11 to 0.17.13.
- [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md)
- [Commits](https://github.com/briansmith/ring/commits)

---
updated-dependencies:
- dependency-name: ring
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 16:47:46 -08:00
Csaba
81a7951312 feat(bar): added timezone to time and date widgets
This commit adds the timezone on the time and date widgets as a new
setting.

In case the timezone is invalid, the output is replaced with an error
message.

Use a custom format to display additional information.

resolve #1312
2025-03-07 16:28:45 -08:00
LGUG2Z
555308db5f test(wm): don't rely on datadir for socket location
This commit avoids relying on DATA_DIR for the test socket location as
this path is not available to us in GitHub Actions runners.
2025-03-07 16:10:16 -08:00
LGUG2Z
c90769f5fa chore(deny): allow unmaintained crate paste 2025-03-07 16:01:41 -08:00
LGUG2Z
76002385ab test(wm): colocate tests with src files, add socket msg test 2025-03-06 19:39:59 -08:00
Jerry Kingsbury
f40e80cd61 test(wm): add window manager unit tests
Created a test that creates the WM instance and ensures the instance is
running. The test creates a custom socket and then cleans up the socket
file after completion.

Created a test that creates a WM instance, monitor instance, and
workpace. The tests checks to ensure that the expected workspace is
focused properly.

Included recommended fixes to ensure that the focus_workspace function
is used correctly and that the test accurately checks the workspaces
length, current workspace index, and switching to an existing workspace.
2025-03-06 15:34:30 -08:00
LGUG2Z
e4f9d8af86 chore(deps): add deny.toml and dependencies.json 2025-03-06 15:34:27 -08:00
LGUG2Z
0c64432c25 feat(cli): add cycle-empty-workspace cmd
This commit adds a variation of the cycle-workspace command which will
attempt to focus the next empty workspace in the given direction (with
the usual wraparound). If there are no empty workspaces available, this
command will do nothing.
2025-03-05 15:52:21 -08:00
LGUG2Z
fe20caa56a fix(client): expose schemars feature and allow opt-out 2025-03-05 15:49:46 -08:00
Csaba
02a2796e7d fix(bar): correct time widget binary format alignment
This commit adds a bit of offset to the time widget's binary clocks so
they are more in the middle.

It also fixes some visual changes that were caused by upgrading to
eframe 0.31
2025-03-04 14:57:21 -08:00
LGUG2Z
a0eb025cec fix(bar): add opt schemars derive on test case 2025-03-04 08:39:47 -08:00
alex-ds13
70a61376a8 fix(borders): ignore borders on all stack window updates 2025-03-04 08:20:35 -08:00
LGUG2Z
1761919707 perf(client): disable schemars feature on komorebi lib dep 2025-03-03 21:49:43 -08:00
LGUG2Z
1325da4e81 chore(deps): cargo update 2025-03-03 21:46:03 -08:00
alex-ds13
0776ca1565 feat(border): cache borders on all workspaces
This commit refactors the `border_manager` with the following changes:

- Rework the way the borders are created and their pointer is sent to
  the window message handler. Now we also store the same pointer as a
  `Box<Border>` on the `border_manager`'s `BORDER_STATE`. This means
  that the borders we have are exactly the same ones that the border
  window itself is accessing so we can now store the border's info
  inside the `Border` struct and all of it will be accessible by the
  border window as well. This makes it so the "ACTUAL" border struct is
  the one created on the thread of the `Border::create()` function and
  when that thread finishes (after the border window closes) it will
  handle the drop of the border itself. However this means we need to be
  careful with our own stored `Box<Border>` since it will point to the
  same memory we can't let the compiler dropped them as usual or
  otherwise it would create heap corruption errors. So this commit
  creates a special function called `destroy_border()` to actually close
  the window border without dropping the border, since it will be later
  dropped by the thread that created it.

- Remove `BORDERS_MONITORS`, `FOCUS_STATE` and `RENDER_TARGETS` arc
  mutexes, since now this info is stored on the border itself.

- Change the `BORDER_STATE` to now map an id (container or window) to a
  `Box<Border>`.

- Change the `WINDOWS_BORDERS` to now map a window hwnd to a border id.

- Create new struct `BorderInfo` which as the border window hwnd and the
  border kind. This struct is what is now returned by the function
  `window_border()` which checks if some window as a border attached to
  it and if it does it returns this info. There is no need to clone the
  entire border. If in the future we need more info we can just add it
  to this struct.

- Change the way we clear the `BORDER_STATE`. Like mentioned before we
  need to be sure we don't drop the `Box<Border>` when removing it, so
  now we use the `.drain` function to remove all the borders as an
  iterator and we call the `destroy_border()` on each border we are
  removing.

- We now check if a border's `tracking_hwnd` has changed and if it does
  we simply update it instead of destroying the border and create a new
  one.

- Create function `delete_border` so that we can remove a border
  properly from outside the `border_manager`.

- Create function `hide_border` which spawns a new thread that searches
  if a window hwnd has a border attached to it and if it does it hides
  said border window. This function is called on every `window.hide()`.

- Create function `show_border` which spawns a new thread that searches
  if a window hwnd has a border attached to it and if it does it restores
  said border window. This function is called on every `window.restore()`.

- This commit also changes the previous `window.hide()` and
  `window.restore()` functions to be named:
  - `window.hide_with_border(hide_border: bool)`: this is the same
    function as before but adds a check at the end in case `hide_border`
    is true it calls `border_manager::hide_border()`. A new function was
    created with the same name as before `window.hide()` which by
    default calls this new function with `hide_border = true`.
  - `window.restore_with_border(restore_border: bool)`: this is the same
    function as before but adds a check at the end in case `hide_border`
    is true it calls `border_manager::hide_border()`. A new function was
    created with the same name as before `window.hide()` which by
    default calls this new function with `hide_border = true`.

- This commit creates a new function on `Container` called
  `load_focused_window_ignore_borders()` which performs the same as
  `load_focused_window()` but it ignores the borders when hiding and
  restoring the windows. This function, along with the
  `hide_with_border(false)` and `restore_with_border(false)` are used on
  all functions related to changing focus on a stack since if we let the
  borders be hidden and restored when cycling or changing focus on a
  stack the border would flicker slightly, this prevents that. Ignore
  borders when clicking on the stackbar as well.
  (P.S. there might still be other places that I forgot to use these new
  functions, but if that is the case then what will happen is a simple
  flicker of the stack border...)

- The `remove_window` from `Workspace` needs to call the
  `border_manager::delete_border()` so that wew make sure we remove that
  windows's border window as well if it exists. This is essential when
  enforcing workspace rules, otherwise the border would be left behind.

- Lastly, but not least, now that we hide the borders windows along with
  their tracking window, we no longer remove the borders when swapping
  workspaces or when toggling monocle, etc. Instead we keep all borders
  of all workspaces cached and simply hide them. They are only removed
  when their tracking window is closed or cloaked on a stack (since on a
  stack we only keep one border for all the entire stack container).
  This means that when changing between workspaces we no longer see the
  borders showing up delayed after the windows show up. Now both the
  window and it's border show up as if they are one and the same.
2025-03-03 21:15:45 -08:00
alex-ds13
724b0b7692 fix(border): update border when moving from admin windows 2025-03-03 21:13:37 -08:00
LGUG2Z
b53de81754 perf(cargo): make schemars derives optional
This commit makes all schemars::JsonSchema derives optional. After
analyzing the output of cargo build timings and llvm-lines, it was clear
that the majority of the 2m+ incremental dev build times was taken up by
codegen, and the majority of it by schemars.

Developers can now run cargo commands with --no-default-features to
disable schemars::JsonSchema codegen, and all justfile commands have
been updated to take this flag by default, with the exception of the
jsonschema target, which will compile with all derives required to
export the various jsonschema files.

Incremental dev build times for komorebi.exe on my machine are now at
around ~18s, while clean dev build times for the entire workspace are at
around ~1m.
2025-03-03 21:12:46 -08:00
Csaba
a837fea40c feat(bar): add icons to workspace-layer widget
This commits adds the ability to set icons for the `workspace-layer` with
the `DisplayFormat` and a setting to specify if it should `show_when_tiling`
or not.

collab with @alex-ds13
2025-03-03 08:13:29 -08:00
LGUG2Z
dd577c0eb3 fix(wm): preserve resize dimensions on offset toggle
This commit ensures that the resize dimensions will be reserved for
other monitors and workspaces when the
toggle-window-based-work-area-offset command is used.
2025-03-03 08:13:29 -08:00
Csaba
7d497c3e14 fix(bar): always add stroke on selected_frame
This commit fixes a breaking change on the selected_frame that was
introduced by eframe version 0.31.

In this version, the stroke is drawn on the inside of a Frame instead it
being drawn on the outside like before.

This now means that a stroke needs to be added on all the states of the
Frame in order to avoid all the elements to be moving around on hover.
2025-03-03 08:13:29 -08:00
LGUG2Z
e6398c29f8 docs(readme): add active individual commercial use licenses count 2025-02-27 18:15:43 -08:00
LGUG2Z
ca893140f5 chore(deps): bump eframe to 0.31 2025-02-27 16:50:59 -08:00
alex-ds13
b26910aa58 fix(wm): allow stacking in all dirs, improve stack border rendering
Previously the stacking logic would sometimes change the focused
container without actually changing focus to said container.

This resulted in the stack showing up with an unfocused border even
though we had focus on one windows belonging to the stack (just not the
right one).

Also before it wasn't possible to stack windows on some directions
when we were already on a stack.

This commit fixes both issues.
2025-02-26 19:23:40 -08:00
alex-ds13
487c217497 fix(borders): address memory leaks
This commit fixes multiple issues with the borders which were resulting
in multiple borders being created and not completely destroyed which
meant that the amount of borders in memory kept increasing indefinitely
the more we used komorebi. To do so this commit does the following:

- Clear all the maps on `destroy_all_borders`.

- Create function `remove_border` which should always be used when we
  want to remove a border since this function destroys the border window
  and removes all its related data and clones from all the maps.

- Create function `remove_borders` which should always be used when we
  want to remove multiple borders or filter the current existing
  borders. It takes in a `condition` function that takes a ref to the
  border's container id and a ref to the border and should return a
  bool. This function is then applied to each existing border and if it
  evaluates to true it will call `remove_border` on it.

- Apply these new functions on all the code that was previously manually
  removing borders.

- When a container is a stack, we now check it's unfocused windows, in
  case they had borders attached to them we remove them, otherwise these
  borders would persist and be drawn below other borders.

- We now check if a container's border was previously tracking a different
  window, if it was we destroy that border and remove it's hwnd from the
  `FOCUS_STATE` and then we check if its `tracking_hwnd` still points to
  the same border and remove it if it does (if it doesn't that means
  that a new border was already attached to that window so we don't
  remove it).

  We don't call `remove_border` here since we don't want to actually
  remove the border but instead we replace it with a new one tracking
  the correct window. (I've tried updating the `tracking_hwnd` instead
  of destroying the border and creating a new one but that didn't work
  since it still kept tracking the previous window...).
2025-02-26 19:22:22 -08:00
alex-ds13
4031fbf033 feat(wm): move all windows on ws layer toggle
This commit makes it so when you toggle between workspace layers it
moves all windows of that layer to the top of the z-order.

So if you move to `Floating` layer, then all floating windows are moved
to the top, and if you go back to the `Tiling` layer, all tiled
containers are moved to the top.
2025-02-26 19:21:33 -08:00
LGUG2Z
dadc40777f chore(deps): bump shadow-rs from 0.38 to 1 2025-02-24 21:12:31 -08:00
Csaba
59544edb74 fix(bar): use accent color for active widget components
This commit makes sure that the accent color is used on certain bar
components, such as active workspace, selected layout and focused
window.

This will now make these components stand out even more for a better
visual indication.

fix #1288
2025-02-24 17:36:26 -08:00
LGUG2Z
5e2c18cad3 chore(deps): bump win32-display-data 2025-02-24 17:28:50 -08:00
Csaba
d69dfeb715 feat(bar): add opts to show all icons on workspace widget
This commit adds 3 new display options on the komorebi workspace widget
to show all icons.
2025-02-24 08:12:07 -08:00
LGUG2Z
3a208b577c chore(just): add wpm target 2025-02-23 20:24:30 -08:00
alex-ds13
20817b094d fix(wm): prevent floating focus change event infinite loops
This commit stops the `FocusChange` event from focusing a floating
window when it is the one emitting said `FocusChange` event, since it's
not needed and is the cause of some flicker bugs reported!

If that floating window was the one emitting the `FocusChange` event
then it means it is already the foreground window, and there is no
reason for us to focus the window again (since that will create an
infinite loop of events).

When the window emitting this event is not floating we don't try to
focus the window, we simply set the focus index for the container of
that window and the focused index for the window of that container.

Except in one case, which is if the workspace has a monocle container,
then it does focus a window, it focuses the monocle window to make sure
the monocle keeps showing in front of everything and doesn't let
anything come in front of it.
2025-02-23 20:16:32 -08:00
alex-ds13
394709e356 fix(reaper): avoid deadlocks at startup
Previously the reaper at startup would lock it's own `HWNDS_CACHE` and
then try to lock the WM to get its `known_hwnds`.

However if there was an event in the meantime, process_event would lock
the WM first and then it would try to lock the reaper's `HWNDS_CACHE` to
update it.  This would deadlock since that would be locked by the reaper
waiting for the WM lock to be released.

This commit now makes it so we pass the `known_hwnds` to the reaper as
an argument at startup and it also rearranges the order of loading the
listeners.

Now komorebi first loads all the manager-type listeners, and only
afterwards does it load the commands and events listeners.

After some testing this seems to be the best order that doesn't cause
any issues at all!

There were some other issues that I've noticed before when starting
komorebi while having other 3rd parties trying to subscribe to it (like
komorebi-bar and YASB), which would make those subscribers lock the
`process_command` thread. This doesn't seem to be happening on my tests
anymore with this new order.
2025-02-23 20:10:29 -08:00
alex-ds13
990a339d4e fix(bar): apply work area offset on monitor reconnect
This commit makes sure the bar applies the the `work_area_offset`
correctly after a monitor reconnects; if it is the first time a monitor
is connecting, the cached offset won't exist yet.
2025-02-23 15:25:19 -08:00
alex-ds13
f0222dd4ab fix(wm): properly load monitor on first connect
This commit fixes an issue where if you started komorebi without a
monitor connected, and then connected it later, it wasn't properly
loading the data returned from `win32-display-data`.
2025-02-23 15:24:15 -08:00
LGUG2Z
974e5a2b20 refactor(bar): add extend_enum! macro
This commit adds an extend_enum! macro and some unit tests to provide
an ergonomic way to specialize configs for specific (sub)widgets.

The macro takes the name of the existing enum, the desired name of the
new, extended enum, and a list of variants which should be added to the
extended enum.

The macro will add new variants to a new enum definition first, before
wrapping the existing enum in an Existing variant and tagging it with
the `#[serde(untagged)]` annotation.

From is also implemented for ergonomic from/into calls between shared
variants of the existing and extended enums.
2025-02-23 12:16:00 -08:00
alex-ds13
2bbc269b9f feat(wm): add padding per monitor
This commit adds the ability to set container and workspace padding per
monitor.

To do so (and to simplify any future need of changing some value per
monitor), and have it pass through to each workspace a new field was added
to `Workspace` called `globals` which has a new struct called
`WorkspaceGlobals`.

`WorkspaceGlobals` includes any global values that might be needed by
the workspace.

This field is updated by the monitor for all its workspaces whenever the
config is loaded or reloaded. It is also updated on `RetileAll` and on
the function `update_focused_workspace`.

This should make sure that every time a workspace needs to use it's
`update` function, it has all the `globals` up to date!

This also means that now the `update` function from workspaces doesn't
take any argument at all, reducing all the need to get all the
`work_area`, `work_area_offset`, `window_based_work_area_offset` or
`window_based_work_area_offset_limit` simplifying the callers of this
function quite a bit.

Lastly this commit has also (sort of accidentaly) fixed an existing bug
with the `move_workspace_to_monitor` function.

This was previous removing the workspace from a monitor, but wasn't
changing it's `focused_workspace_idx`, meaning that komorebi would get
all messed up after that command. For example, the `border_manager`
would get stuck and the komorebi-bar would crash.

Now, the `remove_focused_workspace` function also focuses the previous
workspace (which in turn will create a new workspace in case the removed
workspace was the last workspace).
2025-02-23 09:52:33 -08:00
alex-ds13
13ee42276d fix(wm): hide/restore floating windows on monocle toggle 2025-02-23 06:51:42 -08:00
alex-ds13
3641ce6b42 fix(wm): take layer into account on ws restore
Previously if a workspace had any floating windows it would always focus
the first one when restoring. Now it only focus the floating window if
the workspace layer is `Floating`.
2025-02-23 06:51:14 -08:00
LGUG2Z
9d41a293f6 feat(wm): add tiling and floating ws layers
This commit introduces an implementation of workspace layers to
komorebi.

Workspace layers change the kinds of windows that certain commands
operate on. This implementation features two variants,
WorkspaceLayer::Tiling and WorkspaceLayer::Floating.

The default behaviour until now has been WorkspaceLayer::Tiling.

When the user sets WorkspaceLayer::Floating, either through the
'toggle-workspace-layer' command or the new bar widget, the 'move',
'focus', 'cycle-focus' and 'resize-axis' commands will operate on
floating windows, if the currently focused window is a floating window.

As I don't have 'cycle-focus' bound to anything, 'focus up' and 'focus
down' double as incrementing and decrementing cycle focus commands,
iterating focus through the floating windows assigned to a workspace.

Floating windows in komorebi belong to specific workspaces, therefore
commands such as 'move' and 'resize-axis' will restrict movement and
resizing to the bounds of their workspace's work area (or more
accurately, the work area of the monitor that the workspace belongs to,
as floating windows are never constrained by workspace-specific work
area restrictions).
2025-02-22 15:57:22 -08:00
LGUG2Z
1756983978 build(cargo): add custom build profiles 2025-02-22 15:57:17 -08:00
alex-ds13
3d327c407c perf(reaper): switch to channel notifications
This commit changes the way the reaper works.

First this commit changed the `known_hwnds` held by the `WindowManager`
to be a HashMap of window handles (isize) to a pair of monitor_idx,
workspace_idx (usize, usize).

This commit then changes the reaper to have a cache of hwnds which is
updated by the `WindowManager` when they change. The reaper has a thread
that is continuously checking this cache to see if there is any window
handle that no longer exists. When it finds them, the thread sends a
notification to a channel which is then received by the reaper on
another thread that actually does the work on the `WindowManager` by
removing said windows.

This means that the reaper no longer tries to access and lock the
`WindowManager` every second like it used to, but instead it only does
it when it actually needs, when a window actually needs to be reaped.
This means that we can make the thread that checks for orphan windows
run much more frequently since it won't influence the rest of komorebi.

Since now the `known_hwnds` have the monitor/workspace index pair of the
window, we can simply get that info from the map and immediately access
that monitor/workspace or use that index info.
2025-02-22 12:29:27 -08:00
alex-ds13
e5fb5390a8 feat(wm): strip unncessary info from state 2025-02-22 12:28:30 -08:00
alex-ds13
6a8e362c21 refactor(wm): make workspace fields public 2025-02-22 12:28:23 -08:00
alex-ds13
1edeb44203 fix(wm): include workspace rules on cached monitor
The `WorkspaceConfig` stored on `Workspace` was changed to not be
serialized, however it needs to be serialized and deserialized when
caching a monitor (after a disconnect), so that when it reconnects it is
able to read all the workspace rules, which include:

- initial_workspace_rules
- workspace_rules
- window_container_behaviour_rules
- layout_rules
- custom_layout_rules

This commit changes the serde skip to only skip if is is `None`.

This means that the `komorebic state` command will have all this
information as well and it will send it when notifying subscribers too,
which isn't good at all, so we need to find another way of excluding it
from the state.
2025-02-22 12:27:55 -08:00
LGUG2Z
8bc04f0610 chore(deps): bump windows-rs from 0.58 to 0.60 2025-02-21 20:16:50 -08:00
LGUG2Z
30c22f51c9 feat(cli): add toggle-window-based-work-area-offset cmd
This commit adds a command to toggle the application of a monitor's
window-based work area offset for the focused workspace.

resolve #1285
2025-02-20 20:38:12 -08:00
alex-ds13
c095f8ae9f fix(bar): improve handle monitor lifecycle handling
This commit introduces a few changes to the bar so that it can handle
the monitor disconnect/reconnect properly and so that it can map the bar
config to the correct monitor.

Previously if you had 3 monitor configs setup on `komorebi.json` with
the `display_index_preferences` set like this:

```
"display_index_preferences": [
    "0": "MONITOR_A",
    "1": "MONITOR_B",
    "2": "MONITOR_C",
]
```

But if you only had connected monitors A and C you would have to
manually change the bar configurations monitor index because now monitor
A would have index 0, but monitor C would have index 1 instead of 2.

Now with this commit this is no longer needed. Now the monitor index
setup on the bar configuration **MUST BE** the index you've used on
`display_index_preferences` for that monitor.

So in the case above you would setup the bar configurations using the
indices 0, 1 and 2 for monitors A, B and C respectively.

As for the changes introduced on this commit they are the following:

- `Komobar.monitor_index` is now an `Option`. When it is `None` it
  either means that the bar is starting and has not yet received the
  first `State` from komorebi or that the bar is disabled.

- `Komobar.config` is no longer an `Arc`. There was no need for that and
  it was creating more issues and difficulties. It was mainly used to
  pass the config as an `Arc` to `apply_config` function, but then this
  function would actually clone the config itself (not just the `Arc`).

  Also this function was passing a `self.config.clone()` most of the
  times except once when it received a new config from a hotreload. Now,
  on hotreload it first sets `self.config` to the new config and then
  calls `apply_config` which now uses its own `self.config` everywhere.

- We only change the `work_area_offset` when the bar is not disabled.

- We update the global `MONITOR` size/coordinates when we receive a
  `DisplayConnectionChange` from komorebi.

- We also check if the monitor size/coordinates have changed from the
  currently stored ones on every komorebi notification since sometimes
  the `DisplayConnectionChange` would be emitted while the state still
  had the previous size/coordinates.

  This makes sure we always capture a change of size/coordinates, store
  the new values, and update the bar.

- The previously mentioned update of the `MONITOR` coordinates also
  updates the `config.position.start` since that value is being
  overriden on `main.rs` in case the user hasn't set it so we need to
  override it again with the new monitor coordinates.

  This might mean that users of the old config system might have their
  start position changed, but if we didn't do this the bar wouldn't even
  show on the screen for them when a monitor disconnected/reconnected.

  This is another case for users to start moving into the new config
  system, since with that system the bar will still show up with the
  correct margins!
2025-02-20 19:57:36 -08:00
alex-ds13
c455ad1386 feat(wm): register more monitor reconcilator events
This commits adds a few more events that can trigger a
`DisplayConnectionChange` event.

Some of these events are redundant and after a display is
disconnected/reconnected it emits multiple `DisplayConnectionChange`
events.

However, when trying to remove them to have just one it stopped behaving
as it should, as if it was missing the update, while having them
duplicated it works properly.

Therefore it appears to be better to keep them for now, since the
duplicated events will exit early as soon as they see that the monitor
counts match (on the first event the counts don't match so it
adds/removes the monitor and the following events see that the counts
match).
2025-02-20 19:55:24 -08:00
alex-ds13
ce99290027 chore(deps): update win32-display-data rev 2025-02-20 19:55:19 -08:00
alex-ds13
60bc83d407 fix(wm): increase monitor_reconciliator channel bound
When there is a monitor disconnect/reconnect, usually it produces
multiple monitor events along with it, like the monitor resolution
change and the work area change. With the bound set to 1 it would
sometimes result in missed events.

This commit increases the bound to 20 to prevent this from happening.
2025-02-20 19:54:55 -08:00
alex-ds13
9c8a639282 fix(wm): check for monitor changes on system resume 2025-02-20 19:54:34 -08:00
alex-ds13
b7ebd3fe63 fix(bar): check monitor connection on all notifications 2025-02-20 19:54:27 -08:00
alex-ds13
ec8519d75a fix(wm): don't panic if state isn't up to date
This commit makes sure that if the state on file isn't up to date with
the expected `State` struct (maybe after an update) it doesn't panic
komorebi entirely, instead it ignores the state and continues with a
clean state.
2025-02-20 19:54:17 -08:00
alex-ds13
c62405bfaa fix(bar): restore + reposition on monitor reconnect 2025-02-20 19:54:05 -08:00
alex-ds13
0126465de4 fix(wm): cache monitor state instead of config
This commit changes the MONITOR_CACHE to hold an actual monitor with its
state instead of the config.

This allows us to keep the state of a disconnected monitor, so that when
the monitor reconnects we still have access to all its workspaces and
windows as they were before.

While the monitor is disconnected, all the windows from that monitor are
not considered as handled by komorebi and so they're free to be handled
at any point; if for example the user uses `alt+tab` or presses the
taskbar icon of one of these windows, that window will produce a `Show`
event and will become handled by the currently focused workspace of the
focused monitor.

When the disconnected monitor reconnects it checks all windows and once
it notices that this specific window is now being shown on another
monitor/workspace, it ignores it.
2025-02-20 19:52:38 -08:00
alex-ds13
1cd28652aa feat(wm): keep track of known_hwnds on wm 2025-02-20 19:52:15 -08:00
alex-ds13
a1ab1c5724 fix(wm): update usr idx map when there are no index preferences 2025-02-20 19:52:00 -08:00
alex-ds13
be932078e0 refactor(wm): make monitor fields public 2025-02-20 19:51:49 -08:00
alex-ds13
302e96c172 fix(bar): handle monitor disconnect/reconnect
This commit allows a bar to be disabled when it's monitor is
disconnected and re-enabled when said monitor reconnects.

This commit also uses the new `monitor_usr_idx_map` to properly map the
monitor index given by the users on config to the actual monitor index
on the `WindowManager` - in case some middle monitor gets disconnected
the index of the monitors to the "right" of that one will be lowered by
1.

This should allow for the following in cases with monitor A, B and C: if
monitor B disconnects, its bar will be disabled and monitor C will
properly change its monitor index internally to 1 so it still gets the
infos from monitor C (which now will have index 1 on the
`WindowManager`).
2025-02-20 19:49:47 -08:00
alex-ds13
c05eab9044 feat(wm): add monitor_usr_idx_map to wm
This commit creates a new field on the `WindowManager` called
`monitor_usr_idx_map` which contains a map of user intended index for
monitors to their actual monitors' index.

It will be rebuilt on `load_monitor_information` by taking into account
the `display_index_preferences`.
2025-02-20 19:49:21 -08:00
alex-ds13
ff986fba67 fix(wm): remove ws rules from disconnected monitors
This commit makes sure that any workspace_rules that tried to move a
window to a monitor that has been disconnected are removed.

If the monitor is later reconnected the workspace_rules should be added
from the cached config.
2025-02-20 19:48:56 -08:00
alex-ds13
e408410c58 fix(wm): handle serial id on load_monitor_information 2025-02-20 19:48:38 -08:00
alex-ds13
3ade81444a feat(wm): support both serial numbers and device ids
This commit makes use of both `serial_number_id` and `device_id` with
the first taking priority on all monitor reconciliator code, monitor
cache and on postload and reload.

This allows using the serial numbers on the `display_index_preferences`
config, while keeping compatibility with the use of `device_id`.

Using `device_id` should be discouraged since that value can
change on restart while serial number doesn't appear to do so.
2025-02-20 19:47:25 -08:00
alex-ds13
c9e98c3cdb fix(wm): serde skip annotation for workspace_config 2025-02-20 19:46:36 -08:00
alex-ds13
b42fcbe509 fix(wm): restore orphaned containers
When a monitor was disconnected the containers from the removed monitor
were being moved to the primary monitor.

However they weren't restored so containers that were on an unfocused
workspace of the removed monitor would have been cloak and were getting
added to the main monitor still cloaked creating ghost tiles. This
commit fixes that.
2025-02-20 19:46:21 -08:00
alex-ds13
d8636d651d fix(wm): don't store empty layout_rules on monitor cache 2025-02-20 19:46:14 -08:00
alex-ds13
9ad32e40cf fix(wm): cache monitor configs for unloaded monitors
If we have display_index_preferences that set a specific config index
for a specific display device, but that device isn't loaded yet, now we
store that config with the corresponding `device_id` on the monitor
cache.

Now when the display is connected it can load the correct config from
the cache.
2025-02-20 19:45:31 -08:00
alex-ds13
c91cb9f061 fix(wm): improve display_index_preferences selection
This commit reworks the way the `postload` and the `reload` functions
apply the monitor configs to the monitors.

Previously it was looping through the monitor configs and applying them
to the monitor with the index corresponding to the config's index.

However this isn't correct, since the user might set the preferred
indices for 3 monitors (like monitor A, B and C), with the preferred
index set to 0 for A, 1 for B and 2 for C, but if only monitors A and C
are connected then komorebi would apply config 0 to A and config 1 to C,
which is wrong it should be 2 for C.

This commit changes the way the configs are applied on those functions.
Now it loops through the existing monitors (already in order), then
checks if the monitor has a preferred config index, if it does it uses
that one, if it doesn't then it uses the first monitor config that isn't
a preferred index for some other monitor and that hasn't been used yet.

For the situation above it means that it would still apply config 2 to
monitor C. And in case there aren't any display_index_preferences set it
will still apply the configs in order.
2025-02-20 19:44:11 -08:00
alex-ds13
52340a1487 refactor(wm): store config on workspace
Store the `WorkspaceConfig` on the `Workspace` itself so that when we
want to cache the workspace as `WorkspaceConfig` on the monitor cache it
properly saves things like the workspace rules and the custom layout and
custom layout rules.
2025-02-20 19:43:53 -08:00
alex-ds13
4f7a8f10c0 fix(wm): properly store tile state when caching ws
Previously, when caching a workspace config for a monitor it would
simply store the `DefaultLayout` on `layout` even if the original
workspace config had the `layout` as `None`, which makes komorebi create
a workspace with the `layout` as default `BSP` and the `tile` set to
`false`.

This resulted in floating workspaces would becoming tiling `BSP`
workspaces after a monitor disconnect and reconnect.

This commit fixes this by turning the `layout` to `None` when `tile` is
`false`.
2025-02-20 19:42:33 -08:00
LGUG2Z
c903cdbb75 chore(dev): begin v0.1.35-dev 2025-02-20 19:31:27 -08:00
LGUG2Z
80edcadbf7 chore(release): v0.1.34 2025-02-20 18:06:19 -08:00
dependabot[bot]
36dedbe3fe chore(deps): bump os_info from 3.9.2 to 3.10.0
Bumps [os_info](https://github.com/stanislav-tkach/os_info) from 3.9.2 to 3.10.0.
- [Release notes](https://github.com/stanislav-tkach/os_info/releases)
- [Changelog](https://github.com/stanislav-tkach/os_info/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stanislav-tkach/os_info/compare/v3.9.2...v3.10.0)

---
updated-dependencies:
- dependency-name: os_info
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-18 08:03:40 -08:00
Csaba
5f31e89e8d feat(bar): add thai font fallback 2025-02-17 05:53:25 -08:00
Csaba
d168013375 fix(bar): removed unneeded separator character on network widget 2025-02-14 15:36:01 -08:00
David
db6e12b0c2 perf(wm): reduce from sysinfo scan scope
System::new_all() pulls all information (processes, cpu, mem, etc) but
we only need process information.

In addition currently it is being polled twice. System::new() creates an
uninitialized struct, then we poll specifically for process info.
2025-02-14 15:33:19 -08:00
pro470
e629baec0a feat(client): expose custom layout column enum
This now allows integrators to deal with custom layout data.
2025-02-14 15:32:32 -08:00
Pierce Thompson
475519d603 fix(wm): set default hiding behaviour to cloak
Documentation for the `window_hiding_behaviour` option states
that it defaults to `Cloak`, however, it was actually
defaulting to `Minimize`.
2025-02-14 15:31:00 -08:00
David
2d2b6e5c15 feat(bar): add keyboard language widget
This commit is a squashed commit containing the below commits from
PR #1266, which introduces a new "Keyboard" widget, which is used to
display information about the user's currently selected keyboard input
language. This new widget has a data refresh interval of 1 second if not
specified by the user.

721d2ef408
58373cd26c
ce27a76b36
fb9054a18b
55cc2fd889
461a73833e
781b8d0bd0
fa6bf6ff76
2025-02-07 20:57:46 -08:00
Mike Shaver
9f19d449b2 fix(docs): correct sp in example-configurations.md 2025-02-07 15:54:31 -08:00
alex-ds13
86bbcac5ae feat(client): add more re-exports for integrations
This commit is a squashed commit of all the individual commits that made
up PR #1267 - adding various derives and re-exports aimed at improving
the komorebi integration surface for third party applications.
2025-02-07 15:53:38 -08:00
DhanushAdithiya
bbd232f649 fix(docs): update base16 gallery link 2025-02-05 13:13:49 -08:00
LGUG2Z
2ca9c9048b build(just): add build and build-target(s) to justfile 2025-02-04 16:08:57 -08:00
LGUG2Z
95d758e371 fix(wm): avoid focus loops on ws w/ floating hwnds
This commit adds a check which will only allow the focused workspace to
have a full update if the number of managed containers is non-zero.

Previously, this would be triggered in a loop when focusing a workspace
with only focused windows.

Going back in time to the first versions of komorebi and yatta which
didn't have so many different container and window kinds, this was
intended to be called whenever the focus was changed to update the
state.

With the complexity komorebi handles in 2025, there are also many calls
to Win32 APIs when we call self.update_focused_workspace, so we need to
be a bit more careful about when and where we call it.

re #816
2025-02-03 20:18:17 -08:00
LGUG2Z
83114ed3e7 chore(deps): cargo update 2025-02-03 19:21:46 -08:00
LGUG2Z
f3075efcae fix(wm): always preserve resize on monocle toggle
This commit ensures that the Vec of resize adjustment Rects will never
be truncated when monocle mode is enabled for a container.

fix #1257
2025-02-01 20:02:48 -08:00
LGUG2Z
80b611890a fix(reaper): reap invisible "visible" windows
Another day, another stupid hack because Microsoft Office developers are
morons.
2025-02-01 00:15:06 -08:00
LGUG2Z
58d660eb16 feat(borders): add floating colour for windows impl
This commits adds support for focused floating window colours on borders
when using the "Windows" border implementation.
2025-01-28 15:58:19 -08:00
LGUG2Z
afdbce3db1 fix(borders): respond to sys foreground winevent w/ border manager event
This commit ensures that we emit a dedicated border manager event when
WinEvent::SystemForeground is received.

The OS can actually be slower than komorebi when it comes to processing
changed focus state, and in the border manager we rely on
GetForegroundWindow when calculating which the border focus state and
color should be.

This has previously resulted in a situation where there may be no border
with the "focused" color.

This should no longer be a problem because even in the situations where
the OS is slower than komorebi and is still returning an old HWND from
GetForegroundWindow, the new event that we emit to border manager in
response to WinEvent::SystemForeground will ensure that the border focus
colors get updated.
2025-01-27 21:16:40 -08:00
LGUG2Z
be8af2b314 feat(cli): add focus-monitor-at-cursor cmd
This commit adds a new komorebic command, focus-monitor-at-cursor, which
can optionally be chained with the focus-workspace command in
keybindings to reproduce the previous default behaviour of auto-focusing
whichever monitor the cursor was on before attempting to change the
focused workspace.
2025-01-27 16:59:50 -08:00
dependabot[bot]
241f8a1375 chore(deps): bump getset from 0.1.3 to 0.1.4
Bumps [getset](https://github.com/jbaublitz/getset) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/jbaublitz/getset/releases)
- [Commits](https://github.com/jbaublitz/getset/compare/0.1.3...0.1.4)

---
updated-dependencies:
- dependency-name: getset
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-27 16:53:31 -08:00
dependabot[bot]
bd0913a5f5 chore(deps): bump clap from 4.5.26 to 4.5.27
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.26 to 4.5.27.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.26...clap_complete-v4.5.27)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-27 16:40:26 -08:00
alex-ds13
7f3b932693 fix(wm): sort layout and behaviour rules
This commit makes sure the `layout-rules` and
`window_container_behaviour_rules` are sorted when setting them from the
config. So that the behaviour on workspace update is correct.
2025-01-27 14:15:02 -08:00
LGUG2Z
59cd36a2b1 fix(config): unset values on ws configs appropriately
This commit ensures that if a user removes an optional block from the
static config file, when reloading a workspace config, the removed
option will also be unset in the window manager workspace configuration
state.
2025-01-27 08:42:42 -08:00
LGUG2Z
b8e8ac2cc9 fix(wm): handle empty ws monitor switch w/ mff off
This commit improves the handling of the situation where a user, with
mouse-follows-focus diabled, focuses a secondary monitor with an empty
workspace, either via a komorebic command or by moving the cursor and
clicking on that empty workspace, and then attempts to switch
workspaces.

Previously, if the focus was made by a komorebic command, the mouse
cursor would not move from the previous monitor, and then when trying to
switch the workspace, the previous monitor would be focused against
first. The only way to change focus would be to move the mouse to the
secondary monitor.

With these changes, the following situations all work as expected:

* MFF On + MFF Off: komorebic cmd to focus an empty workspace on a
  secondary monitor allows subsequent focus-workspace cmds to execute on
  the newly focused secondary monitor

* MFF On + MFF Off: Moving the cursor to an empty workspace on a
  secondary monitor allows subsequent focus-workspace cmds to execute on
  the newly focused secondary monitor

There is one slight change in behaviour:

* MFF On + MFF Off: When the cursor is on a populated workspace on a
  secondary monitor which is not focused, focus-workspace cmds will not
  execute on that secondary monitor, but on the currently focused
  monitor

resolve #831
resolve #1128
2025-01-26 19:31:23 -08:00
LGUG2Z
c364b90b3b feat(config): add window container behaviour rules
This commit adds a new static config option,
window_container_behaviour_rules, which similarly to layout_rules, takes
a map of window container count threshold => window container behaviour.

When the number of window containers on the screen meets a given
threshold, the new window container behaviour is applied to the
workspace.

This can be used to automatically change from creating new window
containers for new windows to appending new windows to existing window
containers when the number of window containers on the screen reaches
more than what can be comfortably laid out and viewed on a user's
screen.

resolve #953
2025-01-25 22:02:50 -08:00
LGUG2Z
e2f7fe50c9 feat(wm): use monitor hardware ids where available
This commit pulls in changes to win32-display-data which provide the
monitor hardware serial number id taken from WmiMonitorID where
available.

No work has yet been done to integrate this with options such as
display_index_preferences.
2025-01-25 22:02:50 -08:00
LGUG2Z
81c143d7c2 feat(config): add object name change title ignore list
This commit adds a title regex-based ignore list for applications
identified in object_name_change_applications. When a title change on an
EVENT_OBJECT_NAMECHANGE matches one of these regexes, the event will
never be processed as a Show.

This is an edge case workaround specifically targeting the issue of web
apps in Gecko-based browsers which update their page titles at a fixed
regular interval, which was highlighted in #1235.

resolve #1235
2025-01-25 22:02:50 -08:00
LGUG2Z
fcd1c9dcbe fix(wm): populate ws rules on config reload
This commit fixes a bug where workspace rules would not be populated
properly on file reloads, leading to issues with the
ReplaceConfiguration message handler.
2025-01-25 22:02:50 -08:00
LGUG2Z
f73f0a0012 fix(bar): consider all window types when hiding empty ws
This commit ensures that floating windows, monocle containers and
maximized windows will be considered when the hide_empty_workspaces
option is enabled for the komorebi widget.

re #1131
2025-01-25 22:02:46 -08:00
alex-ds13
4a8362336f feat(bar): update bar on display connection change
Use the new `MonitorNotification` to reapply the config and recalculate
the position on `MonitorNotification::DisplayConnectionChange`.
2025-01-24 11:48:29 -08:00
alex-ds13
5c3c3659b5 feat(wm): notify subscribers of monitor events
This commit allows notifying the subscribers of any monitor events like
display connection change or work area change.
2025-01-24 11:48:29 -08:00
Csaba
4123c9a0e2 refactor(bar): resolve env vars with pathext
This commit introduces a new PathExt trait with a fn replace_env which
can ensure all environemnt variables are loaded for a PathBuf.

As part of the initial rollout this is used in komorebi-bar to look up
environment variables for the configuration switcher widget.

resolve #1131
2025-01-24 11:44:13 -08:00
Samu-K
cfd89c274c feat(bar): add modifiers for strftime integer formatters
Added the ability of use modifiers with custom format on the Date widget.

For example if using %U returns 04, you can add a modifier so that bar
date widget shows 05.
2025-01-24 10:41:48 -08:00
tieniu
4f041123d1 docs(mkdocs): add note to update asc path
Add note about updating app_specific_configuration_path when using
KOMOREBI_CONFIG_HOME
2025-01-24 10:41:48 -08:00
LGUG2Z
473e7cd6a0 feat(config): add aspect ratios for float toggling
This commit adds a new configuration option
"floating_window_aspect_ratio", which users can manipulate to set their
desired window size when using the toggle-float command.

resolve #1230
2025-01-24 10:41:45 -08:00
LGUG2Z
0a2dbed116 fix(wm): handle hide events for layered windows
This commit ensures that Hide events on Layered windows (usually added
when the transparency feature is enabled) will always be considered
eligible for handling.

This will avoid situations where ghost borders are left behind because
the Hide event was ignored.

fix #878
2025-01-23 16:43:17 -08:00
LGUG2Z
067a279c58 fix(wm): respect mff on cross-monitor monocle focus
This commit ensures that if mouse-follows-focus is disabled, the cursor
will not follow a focus change to a monocle container on an adjacent
monitor.

fix #1119
2025-01-23 16:11:30 -08:00
LGUG2Z
1101baa722 feat(wm): remove min window resize dimensions
This commit removes the minimum window resize dimensions restriction as
most apps now implement these restrictions themselves.

resolve #531
2025-01-23 16:03:24 -08:00
LGUG2Z
da156c091e chore(github): update issue workflows 2025-01-23 15:57:46 -08:00
alex-ds13
39621c14db fix(wm): stop wrongfully removing layout-flip
This commit removes the code on the workspace `update` on `layout-rules`
where it was setting the `layout-flip` to `None` if the layout was
different from `BSP`. This appears to be some old code when the
layout-flip would only apply to the `BSP` layout. However now it appears
to apply to all layouts so this code shouldn't exist. This commit also
changes the docs from the `FlipLayout` command to remove the statement
that only applied to `BSP` since it is no longer true.
2025-01-23 07:46:30 -08:00
dependabot[bot]
e153d2ea0c chore(deps): bump serde_json from 1.0.135 to 1.0.137
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.135 to 1.0.137.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.135...v1.0.137)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-22 20:37:51 -08:00
dependabot[bot]
e01c3e3c71 chore(deps): bump bitflags from 2.7.0 to 2.8.0
Bumps [bitflags](https://github.com/bitflags/bitflags) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/2.7.0...2.8.0)

---
updated-dependencies:
- dependency-name: bitflags
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-22 20:37:33 -08:00
alex-ds13
d7fcbb7d00 fix(bar): pass reconnect event to bar
This commit changes the `rx_gui` from receiving just a notification from
komorebi to now receive a new type `KomorebiEvent` which can be either a
`KomorebiEvent::Notification(komorebi_client::Notification)` or a
`KomorebiEvent::Reconnect`.

The `Reconnect` is sent after losing connection with komorebi and then
reconnecting again.

Now on the bar `update` we check for this `rx_gui` if we get a
notification we pass that to the
`KomorebiNotificationState::handle_notification` function just like
before (except now it takes a notification directly instead of taking
the `rx_gui` and checking for some message on the channel).

If instead we get a `Reconnect` we send a `MonitorWorkAreaOffset` socket
message to komorebi to update the work area offset.
2025-01-22 19:03:38 -08:00
alex-ds13
3e1fc6123a fix(bar): simplify komorebi-bar config
This interactively rebased commit is comprised of the subsequent
individual commits listed further below.

At a high level:

- work_area_offset is now automatically calculated by default
- monitor can now take an index in addition to the previous object
- position can largely be replaced by margin and padding for bars that
  are positioned at the top of the screen
- frame can now largely be replaced by margin and padding for bars that
  are positioned at the top of the screen
- height is now a more intuitive configuration option for setting the
  height of the bar

Detailed explainations and examples are included in the body of PR #1224
on GitHub: https://github.com/LGUG2Z/komorebi/pull/1224

fix(bar): add simplified config for bar

This commit creates a few new config options for the bar that should
make it a lot simpler for new users to configure the bar.

- Remove the need for `position`: if a position is given the bar will
  still use it with priority over the new config. Instead of position
  you can now use the following:
  - `height`: defines the height of the bar (50 by default)
  - `horizontal_margin`: defines the left and right offset of the bar, it
  is the same as setting a `position.start.x` and then remove the same
  amount on `position.end.x`.
  - `vertical_margin`: defines the top and bottom offset of the bar, it is
  the same as setting a `position.start.y` and then add a correct amount
  on the `work_area_offset`.

- Remove the need for `frame`: some new configs were added that take
  priority over the old `frame`. These are:
  - `horizontal_padding`: defines the left and right padding of the bar.
    Similar to `frame.inner_margin.x`.
  - `vertical_padding`: defines the top and bottom padding of the bar.
    Similar to `frame.inner_margin.y`.

- Remove the need for `work_area_offset`: if a `work_area_offset` is
  given then it will take priority, if not, then it will calculate the
  necessary `work_area_offset` using the bar height, position and
  horizontal and vertical margins.

feat(bar): set margin/padding as one or two values

This commit changes the `horizontal_margin`, `vertical_margin`,
`horizontal_padding` and `vertical_padding` to now take a
`SpacingAxisConfig` which can take a single value or two values.

For example, you can set the vertical margin of the bar to add some
spacing above and below like this:

```json
"vertical_margin": 10
```

Which will add a spacing of 10 above and below the bar. Or you can set
it like this:

```json
"vertical_margin": [10, 0]
```

Which will add a spacing of 10 above the bar but no spacing below. You
can even set something like this:

```json
"vertical_margin": [0, -10]
```

To make no spacing above and a negative spacing below to make it so the
tiled windows show right next to the bar. This will basically be
removing the workspace and container padding between the tiled windows
and the bar.

fix(bar): use a right_to_left layout on right side

This commit changes the right area with the right widgets to have a
different layout that is still right_to_left as previously but behaves
much better in regards to its height.

fix(bar): use default bar height

When there is no `work_area_offset` and no `height` on the config it was
using the `BAR_HEIGHT` as default, however the automatica
work_area_offset calculation wasn't being done properly. Now it is!

feat(bar): monitor can be `MonitorConfig` or index

This commit allows the `"monitor":` config to take a `MonitorConfig`
object like it used to or simply a number (index).

docs(schema): update all json schemas

fix(bar): update example bar config

fix(bar): correct work_area_offset on secondary monitors

feat(bar): add multiple options for margin/padding

This commit removes the previous `horizontal_margin`, `vertical_margin`,
`horizontal_padding` and `vertical_padding`, replacing them all with
just `margin` and `padding`.

These new options can be set either with a single value that sets that
spacing on all sides, with an object specifying each individual side or
with an object specifying some "vertical" and/or "horizontal" spacing
which can have a single value, resulting on a symmetric spacing for that
specific axis or two values to define each side of the axis individually.
2025-01-22 18:57:32 -08:00
LGUG2Z
d09d16d291 feat(cli): add focused-workspace-name query
This commit adds the StateQuery::FocusedWorkspaceName variant to allow
users to query the name of the focused workspace via the komorebic query
command.

re #1238
2025-01-22 16:35:39 -08:00
LGUG2Z
77ef259ea8 fix(wm): handle minimize event edge case
This commit handles an edge case where minimize events would not be
processed if both transparency and animations were enabled at the same
time.

fix #1231
2025-01-17 16:06:13 -08:00
LGUG2Z
392e4cc0c9 feat(bar): add cjk font fallbacks
This commit adds CJK font fallbacks to Microsoft YaHei and Malgun
Gothic. This will be looked up at runtime on the user's system, and only
loaded if the files exist in the default Windows font installation
location.

resolve #1139
2025-01-16 16:39:46 -08:00
dependabot[bot]
129dc5d43f chore(deps): bump winreg from 0.53.0 to 0.55.0
Bumps [winreg](https://github.com/gentoo90/winreg-rs) from 0.53.0 to 0.55.0.
- [Release notes](https://github.com/gentoo90/winreg-rs/releases)
- [Changelog](https://github.com/gentoo90/winreg-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gentoo90/winreg-rs/compare/v0.53.0...v0.55.0)

---
updated-dependencies:
- dependency-name: winreg
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-13 14:54:43 -08:00
LGUG2Z
eb6e12e2bd test(wm): add backwards compat integration test 2025-01-11 18:29:10 -08:00
Csaba
a069db611f feat(bar): binary clock and no-second time formats 2025-01-11 15:11:20 -08:00
LGUG2Z
b451df0379 chore(dev): begin v0.1.34-dev 2025-01-11 15:06:50 -08:00
LGUG2Z
cc51f62c3a chore(release): v0.1.33 2025-01-11 13:33:13 -08:00
Csaba
b1db417df5 feat(bar): opt to hide battery widget when charged 2025-01-09 15:49:51 -08:00
LGUG2Z
996a556984 chore(clippy): apply new rust 1.84.0 lints 2025-01-09 15:48:41 -08:00
LGUG2Z
c71e61fb1e chore(deps): cargo update 2025-01-08 21:39:21 -08:00
LGUG2Z
2d97ee101d feat(config): use global padding when omitted on ws
Simplifying my software for the masses
2025-01-08 20:47:16 -08:00
LGUG2Z
a4f69238b7 fix(wm): preserve new padding when loading state
This commit is a follow up to 7bf1521363,
ensuring that if a user has changed global padding options, that they
will be preserved from the initialized window manager state and applied
on top of the dumped state which is being restored.
2025-01-08 20:24:23 -08:00
alex-ds13
96f7eb1d31 fix(bar): apply position on start
For some reason, when calling the `window.set_position` when creating
the Komobar or even when applying the config on the first frame the
actual EGUI's window size wasn't changing. This commit adds a new field
to `Komobar` called `size_rect` so that we can store the expected size
rect of the window according to the config, so that we don't have to be
calculating it all the time. This field is updated on `apply_config`.

Now on `update` of the bar we check if the current size using the EGUI
Context is the expected `size_rect`, if it is we do nothing, if it is
not we update the bar position. This makes sure that on start the bar
will resize to the users config correctly! Now the resize of the bar
only happens here.

This commit also adds the `hwnd` field to `Komobar` so that we don't
have to be calling `process_hwnd()` all the time.
2025-01-07 16:39:38 -08:00
LGUG2Z
28cd4a8801 fix(wm): skip destroyed windows on rule enforcement
This commit introduces an if let binding to only process windows which
still exist when attempting to enforce workspace rules.

Previously, calls to functions such as Window::exe might have returned
an error if a window which had been destroyed but not yet removed from
the state was examined by the enforce_workspace_rules fn. Now, such
windows will fail the if let binding and be skipped entirely, eventually
being removed by the core event processing loop.
2025-01-04 21:14:33 -08:00
LGUG2Z
3aa92a1255 feat(bar): add update widget
This commit adds a new widget, "Update", which will check for komorebi
version updates using the cargo package version of the running binary
and the latest release returned from the GitHub API.

If the latest release is newer than the current cargo package version, a
widget will be shown, which can be clicked to open the changelog of the
latest release.
2025-01-04 21:14:33 -08:00
LGUG2Z
281980b010 fix(wm): avoid obvious border manager thread crash
This commit adds an early exit from the border manager's event
processing loop whenever a window which still exists in the state but
has been destroyed is encountered. Instead of returning an error, the
'containers loop will now skip ahead to the next iteration.

This commit also makes an adjustment to the frequency with which the
reaper sends border manager notifications - a single notification is now
sent at the end of each iteration if necessary, rather than one
notification per workspace.
2025-01-04 21:14:33 -08:00
LGUG2Z
c063302c91 feat(cli): add stackbar-mode command
This commit adds a new komorebic command "stackbar-mode" to allow users
to change stackbar modes programmatically.
2025-01-04 21:14:33 -08:00
LGUG2Z
ba52dc3378 fix(wm): add uncloak as a notif override event
If a user triggers the workspace reconciliator by clicking on an app in
the start bar or via alt-tab, a notification should be sent to
subscribers such as komorebi-bar so that the focused workspace can be
updated.

The various komorebi reconciliators and manager modules don't emit
events to subscribers themselves (yet?), so for now we can pass on the
uncloak event.

Maybe we can look into expanding the Notification enum in the future.

fix #1211
2025-01-04 21:14:33 -08:00
LGUG2Z
44716fdc98 fix(wm): avoid focused ws rule enforcement deadlock
This commit adds mutex lock scoping in
WindowManager::enforce_workspace_rule to avoid a deadlock when
should_update_focused_workspace evaluates to true.

fix #1212
2025-01-04 21:14:33 -08:00
LGUG2Z
4b30cecba9 feat(config): allow specifying layout flip on ws
This commit adds support for specifying a layout flip axis for each
workspace in the static configuration file.
2025-01-04 21:14:33 -08:00
LGUG2Z
d45cd729e8 feat(cli): allow checking of arbitrary config files
This commit adds an optional --komorebi-config flag to the check command
to allow users to check a komorebi.json file in an arbitrary location.
2025-01-04 21:14:27 -08:00
LGUG2Z
5a8f48c6b9 chore(dev): begin v0.1.33-dev 2025-01-03 18:20:23 -08:00
LGUG2Z
4b9d811499 chore(release): v0.1.32 2025-01-01 11:23:43 -08:00
LGUG2Z
d520a2bf74 docs(mkdocs): run docgen 2025-01-01 10:43:19 -08:00
LGUG2Z
7ef4fd81c0 feat(cli): add version update checks
This commit adds version update checks and feedback to the komorebic
start and check commands.
2024-12-31 10:58:25 -08:00
LGUG2Z
083ab65077 feat(docs): individual commercial use licensing
This commit updates various docs with information on the long-promised
individual commercial use license which will be available to purchase
from 01 Jan 2025 onwards.
2024-12-31 10:02:40 -08:00
LGUG2Z
e9bb6b43d6 feat(cli): add eager-focus command
This commit adds a new komorebic command "eager-focus", which takes a
full case-sensitive exe identifier as an argument. When komorebi
receives this message, it will look through each monitor and workspace
for the first matching managed window and then focus it.

This allows users who have well defined workspaces and rules to bind
semantic hotkeys to commands like "komorebic eager-focus Discord.exe" to
immediately jump to applications instead of mentally looking up their
assigned workspaces or positions within container stacks.
2024-12-29 12:29:23 -08:00
LGUG2Z
79eda30f48 feat(config): add matchers for removing titlebars
This commit adds a new field to the static config file, "remove_titlebar_applications", which allows
users to now use the full range of matching strategies to identify applications for which titlebars
should be removed. This is heavily discouraged for a number of reasons, and is unlikely to work with
a wide range of applications which now draw their own titlebar regions. The previous advice to use
in-application configuration settings to hide title bars if they exist is still valid.

resolve #805
2024-12-27 11:37:00 -08:00
alex-ds13
692da90890 feat(wm): allow reapplying initial workspace rules
This commit adds the following new socket messages and commands:
- `EnforceWorkspaceRules`: resets the `already_moved_window_handles` and
  calls `enforce_workspace_rules` so that all workspace rules, including
  initial workspace rules are applied again
- `enforce-workspace-rules`: cli command which sends the
  EnforceWorkspaceRules socket message
2024-12-26 14:16:25 -08:00
alex-ds13
4babf336ec fix(bar): prevent komorebi connection from staling
Sometimes the bar would randomly stop receiving notifications from
komorebi and would stop updating the `Komorebi` widget.

This feels to me that the reason is the same one that used to happen on
the `process_commands` from `komorebi` where the socket would get stuck
reading an empty connection.

This commit adds a read timeout to the socket to prevent that from
happening and hopefully it should stop those situations where the bar
would stop receiving notifications.
2024-12-26 14:16:13 -08:00
LGUG2Z
53a83eedb5 chore(deps): cargo update 2024-12-26 13:59:38 -08:00
dependabot[bot]
e1bbd3c1f5 chore(deps): bump houseabsolute/actions-rust-cross from 0 to 1
Bumps [houseabsolute/actions-rust-cross](https://github.com/houseabsolute/actions-rust-cross) from 0 to 1.
- [Release notes](https://github.com/houseabsolute/actions-rust-cross/releases)
- [Changelog](https://github.com/houseabsolute/actions-rust-cross/blob/v0/Changes.md)
- [Commits](https://github.com/houseabsolute/actions-rust-cross/compare/v0...v1)

---
updated-dependencies:
- dependency-name: houseabsolute/actions-rust-cross
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-26 13:59:38 -08:00
LGUG2Z
2c08fbe8f6 fix(wm): focus prev idx when closing workspace 2024-12-23 16:56:22 -08:00
Csaba
cced2a4433 feat(bar): added icon_scale to the config allowing a custom value between 1.0 and 2.0 2024-12-22 15:00:11 -08:00
alex-ds13
d93b6fa1b3 fix(bar): update widgets background color properly
Previously when changing between themes with different backgrounds the
widget's background color was not updating because they take the bg
color from the `RenderConfig` which was only being updated on
`apply_config`, now we also pass the `RenderConfig` to the `apply_theme`
function and update it's `background_color` there as well.
2024-12-21 08:53:01 -08:00
Csaba
99353b8064 fix(bar): network widget spacing 2024-12-19 21:01:11 -08:00
LGUG2Z
c64a42bca5 chore(deps): bump egui to v0.30 2024-12-19 17:00:41 -08:00
alex-ds13
5ab5ec4f3a fix(bar): apply theme on first frame
On some computers the context colors were being reset on the very first
frame. So now we try to apply the theme on the first frame and
afterwards we only do it again when there is a config change or a theme
socket message.
2024-12-19 16:39:35 -08:00
alex-ds13
ad08585faf fix(bar): use layout on Area to prevent shaking
There were some cases were the bar was showing some shaking, turns out
that using `ui.with_layout` instead of `ui.horizontal_centered` removes
this shaking, so this commit makes that change and uses the
`right_to_left` layout on the right widgets again, meaning that we need
to reverse them again.
2024-12-19 16:39:35 -08:00
alex-ds13
eb8a988841 fix(bar): fix background color clobbering 2024-12-19 16:39:35 -08:00
alex-ds13
0e2a55b300 fix(bar): apply roundings on komorebi.json change
Group roundings were getting lost when applying the theme after a
`komorebi.json` change/save trigger. Now we reapply these groupings on
the `apply_theme` to make sure they are always correct.
2024-12-19 16:39:35 -08:00
alex-ds13
eda91dcd1d fix(bar): use bg color before applying transparency 2024-12-19 16:39:35 -08:00
alex-ds13
0c6317a27b fix(bar): use correct transparency_alpha
Previously when reading the `theme` from `komorebi.json` it was also
getting the transparency_alpha from the `StaticConfig`, this is wrong,
it should use the alpha from the bar config. This commit fixes that.
2024-12-19 16:39:35 -08:00
alex-ds13
5c81a8c9e2 fix(bar): apply work_area_offset on config change 2024-12-19 16:39:35 -08:00
alex-ds13
a4128b7276 fix(bar): handle komorebi theme change properly
Previously if we changed/set the theme on `komorebi.json` it would apply
that theme to the bar without taking into account the transparency
alpha, also after removing the `theme` from `komorebi.json` file it
wasn't applying the theme from the bar config. This commit fixes these
issues.
2024-12-19 16:39:35 -08:00
alex-ds13
73a4df884c fix(bar): use the frame.inner_margin config 2024-12-19 16:39:35 -08:00
alex-ds13
32a234317c fix(bar): actually save the config on apply_config 2024-12-19 16:39:35 -08:00
alex-ds13
0dc6780da6 fix(bar): normalize areas of widgets
This commit changes the way each of the 3 parts of potential widgets
(left, center and right) is created so that they are all done on the
same way and look the same. It is using `Area` with different anchors
for each part which makes the widgets actually center vertically
properly.

This created an issue with the `Bar` grouping. To fix it we've made the
`Bar` grouping change the outer panel frame instead of creating an
actual group. This has the side effect (or maybe feature!) of losing the
background of the outer frame. Meaning this outer frame will now have
the look of the `Bar` grouping only. Currently it is using a fixed outer
margin but this can be changed in the future to a config option.
2024-12-19 16:39:35 -08:00
alex-ds13
f089d3e59b feat(wm): allow stopping without restoring windows
This commit creates a new `SocketMessage` called `StopIgnoreRestore`
which makes komorebi stop without calling `window.restore()` on all
windows. This way every maximized window will stay maximized once you
start komorebi again and it is able to use the previous `State`.

If it fails to restore the previous state you might have to call
`komorebic restore-windows` in case you had hidden windows, for example
when when using the `window_hiding_behaviour` as `Hide`, or you can
simply unminimize them if you were using `Cloak` or `Minimize`.
2024-12-18 08:19:21 -08:00
LGUG2Z
5dbf0f1b89 docs(schema): update all json schemas 2024-12-17 19:38:30 -08:00
alex-ds13
d393f8fe77 feat(bar): add two new display format types
This commit adds two new `DisplayFormat` types:
- `TextAndIconOnSelected`: which displays icon and text for the selected
  element and the other elements only have text.
- `IconAndTextOnSelected`: which displays icon and text for the selected
  element and the other elements only have icon.
2024-12-17 16:00:08 -08:00
alex-ds13
c3769e7881 feat(bar): optional workspaces on Komorebi widget
This commit makes the `workspaces` on `Komorebi` widget optional. This
way it allows adding the `workspaces` on one Alignment and the
`focused_window` on another one, for example.
2024-12-17 14:43:59 -08:00
Csaba
3c0b12f9af feat(bar): scale icon size with font size
This commit changes the way icons are displayed on the bar.

There was an issue with how app icons were sized using shrink_to_fit.

This has been changed to use fit_to_exact_size instead, relying on the
font size as a starting point and scaling it to 1.4 of its size, making
the icons to appear larger.

The same scaling was done to all the widget icons as well to make them
look unified.
2024-12-17 12:58:36 -08:00
alex-ds13
804faef229 fix(wm): focus and update after apply state
This commit makes sure we focus the previously focused workspace on all
monitors, load it and update it and in the end focus the actual focused
monitor and workspace pair calling `update_focused_workspace` to make
sure it updates the workspace and gives focus to the focused window.
2024-12-17 11:51:55 -08:00
LGUG2Z
7bf1521363 feat(wm): dump and load previous instance state
This commit adds changes to the main wm process to dump a state file to
temp_dir() when the process is exited either via komorebic stop or
ctrl-c, and to automatically try to reload that dumped state file if it
exists on the next run.

A new flag "--clean-state" has been added to both komorebi.exe and the
komorebic start command to override this behaviour.

The dumped state file can only be applied if the number of connected
monitors matches the number of monitors recorded in the state, and if
every HWND listed in the state file still exists.

This is validated by calling Window.exe(), which under the hood checks
for the continued existence of the process associated with the HWND.

Only the "workspace" subsection of the state for each matching
connecting monitor will be applied.
2024-12-17 08:33:02 -08:00
LGUG2Z
b49e634b65 feat(wm): add transparency config to global state
This commit adds various transparency related global configuration
values to GlobalState, which is can be queried via the komorebic
global-state command.

resolve #1182
2024-12-16 18:54:29 -08:00
LGUG2Z
be0671be6d fix(cli): correct copy-paste typo in autostart
This commit corrects a typo which adds the "--masir" flag to the
autostart shortcut when the user has passed the "--bar" flag to the
enable-autostart command.

fix #1178
2024-12-14 22:52:35 -08:00
alex-ds13
10539a4bab fix(bar): prevent the bar from changing mff value
This commit makes use of the new `send_batch` function to batch all the
messages in one go when pressing the button to move between workspaces
or when moving between stacked windows.

Since we are creating this messages in one go we won't be mistakenly
changing the value of mff for the user.

It also only batches the mff messages when the mff value it's true, if
it is already false there is no need to be sending those extra messages.
2024-12-14 08:59:46 -08:00
alex-ds13
9463c75f12 feat(client): create send_batch helper
This commit adds a helper function `send_batch` to komorebi-client that
allows sending multiple messages in a batch.

3rd party users of this library could already do this themselves but it
is nice to have this helper to simplify it.
2024-12-14 08:59:29 -08:00
LGUG2Z
c31c5dc69d chore(just): split schemagen into windows and nixos jobs 2024-12-14 08:57:45 -08:00
LGUG2Z
6c07863b81 chore(dev): begin v0.1.32-dev 2024-12-14 08:53:42 -08:00
LGUG2Z
40c55dec39 chore(release): v0.1.31 2024-12-13 16:48:35 -08:00
LGUG2Z
5cc2d9d469 chore(deps): cargo update 2024-12-13 16:05:20 -08:00
LGUG2Z
91b255280a ci(github): bump winget-releaser from v2 to main 2024-12-13 16:04:10 -08:00
LGUG2Z
9bd1073a83 perf(bar): add icon cache
This commit adds an icon cache which is indexed by executable name to
avoid unnecessary calls to windows_icons::get_icon_by_process_id, which
is known to start failing after the komorebi-bar process has been
running for a certain (unknown) period of time.
2024-12-10 16:23:37 -08:00
LGUG2Z
53c1990442 docs(schema): update all json schemas 2024-12-09 17:04:18 -08:00
Csaba
9d6173ecbb feat(bar): only collect enabled widgets 2024-12-09 15:11:25 -08:00
Csaba
830da89529 feat(bar): network widget - added show_default_interface and use enable to toggle the whole widget 2024-12-09 15:11:25 -08:00
Csaba
f59d7a51f1 feat(bar): indicate clickable widgets 2024-12-09 15:11:25 -08:00
Csaba
1470c63cfe feat(bar): 5 new grouping styles for shadow and glow 2024-12-09 15:11:25 -08:00
Csaba
64382b18c1 fix(bar): only indicate focused window on stack 2024-12-09 15:11:25 -08:00
alex-ds13
26f90cc9ee fix(borders): floating window z-order handling
This commit makes it so a floating window only has the floating border
when it is focused, if not it has the `Unfocused` border. It also makes
the 'focused_container' have the `Unfocused` border when it is not the
foreground window, for example when we have a floating window focused
instead.

This commit also changes the border's `window_kind` so that the stored
borders actually have that value so we can check it later (This value
wasn't being updated).

This commit also makes it so we properly invalidate the borders in the
situations discussed above (for example when changing focus to/from a
floating window we need the floating window border to update its ZOrder
as well as the previously focused window).

Lastly this commit, changes the `WM_PAINT` code part of the border so
that it now sets the position of border so that the border's ZOrder
updates to it's tracking window ZOrder.
2024-12-09 14:53:14 -08:00
alex-ds13
192af6751b fix(border): stop removing borders on wrong monitors 2024-12-09 07:57:53 -08:00
LGUG2Z
4f306e5bfd docs(schema): update all json schemas 2024-12-07 16:43:28 -08:00
LGUG2Z
ede0b23bb4 feat(borders): track window movements + animations
This commit introduces a number of changes to the border manager module
to enable borders to track the movements of windows as they are being
animated.

As part of these changes, the code paths for borders to track user
movement of windows have also been overhauled.

The biggest conceptual change introduced here is borrowed from
@lukeyou05's work on tacky-borders, where the primary event listener of
the komorebi process now forwards EVENT_OBJECT_LOCATIONCHANGE and
EVENT_OBJECT_DESTROY messages from application windows directly on to
their borders.

These events are handled directly in the border window callbacks,
outside of the main border manager module event processing loop.

In order to handle these events more performantly in the border window
callbacks, a number of state trackers have been added to the Border
struct.

When handling EVENT_OBJECT_NAMECHANGE, these values are read directly
from the struct, whereas when handling WM_PAINT, which is sent by the
system whenever we invalidate a border window, we update the state
values on the Border structs from the various atomic configuration
variables in the mod.rs file.

Another trick I borrowed from tacky-borders is to store a pointer to the
Border object alongside a border window whenever it is created with
CreateWindowExW, which can be accessed within the callback as
GWLP_USERDATA.

There is some unfortunate introduction of unsafe code to make this
happen, but the callback uses null checks to exit the callback early to
ensure (to the best of my ability) that there are no pointer
dereferencing issues once we start making border changes in the context
of the callback.

There are a few other Direct2D related optimizations throughout this
commit, mainly avoiding the recreation of objects like brush properties
and brushes.

Finally, the border_z_order option is now deprecated as the border
window is now tracking the z-ordering of the application window it is
associated with by default - this should resolve a whole host of subtle
border z-ordering issues, especially when dragging windows around using
the mouse.

This work would not have been possible without the guidance of
@lukeyou05, so if you like this feature, please make sure you thank him
too!
2024-12-07 12:10:07 -08:00
LGUG2Z
e6b5b78857 feat(cli): add kill cmd
This commit adds a new komorebic command, "kill", to kill background
processes that may be started by "komorebic start", without terminating
the main komorebi process.

This is useful when iterating on changes to external components like the
bar which may require restarts.
2024-12-07 11:14:25 -08:00
LGUG2Z
440d78e8f4 feat(cli): add support for starting/stopping masir
This commit adds support to the start and stop commands for starting and
stopping masir.
2024-12-07 11:09:38 -08:00
LGUG2Z
280ca0ffcd perf(cli): validate komorebi proc earlier on start
This is a small change to the start command which moves the check for
the komorebi processes to come a little bit earlier.

This small change will make running commands like "komorebic start
--bar" around 3s faster when komorebi is already running.
2024-12-07 10:57:50 -08:00
LGUG2Z
f227bd0fef fix(cli): handle spaces in bar config paths
More PowerShell script username-with-spaces path handling shenanigans.

re #1161
2024-12-07 10:51:11 -08:00
LGUG2Z
3781c8ea41 fix(borders): update on resuming from suspend
This commit is a small fix to ensure that the new Direct2D borders get
redrawn properly after the operating system resumes from a suspended
state.
2024-12-02 16:35:11 -08:00
LGUG2Z
33800903f7 chore(deps): cargo update 2024-12-02 16:33:19 -08:00
CtByte
bb31e7155d feat(bar): komorebi widget visual changes
The visual changes include:

* the focused_window section is now indicating the active window in a stack and has hover effect.
* custom icons for all the layouts, including `paused`, `floating`, `monocle` states.
* custom layout/state picker with configurable options.
* display format configuration for the layouts (Icon/Text/IconAndText)
* display format configuration for the focused_window section (Icon/Text/IconAndText)
* display format configuration for the workspaces section (Icon/Text/IconAndText)
2024-12-02 16:12:51 -08:00
LGUG2Z
40b32332ae fix(wm): track all hwnds in known_hwnds 2024-11-30 15:41:57 -08:00
alex-ds13
8743cdd292 fix(wm): cross-monitor ops for floating windows
This commit fixes an issue where when trying to move floating windows or
windows on a floating workspace across boundaries to another monitor
using the `move_container_in_direction` it wouldn't move the floating
windows physically, although it moved them internally on komorebi,
resulting in weird and wrong behavior.

This commit creates a new method on `Monitor` to
`add_container_with_direction` which takes a move direction and then
uses the same logic that was previously on the
`move_container_in_direction` function.

It changes the `move_container_to_monitor` function to take an optional
move direction which if it is some will have this function call the new
method `add_container_with_direction` instead of just `add_container`.

Lastly the `move_container_in_direction` function now when it realizes
the move will be across monitors simply calls the
`move_container_to_monitor` with the direction that was initially given
to it.

These changes require that all callers of `move_container_to_monitor`
add an direction option, instead of passing `None` on all of them, a new
helper function was created, named `direction_from_monitor_idx` which
calculates the direction a move will have from the currently focused
monitor and the target monitor return `None` if they are the same or
returning `Some(direction)` if not. This way now all commands that call
a move across monitor will use the logic to check from the direction if
it should add the container on front or end.

With these changes now all the code related to moving a window across
monitors using a command should be on one place only making sure that in
the future any change required only needs to be done on one place,
instead of having to do it on `move_container_to_monitor` and
`move_container_in_direction` as before!

This commit is an interactive squashed rebase of the following commits
from PR #1154:

8f4bc101bc
fix(wm): move floats in direction across monitors

This commit fixes an issue where when trying to move floating windows or
windows on a floating workspace across boundaries to another monitor
using the `move_container_in_direction` it wouldn't move the floating
windows physically, although it moved them internally on komorebi,
resulting in weird and wrong behavior.

This commit creates a new method on `Monitor` to
`add_container_with_direction` which takes a move direction and then
uses the same logic that was previously on the
`move_container_in_direction` function.

It changes the `move_container_to_monitor` function to take an optional
move direction which if it is some will have this function call the new
method `add_container_with_direction` instead of just `add_container`.
Lastly the `move_container_in_direction` function now when it realizes
the move will be across monitors simply calls the
`move_container_to_monitor` with the direction that was initially given
to it.

These changes require that all callers of `move_container_to_monitor`
add an direction option, instead of passing `None` on all of them, a new
helper function was created, named `direction_from_monitor_idx` which
calculates the direction a move will have from the currently focused
monitor and the target monitor return `None` if they are the same or
returning `Some(direction)` if not. This way now all commands that call
a move across monitor will use the logic to check from the direction if
it should add the container on front or end.

3b20e4b2fe
refactor(wm): use helper function on move to workspace

Use the same `add_container_with_direction` function on
`move_container_to_workspace` as it is being used on
`move_container_to_monitor` or `move_container_in_direction`.

This way we bring parity between all methods and make it easier to
change the way a container is added on a monitor workspace when taking
the move direction into consideration.
2024-11-30 10:57:15 -08:00
alex-ds13
01367f59e2 fix(client): add write-timeout to prevent blocking 2024-11-29 08:11:36 -08:00
alex-ds13
e6ddccc5f6 fix(wm): move ops on floating workspaces
83f222fe84
* fix(wm): correctly define moves across monitors

Moves within the same workspace were being considered as moves across
monitors when the workspace was floating (not tiled).

This commit fixes this by changing the way we first define if a move was
across monitor or not.

We now search for the moved window on all workspaces and check if its
monitor index is different from the target monitor index (the monitor
where the move ended).

a02694348e
* fix(wm): ignore moves/resizes on floating workspaces

This commit makes sure that moves or resizes within a floating workspace
(i.e. not tiled) will be ignored, unless the move is across monitors.
We don't care about the positions or sizes of windows within a floating
workspace!

4bf24f81e0
* fix(wm): avoid workspace load on cross monitor moves

This commit replaces the `window_manager.focus_workspace` call with a
`monitor.focus_workspace` which doesn't load the workspace. There is no
need to load the workspace when moving windows across monitors since
those workspaces will already be loaded, we simply need to update them.
Loading the workspace would cause some issues as well, like when moving
a window to a floating workspace which already contained a window that
matched some `floating_windows` rules was always putting the
"floating_window" on top of the window we just moved with a bunch of
focus flickering. This is fixed with this commit.

cb53f463ae
* fix(wm): avoid workspace load on command move across monitor

If the move happens between the already focused workspaces of two
monitors we shouldn't load the workspace, since it is already loaded and
it will cause changes on focused windows, which might result on the
window we just moved not being focused.
2024-11-29 02:57:32 -08:00
LGUG2Z
b22ec90438 refactor(clippy): apply rust 1.83.0 lints 2024-11-28 12:12:46 -08:00
CtByte
46b81e4372 feat(bar): floating center area for widgets
* Added a new floating area at the center of the bar
* Optional center widgets config, fixed spacing on the center widget
* Turning transparency on by default
2024-11-26 20:14:01 -08:00
alex-ds13
6f00c527a4 fix(wm): cross-monitor max floating window moves
When moving maximized floating windows across monitors they were
magically disappearing!

The window would be on the correct place, with the correct coordinates
and size, its styles wouldn't change it would still have the `VISIBLE`
style, however the window was invisible.

If we used the system move to try to move it sometimes we would be able
to see a bar on the top of the monitor and if we moved the window with
the keyboard on the direction of another monitor then the window would
start showing up on that monitor... So it was visible on that monitor
but not on the one we just moved it into.

After some investigation I decided to atribute that behavior to magic,
since I couldn't find any other plausible explanation, if someone knows
about this please tell me, I too would like to learn the ways of this
dark mysteries from the deep of the Windows OS.

On a serious note, this commit creates a workaround for this by simply
unmaximazing the window first (it's not restore, it doesn't change the
size) then it moves the window (if animations are enabled it proceeds to
wait for the animation to finish...), then it maximizes the window
again.
2024-11-26 14:34:57 -08:00
alex-ds13
3ad4090df8 fix(wm): resize float windows moved across monitors
Previously when moving floating windows across monitors we would keep
the size of the window as it was. For most cases this would be ok.

However for users with monitors with completely different sizes this
could result on a window that would fill across monitors when moving
from the bigger monitor to the smaller monitor.

This commit, attempts to resize the windows proportionally to the
monitors' sizes.

There is currently a slight issue with some apps (so far I've only
noticed it on 'Wezterm'...) where if the DPIs across monitors are
different they don't seem to fully get the OS DPI change completely, but
it seems that setting the `Wezterm` compatibility high DPI scaling
override to "System" on the app's executable properties, fixes the
issue.

Since this is only 1 app (so far...) and only when the scales between
monitors are different I decided to commit this anyway.

This will do more good than harm, since in the cases it was misbehaving
with 'Wezterm' the result would be a wrongly resized window that is
still completely visible on the target monitor anyway and the override
fix seems to be good so far.
2024-11-26 14:34:17 -08:00
thearturca
449ccac645 refactor(animation): new animations engine
This commit is comprised of the following interactively rebased commits
from PR #1002 by @thearturca.

1a184a4442
refactor(animation): move animations to its own mod

First step for more rusty version animations. The goal is to make
animations more generic so its easier to add new animations to komorebi!

d3ac6b72c2
refactor(animation): reduce mutex calls on `ANIMATION_STYLE`

8a42b738fe
refactor(animation): introduce `Lerp` trait

e449861c10
refactor(animation): generalized ANIMATION_MANAGER

Instead of a isize key for the ANIMATION_MANAGER HashMap, now we use a
String key. For window move animation, the key would be
`window_move:{hwnd}`.

This allows us to use single manager for more types of animations.

67b2a7a284
feat(animation): introduce `AnimationPrefix` enum

8290f143a6
feat(animation): introduce `RenderDispatcher` trait

2400d757fe
feat(animation): implement window transparency animation

This commit also fixes graceful shutdown of animations by disabling them
before exit and wait for all remaining animations for 20 seconds.

44189d8382
refactor(animation): move generation of `animation key` to `RenderDispatcher`

e502cb3ffb
refactor(animation): rename `animation` mod to `engine`

Linter was upset about this:
> error: module has the same name as its containing module

369107f5e0
feat(config): adds per animation configuration options

Originally static config only allowed global config for animations.

Since this refactor introduces the abilty to add more type of
animations, this change allows us to configure `enabled`, `duration` and
`style` state per animation type.

Now each of them take either the raw value or a JSON object where keys
are the animation types and values are desired config value. Also adds
support for per animation configuration for komorebic commands.
2024-11-25 20:42:56 -08:00
dependabot[bot]
1d00196240 chore(deps): bump serde from 1.0.214 to 1.0.215
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.214 to 1.0.215.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.214...v1.0.215)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-25 15:27:34 -08:00
dependabot[bot]
639ebd0b3d chore(deps): bump serde_json from 1.0.132 to 1.0.133
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.132 to 1.0.133.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.132...v1.0.133)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-25 15:27:27 -08:00
dependabot[bot]
e22eafbc8e chore(deps): bump clap from 4.5.20 to 4.5.21
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.20 to 4.5.21.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.20...clap_complete-v4.5.21)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-25 15:27:19 -08:00
dependabot[bot]
46c2ad512b chore(deps): bump rustls from 0.23.16 to 0.23.18
Bumps [rustls](https://github.com/rustls/rustls) from 0.23.16 to 0.23.18.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.23.16...v/0.23.18)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-25 15:26:59 -08:00
LGUG2Z
3de96609bb feat(bar): support floating window title updates 2024-11-25 15:08:08 -08:00
LGUG2Z
9c09284b0f fix(subscriptions): add override for title updates 2024-11-25 14:48:36 -08:00
CtByte
b14c0d07a2 fix(bar): correct network widget icon colour 2024-11-23 13:54:36 -08:00
alex-ds13
3615451f41 fix(wm): disallow focusing other windows when there is a maximized_window 2024-11-21 12:06:54 -08:00
alex-ds13
6893f39dd9 fix(wm): focus maximized windows when moving focus across monitors
There was an issue where if you changed focus across monitors and the
target monitor had a maximized window it would focus one of the
containers beneath it instead. And if there were no containers it
wouldn't focus anything, but instead keep focus on the previous monitor.
This commit fixes that issue.
2024-11-21 12:06:54 -08:00
LGUG2Z
041ef5731c refactor(bar): use monitor idx when switching ws
This commit follows up on a point made by @notTamion in #1128 - since we
have the monitor index, we can use it in the bar's workspace widget to
more accurately target workspaces via
SocketMessage::FocusMonitorWorkspaceNumber.
2024-11-19 20:44:48 -08:00
LGUG2Z
779c12bc6a docs(schema): update all json schemas 2024-11-19 19:52:33 -08:00
LGUG2Z
0e48370b73 style(bar): add aliases for default grouping style
This commit adds the "CtByte" and "CtByteWithShadow" aliases for the
"Default" and "DefaultWithShadow" GroupingStyle variants respectively as
an easter egg to recognize @CtByte's work in implementing the grouping
feature.
2024-11-19 19:48:10 -08:00
LGUG2Z
8de92ec32a docs(bar): add a position.end.y val warning
For dummies like me who set this to 0.0 and then wonder why the bar
disappears on config change.
2024-11-19 19:42:36 -08:00
LGUG2Z
ac243c6992 fix(bar): read latest transparency_alpha value
This commit is a small fix which ensures that the latest value of
transparency_alpha will be read and applied from config rather than
self.config in the apply_config fn.
2024-11-19 19:33:02 -08:00
LGUG2Z
d001d8a7a6 fix(wm): ensure focus restore on float + max hwnds
This commit ensures that when switching to a workspace which contains a
floating window or a maximized window, either the maximized window or
the first floating window index will be focused.

This is to prevent windows which have been hidden on the previous
workspace from retaining keyboard focus.

fix #1130
2024-11-19 19:01:38 -08:00
CtByte
219fa8e14f feat(bar): add widget grouping options
This commit adds various widget grouping and transparency options to
komorebi-bar, and is comprised of the individual commits listed below,
worked on in PR #1108, squashed into one.

e8f5952abb
* adding RenderConfig, and some test frames on widgets

0a5e0a4c0a
* no clone

a5a7d6906c
* comment

6a91dd46cd
* ignore unused

80f0214e47
* Group enum, Copy RenderConfig

fbe5e2c1f7
* Group -> Grouping

ce49b433f9
* GroupingConfig

f446a6a45f
* "fmt --check" fix (thanks VS)

d188222be7
* added widget grouping and group module

1008ec2031
* rounding from settings, and apply_on_side

7fff6d29a9
* dereferencing

655e8ce4c1
* AlphaColour, transparency, bar background, more grouping config options

cba0fcd882
* added RoundingConfig

ec5f7dc82d
* handling grouping edge case for komorebi focus window

12117b832b
* changed default values

645c46beb8
* background color using theme color, AlphaColour.to_color32_or, updating json format for Grouping and RoundingConfig

10d2ab21c7
* hot-reload on grouping

d88774328a
* grouping correction on init

2cd237fd0d
* added shadow to grouping, optional width on grouping stroke

4f4b617f26
* grouping on bar, converting AlphaColour from_rgba_unmultiplied, simplified grouping

3808fcec8f
* widget rounding based on grouping, atomic background color, simplified config, style on grouping

be45d14f6d
* renamed Side to Alignment, group spacing

be45d14f6d
* proper widget spacing based on alignment

b43a5bda69
* added widget_spacing to config

c18e5f4dbe
* test commit

cba2b2f7ac
* refactoring of render and grouping, widget spacing WIP

9311cb00ec
* simplify no_spacing

36c267246b
* correct spacing on komorebi and network widgets (WIP)

85a41bf5b2
* correct widget spacing on all widgets

50b49ccf69
* refactoring widget spacing

9ec67ad988
* account for ui item_spacing when setting the widget_spacing

e88a2fd9c0
* format
2024-11-18 19:56:00 -08:00
LGUG2Z
e4e94fd1a6 feat(borders): use direct2d for anti-aliasing
This commit overhauls the "Komorebi" borders implementation to use
Direct2D, which enables anti-aliasing for rounded borders.

A lot of the heavy lifting was done by @lukeyou05 in the tacky-borders
project, which this commit largely adapts to komorebi. @lukeyou05
provided an incredible amount of guidance and feedback on the
implementation of this feature on the komorebi Discord.

This commit is a squashed interactive rebase of the following commits:

238271a71e
feat(borders): initial impl of direct2d border drawing

5525a382b9
feat(borders): avoid multiple render target creation calls

431970d7b6
feat(borders): reduce redraws to improve perf

47cb19e54a
feat(borders): remove black pixels around direct2d corners

3857d1a46c
feat(borders): clean up render targets on destroy
2024-11-17 10:57:57 -08:00
LGUG2Z
e707a14b8a docs(readme): add gazafunds link 2024-11-17 10:09:03 -08:00
dependabot[bot]
818ec1c63b chore(deps): bump catppuccin-egui from 5.3.0 to 5.3.1
Bumps [catppuccin-egui](https://github.com/catppuccin/egui) from 5.3.0 to 5.3.1.
- [Release notes](https://github.com/catppuccin/egui/releases)
- [Changelog](https://github.com/catppuccin/egui/blob/main/CHANGELOG.md)
- [Commits](https://github.com/catppuccin/egui/compare/catppuccin-egui-v5.3.0...catppuccin-egui-v5.3.1)

---
updated-dependencies:
- dependency-name: catppuccin-egui
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-14 14:46:54 -08:00
dependabot[bot]
a10bb467e5 chore(deps): bump thiserror from 1.0.68 to 2.0.3
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.68 to 2.0.3.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.68...2.0.3)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-14 14:46:44 -08:00
dependabot[bot]
4fd60bbff3 chore(deps): bump image from 0.25.4 to 0.25.5
Bumps [image](https://github.com/image-rs/image) from 0.25.4 to 0.25.5.
- [Changelog](https://github.com/image-rs/image/blob/main/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.25.4...v0.25.5)

---
updated-dependencies:
- dependency-name: image
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-14 14:46:34 -08:00
LGUG2Z
cc196db046 feat(cli): add cycle-stack-index cmd
This commit adds a new komorebi command "cycle-stack-index" which allows
the user to manipulate the index position of the focused window in the
focused stack by swapping it with either the previous or the next window
until the desired index position has been found.
2024-11-11 16:27:45 -08:00
alex-ds13
7f0b54c35e fix(wm): add read timeout to command socket
After investigating further the issue where commands would randomly stop
working, we've noticed that the issue seems to be that somehow the
listening thread gets stuck reading the unix socket, as in it
continuously tries to read a socket on a connection that is not sending
anything anymore. The result would be that komorebi would no longer be
able to receive commands until it was restarted.

This fix adds a read timeout of 1s and it spawns a new thread to handle
the stream reading and process of cmds. So in case this happens again,
that specific processing thread will only be stuck for 1s but the rest
of komorebi will never get stuck and should keep working normally.
2024-11-11 06:22:42 -08:00
thearturca
b1726af2eb fix(animation): set pos for all container windows
This change prevents the move animation from playing again for each
window in the stack. Tested with all hiding behaviors. Looks good so
far.

resolve #1029
2024-11-10 09:24:56 -08:00
LGUG2Z
fd8cd4bb01 docs(github): add pull request template 2024-11-08 12:34:47 -08:00
LGUG2Z
172988ed81 fix(wm): apply ws cfgs only to declared ws indices
This commit ensures that when attempting to reload the static
configuration file after the user has imperatively created new
workspaces, the configuration reload logic will not attempt to load a
workspace config for those imperatively created workspaces.
2024-11-08 12:28:52 -08:00
LGUG2Z
36e3eaad36 fix(bar): retain exact workspace indices
This commit ensures that the exact workspace indices are tracked in the
komorebi widget state.

This fixes a bug where an incorrect workspace index could be sent with
SocketMessage::FocusWorkspaceNumber if a user had hide_empty_workspaces
set to true.

fix #1102
2024-11-04 17:01:49 -08:00
LGUG2Z
0f022d47df feat(cli): add close-workspace cmd
This commit introduces a new komorebic command, close-workspace. This
command will remove the focused workspace from the window manager state
if the following conditions are met:

1. The number of workspaces on the focused monitor are >1
2. The workspace is empty
3. The workspace is unnamed

The third condition is to ensure that we are not removing workspaces
which have been declared in the static configuration file.
2024-11-04 12:39:08 -08:00
LGUG2Z
dc1eb8ff50 fix(cli): expand list of ahk executable names
fix #1103
2024-11-04 12:07:38 -08:00
LGUG2Z
166f505aba fix(cli): handle spaces in bar config paths 2024-11-04 08:01:39 -08:00
LGUG2Z
d55d356b37 chore(dev): begin v0.1.31-dev 2024-11-04 07:58:49 -08:00
LGUG2Z
9a3dbccc89 chore(release): v0.1.30 2024-11-03 15:43:22 -08:00
LGUG2Z
24b43a154c fix(wm): remove panic on missing matching strategy
This commit ensures that if an IdWithIdentifer without an explicitly set
matching strategy makes it through to should_act_individual, it will be
treated the same as MatchingStrategy::Legacy instead of causing a
runtime panic.
2024-11-03 08:22:13 -08:00
LGUG2Z
6a09ec4b87 feat(cli): update start cmd output blurbs 2024-11-01 20:53:06 -07:00
LGUG2Z
374cd2c6d5 feat(wm): switch to asc v2 json format
This commit switches all relevant commands to treat the v2
applications.json asc format as the default format in all commands.

The v1 applications.yaml file will still be processed correctly if
passed.
2024-11-01 19:43:04 -07:00
alex-ds13
0f385d6245 fix(wm): restore hidden windows correctly
Fixes the issue talked on Discord[1] here where when using `Hide` as
hiding behaviour some windows were hidden and never restored.

The same would happen if using stacks with apps that matched a
tray_and_multi_window_identifiers rule.

[1]: https://discord.com/channels/898554690126630914/898554690608967786/1301581412008202298
2024-11-01 19:00:26 -07:00
alex-ds13
5503323695 fix(wm): handle moving windows to/from floating workspaces
This commit fixes the issue related to moving windows to/from a floating
workspace to a tiled workspace.

Previously the start of the move would be ignored however when moving
back from a tiled workspace since it didn't know about the existance of
that window it would also "move" that workspace focused tiled window
without physically moving it, leaving it in a weird state that seemed
like it was unmanaged.

This commit changes the way this mouse moves are handled and now also
handles moving `floating_windows` and even monocle or maximized windows.
2024-11-01 15:50:22 -07:00
LGUG2Z
aa9f50fd5c docs(readme): add link to awesome komorebi list 2024-11-01 14:17:19 -07:00
LGUG2Z
3a6ae01b12 fix(borders): permit failure on global destruction
This commit allows calls to Border::destroy to fail when called in the
context of border_manager::destroy_all_borders. This is important in the
context of the retile command, which calls this function, to not leave
the retile in an inconsistent state.
2024-11-01 11:53:21 -07:00
LGUG2Z
720089587b docs(readme): add to license explanation re: nonpersonal use 2024-11-01 09:38:43 -07:00
LGUG2Z
852d1f9eb0 docs(bar): update egui docstring link
Thanks to @dinesh-58 for pointing this out!

resolve #1078
2024-10-31 17:12:27 -07:00
LGUG2Z
ed5b0f9120 fix(wm): avoid slurping on stack -> stack ops
This commit ensures that when both the origin and target containers are
stacks during a stack operation, the "slurping" stack extension
behaviour introduced in cfb0c7f2ce will
not be applied.

fix #1085
2024-10-31 16:58:46 -07:00
alex-ds13
7f7b8c7c05 fix(borders): update border loc when moving
Currently, komorebi checks if a move is happening by checking if the
left mouse is pressed and updates the borders when there is a move while
the left mouse button is pressed (BTW this is why when moving with the
keyboard using the system move it only updates after pressing enter).

However, for some reason AltSnap somehow steals this left button
information and komorebi thinks the button is not pressed.

This PR makes it so it checks for the state of the pending_move_op and
keeps updating the borders while this is_some().

This fixes both that issue with AltSnap and the issue with system move,
as well as any other situations that might allow moving a window with
anything else that doesn't use a left mouse button press.
2024-10-31 12:39:32 -07:00
alex-ds13
4198f6fabc fix(wm): set last focused workspace on alt-tab 2024-10-30 09:59:04 -07:00
alex-ds13
4acd408b88 fix(wm): focus single window on show event
This commit makes sure we refocus the window on `Show` event when it is
the only window on the workspace.

This is needed because some windows send the `FocusChange` event before
the `Show` event and on the first event we will be focusing the desktop
window to unfocus any previous window from other workspace because the
workspace will still be empty. So after adding the window, we need to
focus it again.
2024-10-28 16:17:25 -07:00
alex-ds13
73d928771d fix(wm): handle monocled stack cycle commands 2024-10-28 16:16:59 -07:00
alex-ds13
d194afe6e6 docs(mkdocs): note that grid layout doesn't support resizing 2024-10-28 16:14:24 -07:00
Carlos Regis
72f4ed0575 docs(mkdocs): update border property name 2024-10-28 16:13:11 -07:00
dependabot[bot]
82ff69e337 chore(deps): bump shadow-rs from 0.35.1 to 0.35.2
Bumps [shadow-rs](https://github.com/baoyachi/shadow-rs) from 0.35.1 to 0.35.2.
- [Release notes](https://github.com/baoyachi/shadow-rs/releases)
- [Commits](https://github.com/baoyachi/shadow-rs/compare/v0.35.1...v0.35.2)

---
updated-dependencies:
- dependency-name: shadow-rs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 13:26:53 -07:00
dependabot[bot]
583d8b1e4c chore(deps): bump regex from 1.11.0 to 1.11.1
Bumps [regex](https://github.com/rust-lang/regex) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.11.0...1.11.1)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 13:26:43 -07:00
dependabot[bot]
2f1f1b160c chore(deps): bump serde from 1.0.210 to 1.0.213
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.210 to 1.0.213.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.210...v1.0.213)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 13:26:36 -07:00
dependabot[bot]
bcefea8a1a chore(deps): bump serde_json from 1.0.128 to 1.0.132
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.128 to 1.0.132.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/1.0.128...1.0.132)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 13:26:27 -07:00
dependabot[bot]
223404a1aa chore(deps): bump image from 0.25.3 to 0.25.4
Bumps [image](https://github.com/image-rs/image) from 0.25.3 to 0.25.4.
- [Changelog](https://github.com/image-rs/image/blob/main/CHANGES.md)
- [Commits](https://github.com/image-rs/image/compare/v0.25.3...v0.25.4)

---
updated-dependencies:
- dependency-name: image
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-28 13:26:17 -07:00
LGUG2Z
7d032db507 ci(github): add missing multiline backslash 2024-10-28 13:06:50 -07:00
alex-ds13
09afad624f fix(wm): correct monitor index preference handling 2024-10-18 10:29:54 -07:00
alex-ds13
903b6af507 feat(wm): apply workspace-rules to floating windows
This commit allows `workspace-rules` and `initial_workspace_rules` to be
applied to floating windows. As a by product of this commit, now the
command to show `visible-windows` will now also show the maximized
windows, monocled windows and floating windows.
2024-10-18 09:59:44 -07:00
LGUG2Z
1644fcf6f2 ci(github): add note about ghost tiles on bug template 2024-10-17 15:46:28 -07:00
LGUG2Z
b31e8911ce docs(mkdocs): add phantom tiles troubleshooting 2024-10-17 15:36:18 -07:00
alex-ds13
298fbafe00 feat(wm): add floating app info to ruledebug
This commit adds a `matches_floating_applications` to the `RuleDebug`
which allows users to know if a window was matched as a floating window
when using the debug part of the GUI.
2024-10-16 16:17:58 -07:00
LGUG2Z
e46a1a6117 ci(github): add sponsor check 2024-10-16 16:15:27 -07:00
LGUG2Z
34929f32a7 feat(wm): add theme socket message
This commit adds a new SocketMessage::Theme which allows for themes to
be set programmatically. This change has also been plumbed through to
komorebi-bar so that the bar theme will also update after komorebi
processes the message and passes it on to subscribers.

A new theme_manager module has been introduced to add notification-based
handling of theme changes, both from the static config file being
updated and from SocketMessage::Theme being received.
2024-10-16 15:10:34 -07:00
LGUG2Z
1ef7a09163 docs(mkdocs): generate latest cli docs 2024-10-16 09:14:00 -07:00
Arnaud Künzi
c0c3c81d69 docs(mkdocs): add more info on whkdrc config 2024-10-15 17:03:53 -07:00
Adinelson Brühmüller
7276dc2309 feat(cli): add --ahk flag to stop cmd
resolve #951
2024-10-15 17:03:53 -07:00
LGUG2Z
58d3086615 ci(github): update build + release workflow
This commit updates the build and release workflow to enable multi-arch
builds and releases.

A number of Rust-specific actions have been added, namely rust-cache to
handle cargo caching and actions-rust-cross to handle cross-compilation.

A release-dry-run target has been added to run on master which should
help catch any issues in release workflow changes early.

Releases drop goreleaser entirely in favour of action-gh-release which
was already in use to add msi installers to the releases previously
created by goreleaser.
2024-10-15 17:03:50 -07:00
Dovie Weinstock
aa5a36989f fix(cli): escape start --ahk args w/ double quotes
fix #1040
2024-10-14 17:29:33 -07:00
LGUG2Z
b612066367 feat(config): add support for v2 asc json
This commit adds support for a v2 format of the application specific
configuration file, centralizing on JSON to maximize the knowledge
crossover for people already familiar with the types used in
komorebi.json.

The biggest difference besides the format change is that matchers must
be used explicitly for every kind of rule, rather than being able to
specify options on a default rule. This is a bit more verbose, but
ultimately allows for significantly more flexibility.
2024-10-14 16:50:03 -07:00
dependabot[bot]
cbe5b24f73 chore(deps): bump egui-phosphor from 0.7.2 to 0.7.3
Bumps [egui-phosphor](https://github.com/amPerl/egui-phosphor) from 0.7.2 to 0.7.3.
- [Changelog](https://github.com/amPerl/egui-phosphor/blob/main/CHANGELOG.md)
- [Commits](https://github.com/amPerl/egui-phosphor/compare/v0.7.2...v0.7.3)

---
updated-dependencies:
- dependency-name: egui-phosphor
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-14 07:21:15 -07:00
LGUG2Z
2ead216eeb chore(just): add install-targets to justfile 2024-10-13 15:07:31 -07:00
LGUG2Z
b0944662fa fix(wm): add cmd thread lock acquisition timeouts
After some investigation by @alex-ds13 on Discord it looks like there
are times where attempting to gain a lock on the WindowManager inside of
read_commands_uds results in the thread becoming blocked when it's not
possible to obtain the lock.

Instead of waiting indefinitely for a lock, this change ensures that we
will wait for at most 1 second before discarding the message so that the
command listener loop can continue.

Warning logs have been added to inform when a message has been dropped
as a result of lock acquisition failure.
2024-10-13 15:07:31 -07:00
LGUG2Z
1376d7be04 feat(wm): add retile with resize socket msg
This commit adds a new SocketMessage variant,
RetileWithResizeDimensions, to preserve any resize dimensions applied by
the user.

This new variant is now used when clicking on a workspace using the
komorebi widget in komorebi-bar.
2024-10-13 15:07:31 -07:00
LGUG2Z
5da72e10df feat(client): add subscribe_with_options
This commit adds a new method, subscribe_with_options to
komorebi-client.

The first option introduced is to tell komorebi to only send
notifications when the window manager state has been changed during the
processing of an event.

This new subscription option is now used with komorebi-bar to improve
rendering and update performance.
2024-10-13 15:07:31 -07:00
LGUG2Z
d21ffb28cc fix(cli): update fetch-asc output to use '/' 2024-10-13 15:07:31 -07:00
LGUG2Z
4e27febdc0 chore(cargo): suppress macro lint warnings 2024-10-13 15:07:31 -07:00
LGUG2Z
3c5852ae20 docs(cli): highlight eol features in start + check 2024-10-13 15:07:27 -07:00
LGUG2Z
7943fccb1b chore(cargo): +nightly fmt 2024-10-13 10:05:11 -07:00
LGUG2Z
2d2cea31c0 docs(schema): update all json schemas 2024-10-13 10:05:11 -07:00
alex-ds13
a17924c2af feat(config): add floating border colour opt 2024-10-13 10:05:11 -07:00
alex-ds13
91519227d4 fix(wm): allow cross-monitor floating window moves
This commit changes the `move_container_to_monitor` from the WM to allow
moving floating windows as well.

It also adds a new method `move_to_area` to the `Window` that allows
moving a window from one monitor to another keeping its size.
2024-10-13 10:05:11 -07:00
alex-ds13
f91d0aabf5 fix(wm): check exhaustively for ws emptiness
This commit creates a new function for the workspaces to check if they
are empty or not.

This function properly accounts for maximized windows, monocle windows
and floating windows.

This should fix the cases where the WM was checking if the workspace was
empty to focus the desktop in order to loose focus from previously
focused window.

Previously it wasn't checking for floating windows so it cause continues
focus flickering when there were only floating windows on the workspace.
2024-10-13 10:05:11 -07:00
alex-ds13
d5b6584042 feat(wm): add float override option
This commit introduces a new option `float_override`, which makes it so
every every window opened, shown or uncloaked will be set to floating,
but it won't be ignored. It will be added to the floating_windows of the
workspace, meaning that the user can later tile that window with
toggle-float command.

This allows the users to have all windows open as floating and then
manually tile the ones they want.

This interactively rebased commit contains changes from the following
individual commits:

0e8dc85fb1
feat(wm): add new float override option

30bdaf33d5
feat(cli): add command for new option `ToggleFloatOverride`

b7bedce1ca
feat(wm): add window_container_behaviour and float_override to workspaces

221e4ea545
feat(cli): add commands for workspace new window behaviour and float_override

b182cb5818
fix(wm): show floating apps in front of stacked windows as well

7c9cb11a9b
fix(wm): Remove unecessary duplicated code
2024-10-13 10:05:11 -07:00
LGUG2Z
6db317d425 feat(wm): separate floating and ignored apps
This commit introduces a distinction between ignored applications
(previously identified with float_rules) and floating applications.

All instances of "float_" with the initial meaning of "ignored" have
been renamed with backwards compatibility aliases.

Floating applications will be managed under Workspace.floating_windows
if identified using a rule, and this allows them to now be moved across
workspaces.

A new border type has been added for floating applications, and the
colour can be configured via theme.floating_border.

This interactively rebased commit contains changes from the following
individual commits:

17ea1e6869
feat(wm): separate floating and ignored apps

8b344496e6
feat(wm): allow ws moves of floating apps

7d8e2ad814
refactor(wm): float_rules > ignore_rules w/ compat

d68346a640
fix(borders): no redraws on floating win title change

a93e937772
fix(borders): update on floating win drag

68e9365dda
fix(borders): send notif on ignored hwnd events
2024-10-13 10:05:11 -07:00
Csaba
07a1538905 feat(bar): add label prefix config opt
This commit makes the label prefix configurable. Users can select if
they want to show an icon, only text, or both text and an icon.
2024-10-13 10:05:11 -07:00
LGUG2Z
853db2f15f docs(github): update issue templates 2024-10-13 10:05:11 -07:00
LGUG2Z
c9f180ce0f chore(deps): cargo update 2024-10-13 10:05:11 -07:00
LGUG2Z
bc00f54c90 feat(bar): add more logging around error paths 2024-10-13 10:05:11 -07:00
LGUG2Z
c57759242a feat(wm): delete stale sub socket files 2024-10-13 10:05:11 -07:00
LGUG2Z
6f27de8e5c chore(deps): bump eframe from 0.28 to 0.29 2024-10-13 10:05:11 -07:00
Csaba
a9e98034b0 feat(bar): add cpu widget
This commit adds a CPU widget, following the patterns of the Memory
widget.
2024-10-13 10:05:11 -07:00
LGUG2Z
3489163793 refactor(wm): standardize config env var handling
This commit ensures that whenever komorebi.json is read and deserialized
into StaticConfig via StaticConfig::read, all known paths where
$Env:KOMOREBI_CONFIG_HOME and $Env:USERPROFILE are accepted will be run
through the resolve_home_path helper fn.
2024-10-13 10:05:11 -07:00
LGUG2Z
71d65cf4a1 fix(wm): ignore minimize calls on komorebi-bar
Hopefully I don't have to make this yet another configurable list...
2024-10-13 10:05:10 -07:00
alex-ds13
a5e6828d1e fix(wm): update monitor focus before focus-stack-window
This commit fixes the cases where you'd call this command on a monitor
which was not focused, for example by pressing a button on a bar like
komorebi-bar or other when you had focus on another monitor.
This change ensures that first we focus the monitor where the mouse cursor
is, this way it will act on the monitor that you've just pressed instead
of the monior that was focused before.
2024-10-13 10:05:10 -07:00
LGUG2Z
96605f72a7 feat(config): add bar configurations opt
This commit adds a "bar_configurations" option to the static config file
which takes an array of PathBufs.

If this option is defined and the --bar flag is passed to the "komorebic
start" command, komorebic will attempt to launch multiple instances of
komorebi-bar.exe with the --config flag pointing to the PathBufs given.

This configuration option is only consumed by komorebic, not by the
window manager directly, so it could also be used by other status bar
projects to read configuration file locations from.

There is no requirement for the PathBufs to point specifically to
komorebi bar configuration files if the --bar flag is not being used
with "komorebic start".
2024-10-13 10:05:10 -07:00
LGUG2Z
18bb060b71 refactor(bar): use native apis for positioning
This commit replaces almost all uses of the egui Viewport API for bar
window positioning with calls to SetWindowPos via komorebi_client's
Window struct.

This seems to play much more smoothly with multi-monitor setups where
each monitor has a different scaling factor, opening the door for
multiple instances of komorebi-bar.exe to run against multiple monitors.

As a result of this change, the "viewport" configuration option has been
renamed to "position" and doc strings have been changed to remove the
reference to the egui crate docs. Similarly, "viewport.position" and
"viewport.inner_size" have been renamed to "position.start" and
"position.end" respectively. Backwards-compatibility aliases have been
included for all renames.
2024-10-13 10:05:10 -07:00
LGUG2Z
20f370a51d feat(bar): dpi-awareness + position hotloading
This commit ensures that the komorebi-bar.exe process is DPI aware and
applies DPI compensation to viewport.position and viewport.inner size
both on launch and on configuration reload.  viewport.position changes
are now hotloaded wihtout having to restart the process.

re #1024
2024-10-04 16:09:14 -07:00
LGUG2Z
2d1613b4d9 feat(bar): use unique subscriber names
This commit ensures that multiple processes of komorebi-bar.exe use
unique, randomly-suffixed subscriber names when registering with
komorebi.
2024-10-04 15:22:40 -07:00
LGUG2Z
216154b975 fix(border): remove windows accent from monocle on restore 2024-10-04 09:51:18 -07:00
LGUG2Z
fe9b7e53b7 fix(wm): always focus desktop on empty ws
This commit ensures that when switching to a workspace, if that
workspace is empty, the desktop window will be focused (and focus will
be removed from the last focused window on the previous workspace)
regardless of the value of follow_focus.
2024-10-04 09:51:13 -07:00
LGUG2Z
d9bffa06df feat(wm): configurable slow app compensation time
This commit ensures that other "slow" applications (besides firefox)
which require a compensation time to sleep before continuing with
eligibility checks can be configured by end users in komorebi.json.

As the compensation time will vary depending on the specs of the end
user's machine, the compensation time in ms has also been made
configurable.
2024-10-02 13:03:10 -07:00
LGUG2Z
d34363af8f docs(readme): update quickstart video 2024-10-02 11:41:51 -07:00
LGUG2Z
db4b0dd63b fix(windows): conditional compilation for 32-bit
This commit ensures that komorebi will compile when targeting 32-bit
architectures, namely `stable-i686-pc-windows-msvc`.

Thanks to @kennykerr for pointing out that Get/SetWindowLongPtrA/W calls
don't actually exist on 32-bit builds of Windows and are aliased instead
to Get/SetWindowLongA/W which take i32 args instead of isize args:
https://github.com/microsoft/windows-rs/issues/3304
2024-10-02 11:41:51 -07:00
LGUG2Z
7b563aac5e feat(wm): add all matching strats for ws rules
This commit ensures that the full range of matching strategies for both
Simple and Composite matching rules will be respected for both initial
and persistent workspace rules.

The generate-static-config command will no longer attempt to populate
workspace rules, and will likely slowly be deprecated as the
overwhelming majority have users have already migrated to the static
configuration file format.

fix #991
2024-10-02 11:41:13 -07:00
LGUG2Z
b7198242ff feat(transparency): add ignore rules to config
This commit adds transparency_ignore_rules to the komorebi.json static
configuration format. Windows that match any rules given in this list
will not have transparency applied when they are unfocused.

For example, to ensure that a browser window is not made transparent
when the focused tab is a YouTube video:

```json
"transparency_ignore_rules": [
  {
    "kind": "Title",
    "id": "YouTube",
    "matching_strategy": "Contains"
  }
]
```
2024-09-28 12:31:50 -07:00
LGUG2Z
a1f1be0afe chore(dev): begin v0.1.30-dev 2024-09-28 11:50:25 -07:00
LGUG2Z
e4b7adeb0f docs(mkdocs): add bar reference link to nav 2024-09-27 22:18:44 -07:00
LGUG2Z
818ac3404c chore(release): v0.1.29 2024-09-27 12:25:40 -07:00
LGUG2Z
d6ae81af13 docs(mkdocs): generate latest cli docs 2024-09-26 20:22:37 -07:00
LGUG2Z
109227b74c feat(bar): add quickstart flag, remove yaml format
This commit adds a --quickstart flag to the komorebi-bar binary to
output an example komorebi.bar.json into the user's desired
configuration directory.

This is to avoid the case where running komorebic quickstart would
result in clobbering an existing komorebi.json file.

Additionally, if a user tries to run the bar for the first time without
a configuration file, the example configuration will be written to disk
for them.

Finally support for loading a komorebi.bar.yaml file has been removed
because I have no desire to support multiple configuration formats over
the long term.
2024-09-26 18:01:57 -07:00
LGUG2Z
ddb600f745 chore(deps): bump windows-rs from 0.57 to 0.58
Not a huge fan of these updates in the windows-rs crate which swap the
isize values which were previously wrapped in various handles with *mut
core::ffi:c_void pointers.

In order to at least keep this codebase sane, all of the wrapper
functions exposed in WindowsApi now take isize wherever they previously
took HWND, HMONITOR, HINSTANCE etc.

Going forward any pub fn in WindowsApi should prefer isize over Windows
handles which wrap c_void pointers.
2024-09-25 18:25:03 -07:00
LGUG2Z
167ec92811 chore(deps): bump windows-rs from 0.54 to 0.57
This is the highest we can go right now because this change which went
into 0.58 absolutely fucks our shit up:
https://github.com/microsoft/windows-rs/pull/3111
2024-09-25 08:58:13 -07:00
LGUG2Z
d110e12a62 docs(privacy): add privacy policy 2024-09-24 15:39:22 -07:00
LGUG2Z
21bd09e419 fix(wm): add layout edge index awareness
This commit builds on c3f135703e and
1080159e68 to add layout-specific edge
index awareness to all default layouts.

This is most useful for UltrawideVerticalStack and
RightMostVerticalStack, which have a lot of edge cases due to the
positioning of the 0th index changing with the number of containers on a
workspace.
2024-09-24 15:39:19 -07:00
LGUG2Z
01ccf70ad5 feat(bar): expand komorebi layout subwidget
This commit expands the komorebi layout subwidget to update the layout
indicator accordingly when the user switches to a floating workspace, or
when the window manager is paused.
2024-09-22 18:29:07 -07:00
LGUG2Z
c3f135703e fix(wm): cross-border focus direction awareness
This commit ensures that when focusing across a monitor boundary to the
left, the container at the back of the Ring<Container> in the target
workspace will be focused, and when focusing across a monitor boundary
to the right, the one at the front will be focused.
2024-09-22 18:29:07 -07:00
LGUG2Z
3720ce42d0 fix(bar): use truncated labels for titles
This commit introduces a new wrapper, CustomUi, which is used to
implement custom methods on top of eframe::egui::Ui.

The default ui::add_sized method always has the text in a label
centered, which is not desirable for a status bar where the layout
should be ltr.

A new function CustomUi::add_sized_left_to_right has been added to
ensure that labels can be truncated with a custom width (which requires
allocate_ui_with_layout), while also retaining the ability for the text
to be aligned to the left rather than the center of the allocated
layout.
2024-09-22 18:29:03 -07:00
LGUG2Z
1080159e68 fix(wm): cross-border move direction awareness
This commit ensures that when moving across a monitor boundary to the
left, a container will be added to the back of the Ring<Container> of
the target workspace, and when moving across a monitor boundary to the
right, that it will be added to the front.
2024-09-20 17:11:19 -07:00
LGUG2Z
360d0915a1 refactor(deps): unify versions across workspace pkgs 2024-09-19 21:33:03 -07:00
LGUG2Z
182c1e6a96 feat(bar): expand focused window subwidget
This commit ensures that the focused window komorebi subwidget is aware
of multi-window containers and displays an ordered list of windows in a
container stack which can be clicked to change focus in the stack.

When there are >1 windows in a stack, the title of the focused window
will take from komorebi.json's theme.stack_border if theme is defined
(falling back to the same default value in komorebi), or from
theme.accent in komorebi.bar.json, if defined.
2024-09-19 17:00:13 -07:00
LGUG2Z
14d2ebd756 feat(bar): add font size config opt 2024-09-18 18:06:45 -07:00
LGUG2Z
50b89cc1df chore(deps): cargo update 2024-09-18 15:18:32 -07:00
LGUG2Z
df409902bb refactor(bar): change panics to error logs
This commit goes through all komorebi_client calls which return a
Result<T> and replaces unwraps with error logs to avoid runtime panics.
2024-09-18 14:50:23 -07:00
LGUG2Z
df19d06333 feat(cli): generate json schemas locally
This commit updates the various komorebic json schema generation
commands to generate the schemas locally, without requiring a running
instance of komorebi to communicate with over IPC.
2024-09-18 10:59:25 -07:00
LGUG2Z
96d094d9d7 feat(cli): update enable-autostart cmd for bar 2024-09-18 10:49:00 -07:00
LGUG2Z
2916256e79 feat(wm): add replace configuration socket message
This commit introduces a new SocketMessage, ReplaceConfiguration, which
attempts to replace a running instance of WindowManager with another
created from a (presumably) different komorebi.json file.

This will likely be useful for people who have multiple different
monitor setups that they connect and disconnect from throughout the day,
but definitely needs more testing.

An experimental sub-widget which calls this SocketMessage has been added
to komorebi-bar to aid with initial testing.
2024-09-18 10:48:55 -07:00
LGUG2Z
21a2138330 docs(mkdocs): add komorebi-bar to getting started
This commit adds instructions for komorebi-bar to the Getting Started
section of the documentation website, adds an example komorebi.bar.json
configuration file, integrates that file with the quickstart command,
and updates the start and stop commands to take --bar flags similar to
the --whkd flags.

In updating the documentation I also decided to rename in the internal
tag for the KomobarTheme and KomorebiTheme enums to "palette" instead of
the previous generic "type" tag which was copied from the serde docs.
2024-09-17 18:56:12 -07:00
LGUG2Z
6addfed1ce fix(bar): read mouse follows focus from state 2024-09-17 18:09:00 -07:00
LGUG2Z
6ba0ba79f9 docs(license): fork polyform strict to explicitly allow changes 2024-09-17 17:55:44 -07:00
LGUG2Z
254fcc988f fix(bar): use custom windows-icons w/o panics
This commit uses a custom fork of windows-icons which removes runtime
panics and instead exposes a safe Option<T> based API.
2024-09-17 17:14:53 -07:00
LGUG2Z
7005a01d9c fix(wm): hot reload cross boundary behaviour changes 2024-09-16 08:13:25 -07:00
LGUG2Z
de3d4d0d99 feat(bar): hotloading for viewport inner_size
This commit adds hot reloading for changes made to viewport.inner_size
in the configuration file. I still don't understand how the scaling
works with egui, but at least for the time being there are some rough
heuristics I've thrown together.

The transformation of y still seems a little off, but the transformation
of x seems pretty accurate when dividing by native_pixels_per_point.
2024-09-15 13:27:50 -07:00
LGUG2Z
b69db863f1 feat(themes): update bar on komorebi.json reload
This commit ensures that whenever komorebi.json is updated, komorebi-bar
will try to apply whichever theme is set in that file by the user (if
one is set).

Similarly, if a theme is not set in komorebi.bar.json, komorebi-bar will
load the theme set in komorebi.json (if one is set).

A new configuration "bar_accent" has been added to the KomorebiTheme
struct to make this process as uniform as possible.
2024-09-15 10:34:37 -07:00
LGUG2Z
286bb0070c fix(bar): fmt battery percentage without decimals 2024-09-14 21:46:00 -07:00
LGUG2Z
45894be4ff feat(themes): add + integrate komorebi-themes lib
This commit abstracts the theme-related code from komorebi-bar into a
separate library which is now also consumed by komorebi.

The static configuration file for komorebi has been updated to allow
users to specify themes and provide palette overrides for various border
styles and stackbar configuration options.

In the event that both a theme and border-specific and/or
stackbar-specific colours have been specified, the theme will take
priority to make it as easy as possible for users who have already spent
time tweaking their colours to try out themes and quickly revert back if
they prefer their existing colours.

This change makes it easier for users to have unified themes between
komorebi and the komorebi status bar.
2024-09-14 16:31:39 -07:00
LGUG2Z
bc67936dd3 feat(bar): add komorebi-bar
This commit adds an initial version of the komorebi status bar.

At this point the bar is still considered "alpha" and the configuration
format may see some small breaking changes based on usage and feedback.

There is an accompanying video series which details the creation of this
bar on YouTube: https://www.youtube.com/watch?v=x2Z5-K05bHs

Some high level notes on the bar:

* An external application which exclusively consumes komorebi_client's
  public API surface - anyone can create this without hacking directly
  on komorebi's internals
* Generally a very simple bar with limited configuration options - users
  who want more configurability should use alternatives such as yasb or
  zebar
* Scope is deliberately limited to provide a tighter, more focused
  experience: Windows-only, komorebi-only, single-monitor-only,
  horizontal-only
* No support for custom widgets or templating
* Colours are controlled exclusively through themes which adhere to a
  palette framework such as Base16 or Catppuccin (and possibly others in
  the future)

This commit contains all of the commits listed:

e5fa03c33c
feat(bar): initial commit

b3990590f3
feat(bar): add config struct with basic opts

bc2f4a172e
feat(bar): handle komorebi restarts gracefully

ca6bf69ac7
feat(bar): add basic widget config opts

18358efed8
feat(bar): add interactive layout and media widgets

92bb9f680b
perf(bar): use explicit redraw and data refresh strategies

8e74e97706
feat(bar): add battery and network widgets

fdc7706d23
feat(bar): add custom font loader

025162769b
feat(bar): allow right side widget ordering

a1688691cf
feat(bar): add app icon next to focused window title

9f78739c3f
feat(bar): add komorebi widget (+config) and themes

a4ef85859e
feat(bar): use phosphor icons for uniformity

e99138a97e
feat(bar): add first pass at configuration loader

d6ccf4cf9a
feat(bar): add logging and config hotwatch

34d2431947
feat(bar): handle monocle containers in komorebi widget

7907dfeb79
feat(bar): add optional data refresh intervals to config

96a9cb320e
feat(bar): add flag to list system fonts

42b7a13693
feat(bar): add activity to network widget

ac38f52407
feat(bar): to_pretty_bytes on network activity

6803ffd741
feat(bar): configurable network activity fill char len

7d7a5d758d99808cd2b81da2b3ddbb11c52aa92f
ci(github): add bar to wix and goreleaser configs

da307e36fc1faf84ecca3f91811fdd15f70ef2ff
feat(bar): expand theme sources

c580ff7899889309dfa849ad4fb05b80b6af8d9b
feat(bar): add accent config for themes

bc4dabda4a941c0c9764fae2c8d11abbfdc0a9f5
feat(bar): add accents to widget emojis

a574837529dd6c5add73edf394c1c9c2e6cc6315
feat(bar): add to hard-coded float identifiers

ff41b552613f911e56b1790e68389525ee7e603c
chore(deps): bump base16-egui-themes
2024-09-14 14:19:15 -07:00
LGUG2Z
c06d9afa3b fix(wm): grow monitors vec to accomodate idx prefs
This commit fixes a bug in load_monitor_information which resulted in an
infinite while loop due to a misunderstanding of how VecDeque::reserve
works.
2024-08-27 16:21:59 -07:00
LGUG2Z
b799fd3077 feat(wm): add cross boundary behaviour options
This commit introduces a new configuration option,
cross_boundary_behaviour, which allows the user to decide if they want
Focus and Move operations to operate across Workspace or Monitor
boundaries.

The default behaviour in komorebi has always been Monitor.  Setting this
to Workspace will make komorebi act a little like PaperWM, where
"komorebic focus left" and "komorebic focus right" will switch to the
next or previous workspace respectively if the currently focused window
as at either the left or right monitor boundary.

resolve #959
2024-08-26 21:49:08 -07:00
thearturca
3c03528750 fix(animation): enable cross-monitor animations
This commit is a squashed combination of the following commits from #920
by @thearturca. Thanks to both @thearturca for @amnweb for their work in
fixing and thoroughly testing these changes respectively.

935079281a
fix(animation): added pending cancel count to track `is_cancelled` state

84ad947e1f
refactor(animation): remove cancel idx decreasing

804b0380f7
refactor(animation): remove `ANIMATION_TEMPORARILY_DISABLED` global vars

f25787393c
fix(animation): extend cancelling system to support multiple cancel call

dfd6e98e9c
refactor(window): reuse window rect in `animate_position` method

18522db902
fix(animations): change check for existings animation to `pending_cancel_count` field

Before it was checking `cancel_idx_counter` which is `id` counter. It
never gonna equals `0` and doesn't represent all animations that running
for that window. So it doesn't delete entry from hashmap.
That leads to bug when border and stackbar doesn't get notified after
animation ends.
2024-08-25 13:44:50 -07:00
LGUG2Z
821a124771 fix(wm): socket cleanup on exit
This commit ensures that Shutdown signals will be sent to subscriber
sockets and that "komorebi.sock" will be cleaned up on exit.

Alongside these changes, komorebi_client::send_message no longer retries
so that integrators can receive feedback via io::Result errors when
komorebi is not running.
2024-08-12 19:07:33 -07:00
LGUG2Z
8f7b9202b2 refactor(wm): reduce process_event log noise 2024-08-06 17:12:36 -07:00
LGUG2Z
13e2cbc7a1 fix(wm): exclude minimized hwnds from show event
This commit ensures that a WindowManagerEvent::Show will not be
triggered when a WinEvent::ObjectNameChange is received for an
application in the object_name_change_on_launch whitelist.

This notably impacts Firefox when the window title changes while the
application is minimized (for example, on a page with YouTube autoplay
enabled).

fix #941
2024-08-06 16:41:52 -07:00
LGUG2Z
ff653e78af fix(wm): mouse resize on right and bottom edges
Addresses a regression introduced somewhere along the way in changing
how borders and rects sizes are calculated. Need to come back and see if
the constant calculated with the mix of BORDER_WIDTH and BORDER_OFFSET
is still relevant anymore.

fix #942
2024-08-06 13:59:06 -07:00
npc203
6d038b8b18 fix(cli): correct cycle-layout prev/next seq 2024-08-06 13:03:10 -07:00
dependabot[bot]
45a5941872 chore(deps): bump regex from 1.10.5 to 1.10.6
Bumps [regex](https://github.com/rust-lang/regex) from 1.10.5 to 1.10.6.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.5...1.10.6)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 13:16:17 -07:00
dependabot[bot]
f54097f094 chore(deps): bump clap from 4.5.9 to 4.5.13
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.9 to 4.5.13.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.9...v4.5.13)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 13:16:03 -07:00
dependabot[bot]
29b14f8dc8 chore(deps): bump dunce from 1.0.4 to 1.0.5
Bumps [dunce](https://gitlab.com/kornelski/dunce) from 1.0.4 to 1.0.5.
- [Commits](https://gitlab.com/kornelski/dunce/compare/v1.0.4...v1.0.5)

---
updated-dependencies:
- dependency-name: dunce
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 13:15:51 -07:00
dependabot[bot]
a1cf5ba29c chore(deps): bump which from 6.0.1 to 6.0.2
Bumps [which](https://github.com/harryfei/which-rs) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/harryfei/which-rs/releases)
- [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/harryfei/which-rs/compare/6.0.1...6.0.2)

---
updated-dependencies:
- dependency-name: which
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 13:15:43 -07:00
dependabot[bot]
a60e5a77c2 chore(deps): bump serde_json from 1.0.120 to 1.0.122
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.120 to 1.0.122.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.120...v1.0.122)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-05 13:15:32 -07:00
LGUG2Z
f722905be1 feat(cli): add focus-stack-window cmd
This commit adds a new command, focus-stack-window, which allows users
to focus windows in the focused container stack by their index
(zero-indexed) within the stack.

If the user tries to focus an index which does not correspond to a
window within the container stack, an error will be logged.
2024-08-02 12:26:05 -07:00
LGUG2Z
b5eafc6b96 fix(borders): maximize compat w/ komorebi impl
This commit ensures that the "Komorebi" border implementation is set as
the default as it has the maximum range of compat across different
Windows versions, whereas the "Windows" implementation requires Win 11.

Because "Windows" implementation methods will error on Windows 10,
restore_all_windows has been updated to only attempt to remove accents
if BorderImplementation::Windows is selected (this is gated behind the
WINDOWS_11 check).

re #925
2024-07-26 16:00:17 -07:00
LGUG2Z
c367967301 fix(wm): apply window based offsets to monocles
This commit ensures that when a window_based_work_area_offset is set,
and the window limit is greater than 0, the offset will be applied to
monocle containers on a workspace (unless an override is specified for
that workspace).
2024-07-24 10:46:57 -07:00
LGUG2Z
780635c8ef fix(transparency): handle multi-monitor monocles
This commit ensures that transparency will be set accordingly when focus
moves to and from monocle containers on multi-monitor setups.
2024-07-24 10:38:10 -07:00
dependabot[bot]
d5bec7afa4 chore(deps): bump openssl from 0.10.64 to 0.10.66
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.64 to 0.10.66.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.64...openssl-v0.10.66)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-22 11:18:39 -07:00
dependabot[bot]
974aa0d000 chore(deps): bump thiserror from 1.0.62 to 1.0.63
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.62 to 1.0.63.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.62...1.0.63)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-22 09:30:16 -07:00
LGUG2Z
0f9c23b6f4 feat(cli): add toggle-transparency cmd 2024-07-17 17:25:22 -07:00
LGUG2Z
6ea71834a1 fix(animation): disable on cross-monitor drag
This commit adds an edge case missed in
50a279239a.
2024-07-15 17:30:30 -07:00
LGUG2Z
81451cb17a refactor(client): use public interface exclusively
This commit demotes the komorebi-core crate to a module (core) inside of
the komorebi lib, resulting in the komorebi-client crate lib becoming
the single public interface for programming in Rust against komorebi.

komorebic and komorebi-gui now consume komorebi-client exclusively as
the means for sending and receiving messages to and from komorebi, so
that anyone wishing to integrate with komorebi will have all of the same
functionality to them as I do.
2024-07-15 17:11:35 -07:00
LGUG2Z
7653495e31 chore(dev): begin v0.1.29-dev 2024-07-15 17:11:35 -07:00
LGUG2Z
0cdce8fc2a chore(release): v0.1.28 2024-07-15 08:59:42 -07:00
LGUG2Z
67f14730d0 ci(github): rm nightly tag before running kokai 2024-07-15 08:58:38 -07:00
LGUG2Z
ef9e734680 fix(wm): handle "rdpudd chained dd" edge case
This commit builds on these changes in win32-display-data:
32a45cebf1p

With the addition of lenient fallbacks when looking up display device
information for "RDPUDD Chained DD" virtual display adapters, komorebi
will now set Monitor.device and Monitor.device_id to "UNKNOWN" as this
virtual mirror display driver will never have a reported DeviceID.

This limitation for "RDPUDD Chained DD" devices is also noted in a
Chromium issue: https://codereview.chromium.org/2557513005/

fix #883
2024-07-13 21:37:59 -07:00
LGUG2Z
faa7786979 docs(mkdocs): add updates for v0.1.28 features 2024-07-13 16:12:35 -07:00
LGUG2Z
3c8a6cb7bd chore(deps): bump win32-display-data 2024-07-13 16:12:34 -07:00
LGUG2Z
50a279239a fix(animation): disable on cross-monitor ops
There are quite a lot of janky animation bugs when moving window
containers across monitor and workspace boundaries.

This commit disables animation on all of the main cross-border window
container operations, meaning that animations should now only happen
within the context of a single workspace.

fix #912
2024-07-12 09:21:50 -07:00
LGUG2Z
2c8f25ef82 fix(animation): add async focus manager for mff
This commit adds a new focus manager module to be used to trigger async
focus changes with mouse follows focus updates. Currently this should
only need to be used with animations as all other focus calls are
synchronous.

fix #910
2024-07-11 18:29:46 -07:00
LGUG2Z
bdc1cad597 feat(config): add "color-hex" format to jsonschema
This commit specifies "color-hex" as the "format" when implementing
JsonSchema for Hex.

resolve #911
2024-07-11 15:20:20 -07:00
LGUG2Z
e2f2d6b919 feat(animation): add window animations
Work on this feature was first started by @thearturca in November 2023
before komorebi v0.1.21 in #597 and has undergone numerous revisions
to reach the point of this commit.

Although this is a single squashed commit, almost all of the heavy
lifting for this feature was done by @thearturca, which is where all of
the kudos and gratitude should be directed.

This commit adds a new static configuration block for animations, where
they can be enabled, and have their style, fps and duration set.
Corresponding SocketMessages and komorebic cli commands have also been
exposed.

There are some caveats to the use of this feature, which revolve around
the quality of the Windows compositor (it is not very good):

* There will be visual artifacts with various apps when animations are
  taking place - komorebi can't do anything about this as it is a
  limitation of the Windows compositor
* Since komorebi's borders are implemented as independent windows are
  are not a part of the windows they are drawn around, these borders
  will be hidden while animations are in progress
* If you wish to use borders with this feature, you'll probably better
  off using BorderImplementation::Windows, which uses the native thin
  "accent" borders, which are part of the windows they are drawn around,
  and can be moved with those windows during animations

As a result of these and other caveats, this feature will be marked as
"experimental" for the foreseeable future and will be off-by-default.

Below, a number of now-squashed commits that contributed to the
stabilization of this feature are referenced to help with code
archeology in the future.

fix(animation): Fixed cancelling logic
(57e9b2f4bcaedb4fdfa71adf785d661690d81dfc)

Added static animation state manager for tracking "in_progress" and
"is_cancelled" states. The idea is not to have states in Animation
struct but to keep them in HashMap<hwnd, AnimationState> behind
reference (Arc<Mutex<>>). So we each animation frame we have access to
state and can cancel animation if we have to.

Need review and testings

refactor(animation): avoid unwrap
(fa6d5bbc77c1882f85ee1ce73733ff7e53b39eaa)

fix(animation): Move cancel call to Animation struct
(306513f5dbe5f6bd6ce817f3edca0bfda13d9442)

Only focused window was cancelling its animation because we call cancel
in window::set_position and waiting for its cancelling. And because we
waiting for cancelling second window is still moving. Second window will stop
moving only after the first window. So I moved `cancel` call to
Animation struct so its happening in its own thread and doesn't block
others animation moves and cancels.

refactor(animation): renamed args parameters and variables names
(8abb4b9618bbb3823b868fc37551f0a70b98281e)

refactor(animation): inverse if-statement in `window::animate_position`
(3de2c6e932614651892da4a8c626946e427375dd)

There is was a bug when ease function generates `t` greater the
`SetWindowPos` function will be called instead of `move_window`.
`SetWindowPos` is only for last frame of animation.

fix(wm): add shadow rect to `move_window` calls
(b58620fb4de36d8e422a80541bedf9c1c1579a31)

This fixes a bug when windows get shunk during the animation
2024-07-10 13:28:31 -07:00
LGUG2Z
aebe8792ac fix(config): add runtime ws rules on generation
This commit ensures that one-off workspace rules added at runtime via
komorebic or generally via SocketMessages will be added to the output of
the generate-static-config command.
2024-07-10 11:27:57 -07:00
LGUG2Z
9fb6f8ebcd feat(stackbar): allow custom font family and size config
This commit introduces two new static configuration options under stackbar.tabs, font_size and
font_family.

re #909 #885
2024-07-10 10:19:14 -07:00
LGUG2Z
6eb6129618 feat(cli): add cmds to clear workspace rules
This commit adds three new commands, clear-workspace-rules,
clear-named-workspace-rules and clear-all-workspace-rules, to allow
users to remove workspace rules at runtime.

These commands do not distinguish between initial or persistent
workspace rules. If there is a clear use case for this distinction, this
decision can be revisited at a later date.

resolve #908
2024-07-09 15:06:16 -07:00
dependabot[bot]
5b997b6ea6 chore(deps): bump eframe from 0.27.2 to 0.28.1
Bumps [eframe](https://github.com/emilk/egui) from 0.27.2 to 0.28.1.
- [Release notes](https://github.com/emilk/egui/releases)
- [Changelog](https://github.com/emilk/egui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/emilk/egui/compare/0.27.2...0.28.1)

---
updated-dependencies:
- dependency-name: eframe
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-08 19:27:30 -07:00
LGUG2Z
9414466646 fix(borders): gate windows impl behind win11 check 2024-07-08 17:26:36 -07:00
dependabot[bot]
9e87baa8b8 chore(deps): bump serde from 1.0.203 to 1.0.204
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.203 to 1.0.204.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.203...v1.0.204)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-08 08:20:19 -07:00
LGUG2Z
2a67c9c786 feat(cli): add detailed version info w/ shadow 2024-07-05 10:52:16 -07:00
LGUG2Z
60bc96e9a5 feat(wm): add min height/width options
This commit adds two new fields, minimum_window_height and
minimum_window_width, to the static configuration file.

These options should be considered quite broad and heavy-handed for now
and avoided if at all possible.

These options are an escape hatch for buggy applications such as Windows
Teams which do not give application windows and child windows unique
names or classes.

Ultimately users should push for buggy applications to be fixed upstream
and respect the usual Microsoft Windows application development
guidelines.

Further support will most likely not be provided for these two
configuration options because it's not my job or my responsibility to
compensate for multi million, billion and trillion dollar companies who
can't follow basic application development guidelines.

resolve #896
2024-07-05 10:52:16 -07:00
LGUG2Z
5e9d573f0b ci(github): add nightly releases on master 2024-07-05 10:52:15 -07:00
LGUG2Z
128db85054 feat(wm): add window based work area offset overrides
This commit adds an override option
"apply_window_based_work_area_offset" to the Workspace configuration
object in the static config.

This option defaults to true to preserve existing behaviour, and can be
set to false for workspaces where the monitor-level offset changes are
undesirable.
2024-07-04 11:52:53 -07:00
LGUG2Z
cc7dbde049 feat(config): soft deprecate window_hiding_behaviour variants
This commit adds a soft-deprecation message for the Hide and Minimize
variants of WindowHidingBehaviour to start bringing all users towards
using the Cloak variant.

resolve #897
2024-07-04 11:36:31 -07:00
dependabot[bot]
a5735c4186 chore(deps): bump bitflags from 2.5.0 to 2.6.0
Bumps [bitflags](https://github.com/bitflags/bitflags) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/2.5.0...2.6.0)

---
updated-dependencies:
- dependency-name: bitflags
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 20:02:22 -07:00
dependabot[bot]
48cb3db2fe chore(deps): bump serde_json from 1.0.117 to 1.0.119
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.117 to 1.0.119.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.117...v1.0.119)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 20:01:42 -07:00
dependabot[bot]
24bff7e527 chore(deps): bump clap from 4.5.7 to 4.5.8
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.7 to 4.5.8.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.7...v4.5.8)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 20:00:59 -07:00
LGUG2Z
b985659e30 feat(wm): dynamic lookup for container behaviour
This commit adds a dynamic lookup method for the
window_container_behaviour configuration option.  Previously if the
behaviour was set to Append, and the workspace did not have any
containers, an error would be logged.

Now, in the same situation, the behaviour will be dynamically switched
to Create when there are no containers on a workspace, and subsequent
windows will be handled with the Append behaviour if set.

This commit also makes some tweaks to ensure that when a windows in a
container stack are closed, the container itself will remain focused if
it has at least one remaining window.

resolve #889
2024-06-26 11:45:49 -07:00
LGUG2Z
1d0ac9b555 fix(wm): hide non-focused windows in containers
This commit ensures that every non-focused index in a Ring<Window> will
be hidden when a new window is added and focused via
Container::add_window, which typically happens when
WindowContainerBehaviour::Append is enabled and a new window is opened.

re #889
2024-06-25 14:40:33 -07:00
جاد
7b1ece9680 docs(readme): add new demonstration video 2024-06-24 16:01:03 -07:00
LGUG2Z
00fc5382f6 fix(borders): remove monocle accents on shutdown 2024-06-23 15:13:24 -07:00
LGUG2Z
9e37baa88a feat(borders): add windows accent implementation
This commit adds the ability for users to select between komorebi's
implementation of borders with variable widths and the native Windows 11
implementation of thin "accent" borders.

The new border_implementation configuration option defaults to
BorderImplementation::Komorebi in order to preserve compat with existing
user configurations.

This option will be most useful for people who prefer ultra-thin
borders, and people who want borders to be animated along with
application windows if they are using the animation feature being worked
on in PR #685.
2024-06-20 20:31:18 -07:00
LGUG2Z
9a65a4ae92 chore(dev): begin v0.1.28-dev 2024-06-20 20:26:07 -07:00
LGUG2Z
a511cbd263 chore(release): v0.1.27 2024-06-19 14:52:54 -07:00
LGUG2Z
83cc7bf7c0 fix(wm): ensure window msg threads are stopped
This commit ensures that message handling threads for windows that are
created by komorebi are exited properly when the windows are destroyed.

For some reason, passing the HWND returned by CreateWindowExW to
GetMessageW continues returning TRUE even after the window has been
destroyed.

If HWND::NULL (via the Default trait) is passed to GetMessageW, which
retrieves messages for any window belonging to the current thread (our
threads here only own a single window), GetMessageW returns FALSE as
expected after the window is destroyed.

re #862
2024-06-19 14:13:55 -07:00
LGUG2Z
8bf4ab9f15 fix(wm): remove blocking channel send calls
This commit is the result of a long investigation with @berknam on
Discord which uncovered that when the channels used by the *_manager
modules are full, the window manager can enter a completely locked state
which will require a hard restart of komorebi.exe.

In order to avoid entering this locked state, *_manager modules now no
longer publicly expose event_tx for sending notifications.

Instead, a new public fn send_notification is exposed which will use
try_send to attempt to send notifications in a non-blocking manner and
log warnings if the channel is full and the notification is dropped.
2024-06-19 10:12:55 -07:00
LGUG2Z
31864b1570 fix(ffm): follow focus across monitor boundaries
This commit ensures that when the komorebi focus follows mouse
implementation is enabled, the focus will follow the mouse across
monitor bounadries.
2024-06-17 20:09:52 -07:00
LGUG2Z
c022438a37 perf(wm): increase channel bounds 5 -> 20
This commit increases various channel bounds from 5 to 20 since it was
discovered that this reduction had no impact on #862, and some
crashes/freezes have been noted due to the channel bounds of 5 being too
low.
2024-06-12 08:35:51 -07:00
LGUG2Z
3d518f73ca perf(borders): selectively invalidate border rects
This commit ensures that we only invalidate a border rect to send a
WM_PAINT message either when the position of the focus state of the
border has changed.

re #862
2024-06-12 08:16:34 -07:00
LGUG2Z
d2d6484e38 fix(borders): always validate border client area
This commit pushes up the calls to BeginPaint and EndPaint in the border
callback function to ensure that the client area of the border rect is
always validated after calls to InvalidateRect from the update fn.

The callback now also logs errors whenever it is not possible to get the
border rect to operate on for any reason.

There was a call at the end of this logic to ValidateRect which has been
removed as the validation is already handled by the call to BeginPaint.

re #862
2024-06-12 08:05:58 -07:00
LGUG2Z
67a3c3546f refactor(wm): use saturating_sub for idx-1 updates
This commit ensures that we use the saturating_sub function uniformly
when decrementing usize values by 1.
2024-06-10 14:51:53 -07:00
dependabot[bot]
888b674646 chore(deps): bump parking_lot from 0.12.2 to 0.12.3
Bumps [parking_lot](https://github.com/Amanieu/parking_lot) from 0.12.2 to 0.12.3.
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/parking_lot/compare/0.12.2...0.12.3)

---
updated-dependencies:
- dependency-name: parking_lot
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-10 09:33:31 -07:00
dependabot[bot]
5abab46290 chore(deps): bump regex from 1.10.4 to 1.10.5
Bumps [regex](https://github.com/rust-lang/regex) from 1.10.4 to 1.10.5.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.4...1.10.5)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-10 09:32:23 -07:00
dependabot[bot]
ad8375eebe chore(deps): bump clap from 4.5.4 to 4.5.7
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.4 to 4.5.7.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.4...v4.5.7)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-10 09:32:05 -07:00
LGUG2Z
a11da2167c fix(borders): handle snapshot edge cases
This commit handles three subtle edge cases which surfaced after adding
state snapshot comparisons to the border manager module.

1) Update borders when windows are dragged
2) Update borders on pause and unpause
3) Redraw borders on retile

These two edge cases do not change the snapshot state but still require
updates to be made to the borders.
2024-06-09 12:51:59 -07:00
LGUG2Z
6b9a0843fd perf(borders): introduce state snapshot checks
This commit introduce state snapshot checks in the border manager, which
will ensure that we don't even attempt to acquire any mutex locks if the
state hasn't changed.
2024-06-09 07:17:13 -07:00
LGUG2Z
41732e2f5f perf(borders): reduce mutex usage in hot path 2024-06-09 07:17:11 -07:00
LGUG2Z
9a58c1ee42 perf(wm): use bounded channels 2024-06-09 07:17:08 -07:00
LGUG2Z
edc87d9940 fix(wm): restart cmd listener thread on panic
This commit ensures that in the event of a panic (we still have quite a
few that occur sporadically that are still being tracked down), the
listen_for_commands thread in process_command is restarted, similarly to
the recently added border, stackbar and transparency manager threads.

In order to do this without blocking the process startup sequence,
listen_for_commands spawns an outer thread which begins a loop in which
the actual command listener thread is started.

We call .join() on the handle of this inner thread, and log an error
whenever that inner thread terminates, as it should never terminate
unless there is a panic.

If the inner thread is terminated due to a panic, the outer loop will
start another thread to ensure that user commands continue being
processed.

One thing to note is that panics may lead to an inconsistent wm state
and undefined behaviour which will seem "new", as previously these
panics required a total restart of komorebi and any inconsistent states
would be masked.
2024-06-04 17:29:17 -07:00
LGUG2Z
133311bbe2 refactor(wm): use from trait to construct windows 2024-06-04 15:54:33 -07:00
LGUG2Z
280aebf15d fix(wm): ensure moves to floating workspaces
This commit ensures that windows moved to a floating workspace on a
different monitor will have their positions updated accordingly for the
target monitor. Since floating layouts have no layout algorithm applied,
the moved window will be centered in the work_area of the target monitor
in the target workspace.

fix #865
2024-06-04 15:54:28 -07:00
LGUG2Z
a488890a04 fix(transparency): handle stackbar tab clicks
This commit ensures that stackbar clicks will be handled properly by the
transparency manager by creating an override to process events for
windows which may not be at the top of the stack and may have previously
been made transparent before they were hidden.

fix #864
2024-06-03 17:44:11 -07:00
LGUG2Z
9a0ee8e8dd fix(cli): make quickstart respect whkd config dir
This commit ensures that the quickstart command will write the sample
whkdrc file to WHKD_CONFIG_HOME if it is set.

fix #861
2024-06-02 09:00:11 -07:00
LGUG2Z
f23510055a fix(cli): make quickstart config home-aware
This commit makes the quickstart command aware of the
KOMOREBI_CONFIG_HOME environment variable. If this is set by the user,
references to Env:USERPROFILE will be replaced with
Env:KOMOREBI_CONFIG_HOME.

fix #861
2024-06-02 08:56:22 -07:00
LGUG2Z
a5fb5527c6 fix(transparency): log and don't propagate errors
This commit introduces a small refactor to the transparency manager
module to log instead of propagating errors which may cause infinite
thread restarts and memory ballooning in KNOWN_HWNDS if applications
such as Visual Studio do not conform to the Win32 guidelines for setting
and removing Extended Window Styles.

re #863
2024-06-02 08:41:21 -07:00
Nire Bryce
3f6e19b8b4 docs(mkdocs) add display index preferences section 2024-06-01 17:01:02 -07:00
LGUG2Z
aa24c41967 fix(cli): add monitor-information command
This commit adds a new monitor-information command to make it easier for
people to find the values they need to use the display_index_preferences
configuration option.

re #860
2024-06-01 16:48:30 -07:00
LGUG2Z
1320b7440e fix(cli): use utc for log timestamps 2024-05-31 11:51:35 -07:00
LGUG2Z
cad2eb9a63 feat(transparency): add transparency manager module
This commit adds the transparency manager module, which, when enabled,
will make unfocused windows transparent using a user-configurable alpha
value between 0-255.

The corresponding komorebic commands (transparency, transparency-alpha)
have been added, as well as the corresponding static configuration
values (transparency, transparency_alpha).

This feature is off-by-default and must be explicitly enabled by the user.

If the process is not shut down cleanly via the 'komorebic stop'
command, it is possible that the user will be left with transparent
windows which will not be managed by komorebi the next time it launches.

This is because the WS_EX_LAYERED style is required for transparency,
but is ignored by default in komorebi's window eligibility heuristics.
For this reason, a separate state tracker of windows that have had this
style added by the window manager is kept in the transparency manager
module.

For this edge case of shutdowns where the cleanup logic cannot be run,
the 'komorebic restore-windows' command has been updated to remove
transparency from all windows that were known to the window manager
during the last session before it was killed.

This must be run _before_ restarting komorebi, so that the previous
session's known window data is not overwritten.

In the worst case scenario that the previous session's data is
overwritten, the user will have to either kill and restart the
applications, or compile komorebi from source and explicitly set
"allow_layered" to "true" in the window_is_eligible function, before
setting the transparency alpha to 255 (fully opaque), and then resetting
to the desired value.
2024-05-31 09:54:16 -07:00
dependabot[bot]
b7a987be8f chore(deps): bump serde from 1.0.202 to 1.0.203
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.202 to 1.0.203.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.202...v1.0.203)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-30 21:41:05 -07:00
LGUG2Z
e8f6a66bed fix(wm): valid directions all require count > 1
This is a mixture of refactoring and a fix, updating the
Direction::is_valid_direction trait impl for Default layout to return
early with false if the count is < 2.

fix #851
2024-05-30 15:42:10 -07:00
Bartosz Trusiński
fd97c7230d docs(mkdocs) fix typos for installation docs 2024-05-30 08:47:31 -07:00
Karat
cc60f55cec chore(cargo): isolate parking_lot features
In the case when the `komorebi-client` is used in one project with some
dependency that is transitively used crate `parking_lot` with feature
`send_guard`, a compilation error occurs because `komorebi-client`
transitively importing `parking_lot` with feature `deadlock_detection`
and these features are mutually exclusive.

This fix suggests enabling `deadlock_detection` feature in `parking_lot`
crate only if `deadlock_detection` enabled for `komorebi` crate, by
default it is disabled so it will solve issue with `komorebi-client`
2024-05-30 08:37:08 -07:00
LGUG2Z
270374497c fix(cli): respect named ws send behaviour
This commit ensures that the "send" behaviour is respected in
named-workspace command variants such as send-to-named-workspace.
2024-05-30 08:26:10 -07:00
LGUG2Z
6c90001c00 fix(stackbar): destroy hpen, hbrush + hfont objs
This commit ensures that HPEN, HBRUSH and HFONT objects which are used
to draw stackbar tabs are explicitly destroyed with calls to
DeleteObject after ReleaseDC has been called.

re #855
2024-05-28 17:41:19 -07:00
LGUG2Z
3232d9242a fix(borders): destroy hpen and hbrush objects
This commit ensures that HPEN and HBRUSH objects created to draw window
borders are explicitly destroyed with calls to DeleteObject after
EndPaint has been called.

re #855
2024-05-28 17:35:07 -07:00
LGUG2Z
e57b08d073 feat(wm): unset unknown bits when using bitflags
This commit switches to using the bitflags from_bits_truncate fn to
handle applications like Foxit Reader which use garbage bits that aren't
part of the Window Styles or Extended Window Styles Win32 specs.

Any unknown bits that are not in the Win32 specs will be unset when this
function is run.
2024-05-28 17:22:48 -07:00
LGUG2Z
cfb0c7f2ce feat(wm): allow stack expansion in direction
This commit allows for the user to expand container stacks while focused
on an an existing (len > 1) container stack by using the stack command
with a desired direction.

resolve #847
2024-05-25 20:34:59 -07:00
LGUG2Z
5cff90a62b fix(wm): reap monocle and maximized windows
This commit updates the orphan reaper to also reap orphan windows in the
monocle container and any tracked maximized windows that no longer
exist.
2024-05-24 15:07:37 -07:00
LGUG2Z
da7a9394d8 fix(wm): detect both physical and virtual monitors
This commit addresses a regression in v0.1.26 that was introduced by the
win32-display-data crate, where virtual monitors would not be detected
in scans by the wm.

The actual fix has been made upstream in win32-display-data:

2a0f7166da

fix #846
2024-05-24 13:21:20 -07:00
LGUG2Z
88684f991f feat(cli): add stack-all and unstack-all cmds
This commit adds two new commands, stack-all, which puts all windows in
the focused workspace into a single stack, and unstack-all, which
unstacks all windows in the currently focused container.
2024-05-24 11:13:35 -07:00
LGUG2Z
03fdbea5cd refactor(ahk): remove derive-ahk and references
This commit finally sunsets the derive-ahk proc macro and the
ahk-library cli command.

There is now a dedicated, stripped down komorebi.ahk example on the docs
website which mirrors the contents and style of the sample whkdrc:
https://lgug2z.github.io/komorebi/common-workflows/autohotkey.html
2024-05-23 22:57:27 -07:00
LGUG2Z
340c137342 fix(wm): dynamically reserve monitor ring space
This commit makes a small change to dynamically keep reserving space in
the VecDeque that backs Ring<Monitor> until an index preference can be
contained within the current length.

This commit also fixes some clippy lints and adds some allow
annotations.
2024-05-23 19:00:46 -07:00
LGUG2Z
e46a0757e3 chore(dev): begin v0.1.27-dev 2024-05-23 16:53:57 -07:00
LGUG2Z
3556f38469 chore(release): v0.1.26 2024-05-22 15:36:20 -07:00
LGUG2Z
62770033f2 fix(wm): make close + min op on foreground hwnd
This commit changes the handlers for the Close and Minimize
SocketMessages to operate on the output of
WindowsApi::foreground_window, without checking the window manager state
as it was doing previously.

This will allow the commands to operate on any kind of managed or
unmanaged window, and the appropriate WinEvent will be emitted by the
closed window for the window manager state to be updated when the
WinEvent goes through process_event.

fix #839
2024-05-22 15:33:03 -07:00
LGUG2Z
e294dbbe93 feat(cli): rename and deprecation feedback
This commit adds feedback about renamed and deprecated configuration
options in a user's komorebi.json file when the 'start' command is run.
2024-05-22 12:26:11 -07:00
LGUG2Z
47f0ab1ef3 feat(wm): handle OBJECT_NAMECHANGE for all apps
This commit ensures that EVENT_OBJECT_NAMECHANGE is handled for all
windows.

Previously this was mapped to WindowManagerEvent::Show, as this is the
event that apps like Firefox and JetBrains IDEs sent on launch instead
of EVENT_OBJECT_SHOW like normal apps.

Now that we are using EVENT_OBJECT_NAMECHANGE to update titles on
stackbar tabs, when a window which is not in the whitelist of
object_name_change_applications sends this event, it will be handled by
the new WindowManagerEvent::TitleUpdate variant.

This ensures that a stackbar_manager::Notification is sent at the end of
process_event to update stackbar tabs when application titles are
changing.

resolve #842
2024-05-22 11:37:49 -07:00
LGUG2Z
c4d62fc4f6 feat(wm): run orphan reaper in a dedicated thread
Until now the orphan window/container reaper has always run on every
WinEvent. Unfortunately Windows Terminal does not sent a WinEvent when
it is closed.

This is a problem for the new border_manager module which draws and
destroys borders based on notifications sent to it after WinEvents and
SocketMessages have been processed.

Since Windows Terminal is not sending a WinEvent on close, this means
that user interaction is required to remove the ghost border that gets
left behind.

This commit starts a separate thread for the reaper where it runs once
every second in a loop.

This is quite wasteful and definitely not something I wanted to
implement, but a temporary solution is needed given the popularity of
the buggy application in question.

An issue on the Windows Terminal tracker has been opened here:
https://github.com/microsoft/terminal/issues/17298
2024-05-21 19:27:58 -07:00
LGUG2Z
69680b4238 fix(stackbar): destroy stackbars on ws change
This commit ensures that whenever we receive a
stackbar_manager::Notification any stackbars not associated with the
current workspace on each monitor are destroyed.

fix #838
2024-05-21 08:23:05 -07:00
LGUG2Z
0dc17e9cb3 fix(wm): restore containers when closing monocle
This commit fixes a regression introduced by hiding other containers
when monocle is enabled. When the monocle container is closed, other
containers on the workspace will now be restored.

re #834
2024-05-20 08:24:55 -07:00
LGUG2Z
0f44efaa82 docs(wm): add komorebi-gui binary, update mkdocs 2024-05-19 16:37:35 -07:00
LGUG2Z
05af7ce16a feat(gui): add the komorebi-gui debug tool
This commit adds the komorebi-gui debug tool build with egui and eframe.

This tool was built from scratch in a YouTube mini-series which can be
found here: https://www.youtube.com/watch?v=zZKjBMt4kZ4

The most interesting part of this tool right now is the ability to view
debug information about each window as it goes through the rules engine.

While it's possible to change runtime configuration options with this
tool, it is not yet possible to write those changes out to the
configuration file.
2024-05-19 14:27:18 -07:00
LGUG2Z
92447723d2 fix(wm): respect horizontal focus from monocle
This commit ensures that horizontal focus moves onto other monitors from
a monocle container are respected (ie. we don't try moving left/right
within the workspace on the focused monitor).

Additionally, if the user tries to alt-tab a window to the foreground on
a workspace where a monocle container exists, the window will flash
before being hidden behind the monocle container as a visual cue that
monocle mode needs to be disabled to access that window.

This is in contrast to the current behaviour where that window floats on
top of the monocle container in a somewhat broken state.

re #834
2024-05-19 12:45:35 -07:00
LGUG2Z
2a45f981e6 feat(stackbar): add stackbar manager module
This commit removes all stackbar-related code from Container, Workspace,
process_command, process_event etc. and centralizes it in the new
stackbar_manager module.

Instead of trying to figure out where in process_event and
process_command we should make stackbar-related changes, a notification
gets sent to a channel that stackbar_manager listens to whenever an
event or command has finished processing.

The stackbar_manager listener, upon receiving a notification, acquires a
lock on the WindowManager instance and updates stackbars for the focused
workspace on every monitor; this allows us to centralize all edge case
handling within the stackbar_manager listener's loop.

Global state related to stackbars has also been moved into the
stackbar_manager module, which also tracks the state of stackbar objects
(STACKBAR_STATE), mappings between stackbars and containers
(STACKBARS_CONTAINERS) and the mappings between stackbars and monitors
(STACKBARS_MONITORS).

A number of edge cases around stackbar behaviour have been addressed in
this commit (re #832), and stackbars now respect the "border_style"
configuration option.
2024-05-19 10:55:40 -07:00
LGUG2Z
a29ab4cfb3 feat(wm): add monitor reconciliator module
This commit adds the monitor_reconciliator module which uses a tightly
bounded channel (cap: 1) to handle monitor connection and disconnection
events, as well as resolution and work area change events.

Before, all this logic lived in a the WindowManager.reconcile_monitors
function, which ran on pretty much every process_event iteration, and
sometimes led to undesirable behaviour, but now the logic is split up to
only run when the appropriate notifications are dispatched from the
hidden window which listens for monitor and display-related events.

The monitor cache has been moved out of WindowManager and into the
monitor_reconciliator module, and in addition to the previous behaviour
of attempting to cache monitors which had been identified as
disconnected, now when the static configuration file is loaded, if the
user has set display_index_preferences, the device IDs will be used to
pre-populate the cache for the event where a known monitor is connected
later in a session.

The monitor cache itself now uses the unique device ID as a key rather
than the hmonitor which is known to be inconsistent.

This commit also delegates all display monitor-related Win32 calls to
the "win32-display-data" crate, which was extracted from the larger
"brightness" crate for its use in komorebi.

As a result of these changes, "device" and "device_id" on Monitor have
been changed from Option<String> to String types, as failures in
retrieving these values with directly attached monitors has not been
possible to reproduce. However, it remains to be seen if this will
adversely impact users who use display docks which may prevent display
monitor device IDs from being read and stored by the operating system.

WindowManagerEvent::DisplayChange has been removed in favour of
the monitor_reconciliator::Notification enum, as these events are no
longer being handled in process_events.

Attempts are now made to eagerly update hmonitors both within the
monitor_reconciliator loop on DisplayConnectionChange notifications and
when failing to find a matching hmonitor in functions like
monitor_idx_from_current_pos and monitor_idx_from_window.
2024-05-19 06:26:45 -07:00
LGUG2Z
27cd1736aa fix(wm): smooth transitions to monocle workspaces
This commit adds hiding and restoring of other containers on a workspace
with monocle on/off, and exits early when a monocle container is found
on workspace restores to avoid flashing of other containers before the
workspace focus operation completes.

Focus is also restored when focusing a monocle container on another
monitor as part of a cross-monitor focus operation.

The border rendering for monocle containers has also been tightened up.

re #819
2024-05-18 09:53:10 -07:00
LGUG2Z
d2470b1f08 fix(cli): have log command lookup file w/ timestamp 2024-05-17 16:18:21 -07:00
LGUG2Z
835472d739 fix(wm): address monocle mode visual artifacts
This commit addresses two visual artifacts with monocle mode:

* Flashing of background windows when switching to a monocle container
  on another monitor is now gone
* Stackbars are automatically disabled whenever a container enters
  monocle mode

re #819
2024-05-17 15:54:40 -07:00
LGUG2Z
bceb28de37 fix(wm): various monocle container regressions
This commit fixes a number of monocle container-related regressions.

* Monocle container on one monitor preventing border updates on another
* Cross-monitor focus changes towards a monitor w/ a monocle container
* Cross-monitor move towards a monitor w/ a monocle container

re #819
2024-05-17 08:42:56 -07:00
LGUG2Z
fff7b5c147 feat(stackbar): update title labels in realtime
This commit handles the EVENT_OBJECT_NAMECHANGE WinEvent which is
emitted when window titles change to update Stackbar labels in real-time
when StackbarLabel::Title is used.

re #826
2024-05-16 16:23:09 -07:00
LGUG2Z
1e63947ae3 fix(wm): uw-vertical-stack stacking regression
This commit fixes a small regression that was introduced with the
addition of the Grid layout, where stacking right from index 0 on the
UltrawideVerticalStack layout would actually end up stacking to the
left.
2024-05-16 14:32:03 -07:00
LGUG2Z
d5f4f916be feat(stackbar): make label configurable
This commit introduces a new stackbar label configuration option backed
by the StackbarLabel enum, which now has two variants, Process and
Title.

The state tracker for this option is kept in an AtomicCell, and the
state tracker for StackbarMode has also been changed from an
Arc<Mutex<T>> to an AtomicCell to match.

resolve #826
2024-05-16 14:17:54 -07:00
LGUG2Z
77fc3973b6 perf(wm): switch to daily rotating log files 2024-05-15 17:54:34 -07:00
r3st
29b1794409 feat(cli): add promote-window cmd
This commit adds the promote-window command, which allows the user to
promote the window in the specified OperationDirection from the
currently focused window to the largest tile on the workspace layout.
2024-05-15 14:56:31 -07:00
LGUG2Z
1420334c94 feat(cli): add cycle-move-workspace-to-monitor cmd
This commit adds a new cli command, cycle-move-workspace-to-monitor.

After the introduction of the monitor reconciliator module in
combination with display_index_preferences, this command should never
really be necessary, however it is worth having as a backup.

resolve #718
2024-05-15 14:06:35 -07:00
LGUG2Z
82aa2edf8f docs(wm): border renames and aliases, ahk example
This commit renames a number of border-related code refs, removing the
ActiveWindow prefix since these borders are no longer just for the
active window.

Aliases have been added to preserve backwards compat for existing
configs.

An example AHK configuration file has been added to the Common Workflows
section of the docs site.

A link to the docs site has been added to the output of komorebic start.

A note has been added recommending that users disable system animations
for the best experience in the Getting Started guide.
2024-05-15 11:52:13 -07:00
LGUG2Z
228cb26b64 fix(wm): remove object name change spam guard
The spam guard removed in this commit is no longer needed after commit
54c58be.
2024-05-15 09:51:57 -07:00
LGUG2Z
3d53c602a7 feat(wm): single_window -> window_based offset
This commit updates the initial design of single_window_work_area_offset
to window_based_work_area_offset where the user can set
window_based_work_area_offset_limit to determine the limit of windows on
the screen that this offset should apply to.

By default this is 1, and in the most extreme case of someone using a
super ultrawide monitor this might be 2.
2024-05-15 09:51:57 -07:00
LGUG2Z
81f741bbbd fix(wm): always respect adjusted work area
This commit fixes a regression which led to the adjusted work area for a
monitor not being respected when applying additional window-based work
area offsets.

re #811
2024-05-15 09:51:57 -07:00
LGUG2Z
0330dfe250 feat(wm): add single window work area offsets
This commit adds a new monitor configuration option, single_window_work_area_offset, which will
apply to a monitor when only a single window is open on a workspace. This is implemented as a Rect
to enable its use on both horizontally and vertically positioned monitors. This option will be
particularly useful for ultrawide monitor users, where a single window taking up the full width of
the work area can often hinder usability.

resolve #434
2024-05-15 09:51:56 -07:00
LGUG2Z
70ef90b304 perf(wm): compare rects before position updates
This commit ensures that both windows and borders will make a comparison
to the current values returned by WindowRect before attempting to make
update calls to SetWindowPos. This should greatly reduce visual
flickering in both the borders and sensitive apps like JetBrains IDEs.
2024-05-15 09:51:56 -07:00
LGUG2Z
d102c00ffe feat(wm): add alt-tab heuristics to wsr
This commit adds some rough heuristics to workspace_reconciliator which
should help with having the correct window focused after reconciliation
in the majority of, but probably not all, cases.

EnumWindows generally returns HWNDs according to z order, and a window
selected by alt-tab will almost always be put on the top of the z order.
Before sending a workspace_reconciliator::Notification, we store this
HWND along with an Instant and an AtomicBool telling us that we have a
candidate to focus after the workspace switch.
2024-05-15 09:51:56 -07:00
LGUG2Z
87b1ab9c53 fix(wm): restart bm and wsr notif handlers on fail
This commit ensures that if and when either the border_manager or
workspace_reconciliator notification handlers crash in their respective
threads, they will be restarted instead of killing the whole thread.

This is acheived via a loop running in the spawned threads of both
listeners, which will report whichever error killed the notification
handler functions.

Clippy annotations to deny expect and unwrap calls have been added to
these two modules.

Calls to DestroyWindow for expired borders were sporadically failing in
unpredictable circumstances, so these have been switched out with calls
to CloseWindow which has been working well so far with the stackbar
feature.
2024-05-15 09:51:56 -07:00
LGUG2Z
a4dd5fc741 refactor(clippy): apply lints 2024-05-15 09:51:56 -07:00
LGUG2Z
226ee73aa4 fix(borders): reap untracked hwnds in destroy_all
This commit ensures that even border hwnds that may now be untracked as
a result of events such as monitor changes will now be reaped in the
destroy_all_borders function.
2024-05-15 09:51:56 -07:00
LGUG2Z
e14235c3a9 perf(wm): ignore same-workspace switch requests
This commit ensures that if a user uses index-based commands to switch
workspaces, workspace layout update code paths will not be run if the
user is already on the desired monitor and workspace indices.

resolve #647
2024-05-15 09:51:56 -07:00
LGUG2Z
855bb49804 feat(wm): add noop cross-monitor-move-behaviour
This commit adds a new "NoOp" MoveBehaviour for users who don't want any
moves to happen across monitor boundaries. The
toggle-cross-monitor-move-behaviour will only toggle between Swap and
Insert, and will do nothing if NoOp is the selected MoveBehaviour.

resolve #667
2024-05-15 09:51:56 -07:00
LGUG2Z
07b2da69a1 feat(wm): add workspace reconciliator module
This commit adds the workspace_reconciliator module which uses a tightly
bounded channel (cap: 1) to update the focused workspace in situations
where the user or another process has foregrounded a window that is on a
different workspace.

This most often happens via Alt-Tab, or by clicking a link which opens
in another application.

workspace_reconciliator::Notification contains the target monitor and
workspace indices, which when received allows for the correct workspace to
be focused.

These notifications are sent in process_event.rs when handling
WindowManagerEvent::Show, Manage and Uncloak events.

All previous logic pertaining to workspace reconciliation which lived in
the handler for these events has been removed and replaced with
notifications sent to the reconciliator.

As the notifications channel is tightly capped and any notifications
which overflow the cap will never be delivered, we are able to avoid the
infinite workspace switching loops which happened when using the
previous logic, which ran on every single event.
2024-05-12 09:14:55 -07:00
LGUG2Z
6a1ed3bcaa feat(borders): add border manager module
This commit removes all border-related code from process_command,
process_event etc. and centralizes it in the new border_manager module.

Instead of trying to figure out where in process_event and
process_command we should make border-related changes, a notification
gets sent to a channel that border_manager listens to whenever an event
or command has finished processing.

The border_manager listener, upon receiving a notification, acquires a
lock on the WindowManager instance and updates borders for the focused
workspace on every monitor; this allows us to centralize all edge case
handling within the border_manager listener's loop.

Borders on workspaces that lose focus are now destroyed and recreated
when those workspaces regain focus, instead of trying to share
individual border instances across workspaces.

A number of common edge cases that have been addressed in this commit
are:

* Paused window manager
* Floating workspaces
* Maximized windows
* Fullscreen videos
* Monocle containers
* Ghost borders on workspace switching
* Incorrect focused window border colours

Global state related to borders has also been moved into the
border_manager module, which also tracks the state of border objects
(BORDER_STATE), their rects (RECT_STATE) and their focus kinds
(FOCUS_STATE).

This allows us to now track multiple borders per-container, enabling
unfocused border windows for the first time.

Additionally, the Z-Order for border windows is now also configurable.

ActiveWindowBorderColours has been expanded to include Unfocused, but in
order to not introduce a breaking configuration change for end users,
all members of this struct have been made Option<Colour>.
2024-05-12 09:14:50 -07:00
LGUG2Z
1b30561989 fix(wm): update focused idx on cross-monitor moves
This commit ensures that in situations where the last container on a
monitor is moved to an adjacent monitor, the focused container index of
the origin monitor will be appropriately decremented.
2024-05-11 16:47:44 -07:00
LGUG2Z
c47cf4718b docs(mkdocs): add ahk exe troubleshooting section 2024-05-10 14:50:41 -07:00
LGUG2Z
1accbf65ca docs(mkdocs): add shell.nix for python doc deps 2024-05-10 14:39:41 -07:00
0x3bb
7ee3c928d8 docs(mkdocs): addressing display suspension within monitor OSD 2024-05-10 14:39:41 -07:00
0x3bb
6d1903099a docs(mkdocs): add pymdownx.highlight and pymdownx.superfences extensions
Used for syntax highlighting in code blocks, and allows for indenting existing code blocks.

References:
- https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown-extensions/#highlight
- https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown-extensions/#superfences
2024-05-10 14:39:41 -07:00
0x3bb
d5c6f090cc docs(mkdocs): add admonition extension
Used for bringing attention to troubleshooting steps in komorebi documentation.

Reference: https://squidfunk.github.io/mkdocs-material/reference/admonitions/
2024-05-10 14:39:41 -07:00
LGUG2Z
598f9ec0aa fix(wm): avoid dupes when following links
When adding selective handling of Uncloak events, a regression was
introduced where, for example, when clicking a link from Discord on
Workspace 2, a Firefox instance on Workspace 1 would be moved to
Workspace 2 to open the link, but when moving back to Workspace 1, a
ghost tile would be left, and the Firefox instance would be duplicated
across two workspaces.

This commit fixes this regression and makes the handler a bit easier to
reason about while also removing unnecessary early return statements
which prevent notifcations from getting sent to subscribers.
2024-05-09 20:10:38 -07:00
LGUG2Z
11acff5236 refactor(wm): reduce noise in info and error logs 2024-05-09 19:49:43 -07:00
LGUG2Z
4802b55452 feat(wm): selectively handle uncloak events
This commit adds selective handling for WindowManagerEvent::Uncloak
alongside Show and Manage, avoiding the workspace-switching logic that
is known to cause infinite workspace loops.
2024-05-08 08:58:41 -07:00
dependabot[bot]
482a7b1d7f chore(deps): bump schemars from 0.8.17 to 0.8.18
Bumps [schemars](https://github.com/GREsau/schemars) from 0.8.17 to 0.8.18.
- [Release notes](https://github.com/GREsau/schemars/releases)
- [Changelog](https://github.com/GREsau/schemars/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GREsau/schemars/compare/v0.8.17...v0.8.18)

---
updated-dependencies:
- dependency-name: schemars
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 20:32:36 -07:00
dependabot[bot]
d00ee82a9d chore(deps): bump sysinfo from 0.30.11 to 0.30.12
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.30.11 to 0.30.12.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

---
updated-dependencies:
- dependency-name: sysinfo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 20:32:19 -07:00
dependabot[bot]
9f01d8fa0f chore(deps): bump serde from 1.0.199 to 1.0.200
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.199 to 1.0.200.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.199...v1.0.200)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 20:31:51 -07:00
LGUG2Z
627088c9b9 fix(wm): focus workspaces on cross-monitor cmds
This commit ensures that if a window is moved to a workspace on another
monitor which is not the currently focused workspace on that monitor,
the target workspace will be focused as part of the operation.
2024-05-06 18:31:01 -07:00
LGUG2Z
22cf7b5017 docs(readme): add comparison with fancy zones 2024-05-02 15:52:19 -07:00
LGUG2Z
3e984d886c docs(mkdocs): fix header level typo 2024-05-01 17:42:27 -07:00
LGUG2Z
185cb4d4a8 chore(dev): begin v0.1.26-dev 2024-04-30 15:02:48 -07:00
LGUG2Z
62900c59cb chore(release): v0.1.25 2024-04-30 14:49:45 -07:00
MasouShizuka
a2e9a46582 feat(wm): add resize of all layouts except grid with filp
fix: fix horizontal-stack out of monitor with vertical flip (db28e25)

feat: add resize of right-main-vertical-stack layout with filp (28dd546)
2024-04-30 13:09:53 -07:00
dependabot[bot]
871a53821c chore(deps): bump schemars from 0.8.16 to 0.8.17
Bumps [schemars](https://github.com/GREsau/schemars) from 0.8.16 to 0.8.17.
- [Release notes](https://github.com/GREsau/schemars/releases)
- [Changelog](https://github.com/GREsau/schemars/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GREsau/schemars/compare/v0.8.16...v0.8.17)

---
updated-dependencies:
- dependency-name: schemars
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 18:27:57 -07:00
dependabot[bot]
bcd1c50d82 chore(deps): bump parking_lot from 0.12.1 to 0.12.2
Bumps [parking_lot](https://github.com/Amanieu/parking_lot) from 0.12.1 to 0.12.2.
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/parking_lot/compare/0.12.1...0.12.2)

---
updated-dependencies:
- dependency-name: parking_lot
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 18:27:44 -07:00
dependabot[bot]
0c41d9ded2 chore(deps): bump serde from 1.0.197 to 1.0.199
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.197 to 1.0.199.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.197...v1.0.199)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 18:27:17 -07:00
dependabot[bot]
4af62fe97b chore(deps): bump thiserror from 1.0.58 to 1.0.59
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.58 to 1.0.59.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.58...1.0.59)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 18:26:10 -07:00
LGUG2Z
7cab062124 fix(stackbar): avoid drops on notification events
This commit completely removes the custom Clone and Drop trait
implementation for Stackbar, and moves the handling to be explicit
within container.rs, which helps us to avoid unintentional drops when
the Stackbar struct is cloned for Notification events sent to
subscribers such as Zebar.

re #746
2024-04-29 17:31:27 -07:00
LGUG2Z
611fa34567 fix(stackbar): avoid drops from variable updates
This commit ensures that when we call methods to change
Container.stackbar we are not unintentionally invoking a Drop which
kills a stackbar window that already exists.

Checks have been added to make sure that we not change the value of the
stackbar variable if it is already an Option::Some.

re #746 re #792
2024-04-29 13:56:24 -07:00
LGUG2Z
95990d682b fix(config): ensure tiling with layout rules
This commit ensures that tiling on a workspace will be enabled if a user
specifies layout rules or custom layout rules without providing an
option to the "layout" key.
2024-04-29 08:06:37 -07:00
LGUG2Z
e363a494c3 docs(mkdocs): various updates to reflect v0.1.25-dev.0 2024-04-28 13:51:08 -07:00
LGUG2Z
383533e2d9 feat(wm): add right-main-vertical-stack layout
This commit adds a new RightMainVerticalStack layout, adapting code from
the similarly named LeftWM layout.

It turns out that the horizontal axis flip on the VerticalStack does not
play well with resize offsets.

It was ultimately easier to implement this layout and the logic for
resizing both VerticalStack and RightMainVerticalStack independently
than to make resize offsets and horizontal axis flips work together.

I still have no idea why resize offsets and horizontal axis flips aren't
working properly together.

Horizontal axis flips have been disabled for both the VerticalStack and
RightMainVerticalStack layouts.

re #789
2024-04-28 12:17:53 -07:00
LGUG2Z
0b04e3ef93 fix(wm): avoid out of range container focus op
This commit ensures that when floating the sole window visible on a
workspace that the focused container index for the workspace will not be
decremented below 0.

re #787
2024-04-25 18:30:52 -07:00
LGUG2Z
3370e6acc5 fix(wm): revert mff edge case regression
This commit ensures that the wm's mouse_follows_mouse state is respected when handling FocusChange
WindowManagerEvents, so that applications opened on empty workspaces do not automatically center the
cursor unless configured to do so.

fix #782
2024-04-23 07:19:53 -07:00
LGUG2Z
4ffffc5eec fix(wm): revert regression in ffm raise handler 2024-04-23 07:03:48 -07:00
dependabot[bot]
2b5f737d14 chore(deps): bump proc-macro2 from 1.0.80 to 1.0.81
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.80 to 1.0.81.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.80...1.0.81)

---
updated-dependencies:
- dependency-name: proc-macro2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 17:16:27 -07:00
dependabot[bot]
8a455c8ab7 chore(deps): bump serde_json from 1.0.115 to 1.0.116
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.115 to 1.0.116.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.115...v1.0.116)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 17:16:14 -07:00
dependabot[bot]
3d9871c576 chore(deps): bump reqwest from 0.12.3 to 0.12.4
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.12.3 to 0.12.4.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.3...v0.12.4)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 17:15:51 -07:00
dependabot[bot]
cafb8e9a48 chore(deps): bump sysinfo from 0.30.10 to 0.30.11
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.30.10 to 0.30.11.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/compare/v0.30.10...v0.30.11)

---
updated-dependencies:
- dependency-name: sysinfo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 17:15:26 -07:00
Sam Vendittelli
740cb3c877 fix(docs): correct typo in example config
The example configuration mistakenly used the key `border_padding` in
the place of `border_width`. As `border_padding` does not exist in the
spec, modifying its value has no effect.

As this file is used by `komorebic quickstart`, new users will have this
incorrect key in their default configuration. Notably, setting its value
to `0` to remove gaps has no effect. The rest of the documentation uses
the correct key, so users copying and pasting from that would not
encounter the bug.
2024-04-21 17:43:13 -07:00
LGUG2Z
b8b3b3d615 docs(wm): add stackbar config struct docs 2024-04-21 14:12:09 -07:00
LGUG2Z
6fce630be5 fix(wm): restore stackback on monocle off
This commit ensures that if a container stack has a stackbar, when
toggling off monocle mode, the stackbar will be restored as expected.
This requires an additional retile which it would be nice to avoid in
the future.
2024-04-21 12:35:23 -07:00
LGUG2Z
dfd0d604aa feat(cli): add move-to-monitor-workspace command
This commit adds a move-to-monitor-workspace command, which, following
the existing convention, does the same action as
send-to-monitor-workspace, but sets the focused monitor, workspace and
container to the window container once it is inserted into the target
monitor and workspace indices.
2024-04-20 14:58:57 -07:00
LGUG2Z
aff1081ccd feat(cli): detailed start failure error feedback
This commit ensures that after 3 failures to start komorebi with
'komorebic start', 'komorebi.exe' will be run directly in order to show
the detailed error output to the end user.
2024-04-20 14:37:27 -07:00
LGUG2Z
793e81d43d fix(cli): use force-quit if stop signal fails
This commit ensures that the komorebic stop command will force-quit
komorebi if the Stop SocketMessage handler fails.
2024-04-20 14:37:23 -07:00
LGUG2Z
eac4c8e9b1 fix(wm): add regex ws rule matching support
This commit ensures that enforce_workspace_rules() will try to match
exact exe names, classes and titles, and then against any potential
regexes that may have been used as keys to index matching rules against
the current window's exe, title and class.

Support for other matchers isn't implemented yet. Not sure it's worth
adding while using a HashMap to store the workspace rules, probably need
to rethink the data structure first.
2024-04-18 19:44:08 -07:00
جاد
6b42587af4 docs(ahk): add #requires line, remove asc ref
* re-add the #requires line that was removed in commit e044a5a
* remove the "generated by komorebic" comment which is incorrect. komorebic only generates an AHK v1 lib
* update common-workflows/autohotkey.md to remove line about `komorebi.generated.ahk file which no longer exists
2024-04-16 08:04:15 -07:00
LGUG2Z
46152621c0 feat(wm): immediate stackbar mode updates via ipc
This commit ensures that when the stackbar mode is updated via a
SocketMessage or static config update, any visible stackbars will have
their mode updated immediately without having to wait for user
interaction.
2024-04-16 07:54:31 -07:00
mmikeww
b78693118b Update autohotkey.md
komorebi.generated.ahk is no longer in the repo, it was deleted in commit 52122c401d, so remove the instruction to download it
2024-04-15 21:29:31 -04:00
mmikeww
7caa839a00 Update komorebic.lib.ahk
re-add the #Requires v2 line
remove the "generated by komorebic" comment
2024-04-15 21:24:11 -04:00
LGUG2Z
1671f31e3e feat(wm): add window debugging
This commit adds support for debugging windows and emitting information
about how they go through komorebi's decision making pipeline and rules
engines which ultimately decide how they are or aren't managed.
2024-04-15 15:05:20 -07:00
LGUG2Z
6fe46610fc refactor(wm): ensure configurability via ipc
This commit ensures that new features such as stackbar, particularly
where the configuration is located in the global state, can be
configured via SocketMessages.

A few structs had to be moved to komorebi-core to make this possible.
I've also cleaned up a bunch of strum snake_case attrs which seemed to
be unused.

A new GlobalState SocketMessage has been introduced, and going forward
we should make sure that this can send all global state to a requester,
and move global state out of the State handler, which should only handle
window manager state.
2024-04-15 08:36:28 -07:00
LGUG2Z
4ba3125dde fix(wm): ensure window restore on stackbar click
This commit ensures that a window is restored before a focus call is
made on it when switching windows in a stack by using a window's tab in
the stackbar.

This handles the issue where two clicks are required to trigger a layout
update the first time a window that is not currently at the top of the
stack is brought to the front via a stackbar click.
2024-04-13 22:38:41 -07:00
James Tucker
efa562de5c fix(wm): avoid out of range subtraction
This fixes the panic, but not the underlying problem.

Updates #757
Updates #758
2024-04-13 22:17:57 -07:00
James Tucker
b476bee1d8 fix(wm): fix focus changes with stackbar enabled
Notify all stackbars on focus change, and they now respond to changes,
but do not create focus changes themselves just from an update.
2024-04-13 22:07:53 -07:00
James Tucker
86b07f28dd chore(deps): update deps, including miow
Fixes #696
2024-04-13 21:59:48 -07:00
James Tucker
311e37c8a2 fix(wm): reduce errors from non-window events
As we have been working down some bugs from earlier changes, we
introduced some additional error conditions in the logs. Now that the
new focus approach is available, switching the stackbar to that means we
can avoid needing to pass down ForceUpdate and FocusChange events for
non-windows, which removes many of these cases.

In addition we do a check in should_manage that the target object is
actually a window, ignoring the event if it is not.
2024-04-13 21:14:59 -07:00
James Tucker
15c3b32608 feat(wm): report full errors in debug mode
This gives us a stack trace style error report in the log when in debug
mode, which makes it much quicker to track down the origin of an error.
2024-04-13 17:28:49 -07:00
James Tucker
28b46c54da fix(wm): correct use of z-order flags
We had been setting managed windows to HWND_TOPMOST which is a sticky
and viral parameter. This was also the cause of the border window ending
up behind other windows in an undesirable fashion, as even though it was
marked WS_EX_TOPMOST, we were then having to mark it HWND_NOTOPTMOST
when raising it to avoid it ending up drawing over other windows.

Since we've fixed the border window to no longer be visible when
unmanaged windows are focused, we can now set the border window to
HWND_TOP when we reposition, which will ensure it's drawing in the order
that we want.

Now we also set managed windows only to HWND_TOP, rather than
HWND_TOPMOST which stops us from incorrectly reordering internal
concerns vs. child windows and owned windows that we're not managing.
Windows are still brought to the foreground as expected/desired, but
they're no longer 'sticking' there, nor are they drawing over the border
window.

This change does have a slight transition behavior as it initially rolls
out, as prior versions of the Komorebi have been setting HWND_TOPMOST,
which as a sticky parameter won't be cleared until the application or
host system removes that flag. This means that the final z-order
behavior will come good eventually.

To immediately see the correct results, restarting affected apps or
logging out / in will do. Unfortuantely we can't just set
HWND_NOTTOPMOST, as similarly to setting HWND_TOPMOST, this can cause
issues with an applications intended owned-window Z-Ordering - mostly
affecting toolwindows and child windows, such as file dialogs, toolbars
and so on, most of which we do not manage.
2024-04-13 17:28:45 -07:00
James Tucker
732aca77b5 refactor(wm): use a new method to focus windows
Use the same method as FancyZones to enable setting the foreground
window. This makes it possible then to remove the thread attachment
behaviors that have a number of other complex side effects, and aren't
always allowed.

In addition, cleanup old focus/raise methods some, in particular the
border window is now explicitly not activated when it is raised, as it
should never be activated.
2024-04-13 16:51:01 -07:00
James Tucker
f56fc36557 refactor(wm): remove mutability from window and events
We had a mut requirement on some of the Window functions which may have
been vestigial or in preparation for more state on Window objects, but
presently unused. I removed that, as the Window struct is currently just
carrying an HWND value that's essentially always immutable - there's no
advantage to ever reusing a Window struct vs. making a new one for
another HWND.

In doing so we then no longer needed to be passing in mutable events, so
I applied a little simplification of the event receiver / dispatcher to
process_event. After that it became obvious that we could just pass the
owned event directly into process_event instead, which substantially
simplifies the ownership model and lifetime for those objects.

This is small, and shouldn't create any meaningful behavioral change.
2024-04-13 16:50:26 -07:00
LGUG2Z
5334e1944e fix(wm): ensure stackbar tab clicks trigger
This commit fixes a small regression that prevented events emitted from
clicks on stackbar tabs from being handled.
2024-04-13 12:02:46 -07:00
LGUG2Z
d8d087e621 fix(wm): ensure borders are drawn w/ stackbar
This commit fixes a small regression and ensures that the active window
border, when enabled, will be drawn as expected when a container stack
has a stackbar active.
2024-04-13 11:02:14 -07:00
James Tucker
b61146ead4 fix(wm): hide border when unmanged windows are focused
Previously we were dropping events that don't pertain to managed
windows, with one exception in should_manage that could probably do with
further cleanup (DisplayChange).

This first step fixes the latent border window problem, where we would
retain a border window when the last managed window was closed and focus
transitioned to an unmanaged window.
2024-04-13 10:22:03 -07:00
LGUG2Z
16cb811aa9 docs(license): switch to polyform, add contributing.md 2024-04-12 14:46:36 -07:00
LGUG2Z
862219b9a3 chore(dev): begin v0.1.25-dev 2024-04-11 16:59:01 -07:00
LGUG2Z
0fc75afb00 chore(release): v0.1.24 2024-04-09 17:57:41 -07:00
LGUG2Z
d67f355a17 refactor(logs): reduce noise on info level 2024-04-09 17:34:14 -07:00
LGUG2Z
3d0ed4cfc4 fix(wm): address regression from 5e714ca
This commit fixes a regression introduced in 5e714ca which broke the
cross-monitor mouse move behaviour.
2024-04-09 16:30:58 -07:00
Carlos Regis
21be01b9aa docs(mkdocs): show default loc for whkdrc (#739) 2024-04-08 16:48:52 -07:00
LGUG2Z
648ba672e3 docs(config): update schema version in docstring 2024-04-07 14:26:27 -07:00
LGUG2Z
af6529851e chore(dev): begin v0.1.24-dev 2024-04-07 14:18:29 -07:00
LGUG2Z
bea3d1fcbc chore(release): v0.1.23 2024-04-07 13:34:18 -07:00
LGUG2Z
e40fa11b0d docs(mkdocs): offline install, stackbar, border style 2024-04-05 18:37:16 -07:00
LGUG2Z
251ec3d53e fix(wm): address toggle-float container edge case
This commit ensures that the focused container index on a workspace is
updated appropriately if the user calls toggle-float on the last
Container in a Ring. Previously, doing this would leave a ghost tile.
Now that we check if the focused_idx is still valid after removing an
empty Container from the workspace, users will no longer be left with a
ghost tile.
2024-04-05 17:12:14 -07:00
LGUG2Z
5e714cafab fix(wm): limit resize/move path to managed hwnds
This commit ensures that the MoveResizeEnd handler will only proceed if
the window triggering the event is a managed window on the focused
workspace.

fix #733
2024-04-05 15:19:32 -07:00
LGUG2Z
6aa9be1ea0 fix(config): gracefully handled deprecated asc opt
This commit ensures that if an applications.yaml revision is passed
which includes the now-deprecated border_overflow option, komorebi will
gracefully handle it instead of crashing on an unknown enum variant
error.
2024-04-05 15:15:07 -07:00
dependabot[bot]
6238d1f848 chore(deps): bump h2 from 0.4.3 to 0.4.4
Bumps [h2](https://github.com/hyperium/h2) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.4.3...v0.4.4)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-05 08:37:53 -07:00
LGUG2Z
d83dc48230 feat(docs): deprecate border overflow identifiers 2024-04-04 14:45:23 -07:00
LGUG2Z
f2c4dadcde feat(docs): update schema.json + mkdocs cli pages 2024-04-04 14:34:58 -07:00
LGUG2Z
c05e9ea089 fix(wm): always check/ensure datadir creation
A user reported in an issue that their komorebi data dir did not persist
across reboots. While there have not been any other reports of this type
of system behaviour, it's worth just doing a mkdir -p equivalent call
whenever komorebi.exe is starting to ensure that the socket files can
always be created no matter what.

re #731
2024-04-04 12:56:55 -07:00
LGUG2Z
37aa99a537 feat(config): add active window border style opt
This commit adds a new active window border style configuration option
to komorebi.json, allowing users to explicitly opt in to square or
rounded active window borders to match whatever patches they may have
made at the system / dwm.exe level.
2024-04-02 19:39:19 -07:00
dependabot[bot]
dca32bead5 chore(deps): bump serde_json from 1.0.114 to 1.0.115
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.114 to 1.0.115.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.114...v1.0.115)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 12:10:17 -07:00
dependabot[bot]
77eaddca1e chore(deps): bump reqwest from 0.11.27 to 0.12.2
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.27 to 0.12.2.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.27...v0.12.2)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 12:10:08 -07:00
LGUG2Z
79fb098d04 docs(cli): add support + community links to start cmd 2024-03-25 17:55:28 -07:00
dependabot[bot]
d0bab4280a chore(deps): bump heck from 0.4.1 to 0.5.0
Bumps [heck](https://github.com/withoutboats/heck) from 0.4.1 to 0.5.0.
- [Changelog](https://github.com/withoutboats/heck/blob/master/CHANGELOG.md)
- [Commits](https://github.com/withoutboats/heck/commits)

---
updated-dependencies:
- dependency-name: heck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 17:27:02 -07:00
dependabot[bot]
e616004da7 chore(deps): bump serde_yaml from 0.9.33 to 0.9.34+deprecated
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.33 to 0.9.34+deprecated.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.33...0.9.34)

---
updated-dependencies:
- dependency-name: serde_yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 17:26:43 -07:00
LGUG2Z
c65060fbd9 feat(wm): add stackbar for multi-window containers
This commit introduces the stackbar feature through careful extracting
and refactoring of code from the Komorebi-UI hard-fork.

Unfortunately on the fork, this feature was not implemented using atomic
commits, which resulted in the implementation here being more of a
"reinterpretation" than a lift-and-shit of the referenced code.

Nevertheless, this commit represents a working version of the stackbar
feature.

resolve #681
2024-03-25 14:30:30 -07:00
dependabot[bot]
50a851a660 chore(deps): bump which from 6.0.0 to 6.0.1
Bumps [which](https://github.com/harryfei/which-rs) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/harryfei/which-rs/releases)
- [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/harryfei/which-rs/compare/6.0.0...6.0.1)

---
updated-dependencies:
- dependency-name: which
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 11:20:18 -07:00
dependabot[bot]
8ad6f4be1f chore(deps): bump regex from 1.10.3 to 1.10.4
Bumps [regex](https://github.com/rust-lang/regex) from 1.10.3 to 1.10.4.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.3...1.10.4)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 11:19:46 -07:00
LGUG2Z
24ac0c4cd3 refactor(cli): avoid http reqs for sample configs
re #716
2024-03-24 21:07:10 -07:00
LGUG2Z
e0652d953a feat(config): add negative matching strategies
This commit adds support for negative matching strategies to complement
Equals, StartsWith, EndsWith and Contains.
2024-03-22 21:06:24 -07:00
LGUG2Z
d6e0ecc507 feat(config): add support for composite rules
This commit adds support for composite rules in the static configuration
file, and for float_identifiers in the applications.yaml file.

A new enum, MatchingRule provides two variants, Simple and Composite,
and is now used in place of IdWithIdentifier throughout komorebi.

In order to keep this new enum lean, a variant for
IdWithIdentifierAndComment has not been added, and references to it in
the old config generation code have been replaced with MatchingRule.

resolve #462, resolve #715, resolve #237
2024-03-22 17:51:20 -07:00
LGUG2Z
ca22cdb07f fix(wm): add hack for new firefox windows
This commit adds a 10 millisecond thread sleep specifically for Firefox
as an interim solution for the race condition which results in new
windows often not being tiled correctly until interacted with.

The idea to add a sleep instead of spamming the output with dbg! calls
comes from @kornel@mastodon.social:

https://mastodon.social/@kornel/112125851048707993
2024-03-19 20:27:25 -07:00
dependabot[bot]
dc38eae2af chore(deps): bump serde_yaml from 0.9.32 to 0.9.33
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.32 to 0.9.33.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.32...0.9.33)

---
updated-dependencies:
- dependency-name: serde_yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-18 13:24:46 -07:00
dependabot[bot]
66446f571c chore(deps): bump os_info from 3.8.0 to 3.8.1
Bumps [os_info](https://github.com/stanislav-tkach/os_info) from 3.8.0 to 3.8.1.
- [Release notes](https://github.com/stanislav-tkach/os_info/releases)
- [Changelog](https://github.com/stanislav-tkach/os_info/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stanislav-tkach/os_info/compare/v3.8.0...v3.8.1)

---
updated-dependencies:
- dependency-name: os_info
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-18 13:18:37 -07:00
LGUG2Z
b2f6329963 fix(wm): raise applicationframehost apps via state
This commit ensures that ApplicationFrameHost.exe applications developed
by Microsoft are raised correctly when a user has the custom komorebi
ffm implementation enabled.

The Win32 API calls EnumWindows and WindowFromPoint return different
HWNDs for the same windows because of some jank in how the
ApplicationFrameHost apps are developed.

To avoid this inconsistency on the Win32 API level, komorebi now queries
its own state when looking up HWNDs for windows at any given cursor
position.
2024-03-16 15:35:37 -07:00
LGUG2Z
bc46f65f64 fix(wm): use focus fn in komorebi ffm
This commit swaps out the old "raise" fn for the more up-to-date and
tested "focus" fn when raising a window for focus when the "komorebi"
implementation of focus follows mouse is enabled.
2024-03-15 18:57:38 -07:00
LGUG2Z
69573c383f refactor(wm): use notopmost flag instead of bottom
It seems like when we use the bottom flag, Rainmeter widgets will be
drawn on top of windows that are managed by komorebi. After looking at
the GlazeWM codebase, where this issue does not occur, it seems like the
difference is made by the use of the notopmost flag.

resolve #679
2024-03-15 18:48:53 -07:00
LGUG2Z
45a3f2a6b5 chore(dev): begin v0.1.23-dev 2024-03-15 18:48:28 -07:00
dependabot[bot]
5af00b64cf chore(deps): bump softprops/action-gh-release from 1 to 2
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-11 11:27:03 -07:00
dependabot[bot]
81dff3279c chore(deps): bump clap from 4.5.1 to 4.5.2
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.1 to 4.5.2.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.1...v4.5.2)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-11 11:26:14 -07:00
dependabot[bot]
2f17e4bb29 chore(deps): bump reqwest from 0.11.24 to 0.11.25
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.24 to 0.11.25.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.24...v0.11.25)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-11 11:24:32 -07:00
dependabot[bot]
1b966d3731 chore(deps): bump ctrlc from 3.4.2 to 3.4.4
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.4.2 to 3.4.4.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.4.2...3.4.4)

---
updated-dependencies:
- dependency-name: ctrlc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-11 11:24:14 -07:00
dependabot[bot]
e58d776f81 chore(deps): bump sysinfo from 0.30.6 to 0.30.7
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.30.6 to 0.30.7.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/compare/v0.30.6...v0.30.7)

---
updated-dependencies:
- dependency-name: sysinfo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-11 11:24:00 -07:00
LGUG2Z
40e77fddfe chore(release): v0.1.22 2024-03-03 21:00:37 -08:00
LGUG2Z
9c8a50fe80 docs(mkdocs): updates for v0.1.22 2024-03-03 20:53:25 -08:00
LGUG2Z
41e9068fca chore(wm): add debug event info to ignored windows 2024-03-03 14:58:12 -08:00
LGUG2Z
3690f8ebd8 ci(github): add common cargo checks 2024-03-03 13:31:20 -08:00
LGUG2Z
7b24474ef2 fix(wm): prevent ghost active border on empty ws
This commit ensures that a "ghost border" will not be drawn when
switching to empty workspaces if active_window_border = true.
2024-03-02 19:30:50 -08:00
LGUG2Z
f675717844 ci(github): add goreleaser check to build 2024-03-02 15:23:06 -08:00
LGUG2Z
38b0418c3b fix(subscriptions): emit ws event on empty targets
This commit ensures that workspace change events get emitted even when
changing to workspaces with no window containers. Previously these were
failing due to early returns triggered when the workspace focused did
not have a focused container.
2024-03-02 11:15:20 -08:00
LGUG2Z
6781f34930 fix(wm): restore full mouse resize functionality
This commit fixes a regression that was most likely introduced in #678
which changed a bunch of stuff related to window and border dimension
calculation.

See commit 4e98d7d36d for more information
as the same approach to fix the behaviour there has been applied here.
2024-03-01 19:07:05 -08:00
Javier Portillo
4919872e1a fix(wm): adds special case for grid stacks to the right 2024-03-01 16:14:42 -08:00
LGUG2Z
d730c3c72d feat(config): support parsing json w/ comments
This commit switches out the serde_json crate with the
serde_json_lenient crate, forked by Google, which allows for JSON files
with comments to be parsed properly.

Users can set the format of komorebi.json to "jsonc" in their editors in
order to write // comments without being faced with lint errors.

The expected file extension remains the same (json). komorebi and
komorebic will not look for files with the "jsonc" file extension or any
other JSON-variant file extension.

resolve #693
2024-02-29 17:35:47 -08:00
LGUG2Z
4e98d7d36d fix(wm): restore drag-to-swap window functionality
This commit fixes a regression that was most likely introduced in #678
which changed a bunch of stuff related to window and border dimension
calculation.

While we could previously assume that the points resize.right and
resize.bottom would always be 0 if we were dealing with a move rather
than a resize, these two points now depend on the values of BORDER_WIDTH
and BORDER_OFFSET. The code has been updated to reflect this and
calculate this constant just-in-time.
2024-02-29 17:22:56 -08:00
eythaann
2bceff4edc feat(wm): add path variant to application identifiers
This commit add a new way to match applications
through its paths, allowing to match a bunch
of applications that share a parent folder.
2024-02-28 12:04:46 -08:00
dependabot[bot]
b32bce8713 chore(deps): bump miette from 5.10.0 to 7.1.0
Bumps [miette](https://github.com/zkat/miette) from 5.10.0 to 7.1.0.
- [Release notes](https://github.com/zkat/miette/releases)
- [Changelog](https://github.com/zkat/miette/blob/main/CHANGELOG.md)
- [Commits](https://github.com/zkat/miette/compare/miette-derive-v5.10.0...miette-derive-v7.1.0)

---
updated-dependencies:
- dependency-name: miette
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-27 22:51:28 -08:00
dependabot[bot]
47af40cf9e chore(deps): bump hotwatch from 0.4.6 to 0.5.0
Bumps [hotwatch](https://github.com/francesca64/hotwatch) from 0.4.6 to 0.5.0.
- [Release notes](https://github.com/francesca64/hotwatch/releases)
- [Changelog](https://github.com/francesca64/hotwatch/blob/main/CHANGELOG.md)
- [Commits](https://github.com/francesca64/hotwatch/compare/v0.4.6...v0.5.0)

---
updated-dependencies:
- dependency-name: hotwatch
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-27 21:55:12 -08:00
LGUG2Z
2b9fbc2074 chore(deps): bump windows-rs from 0.52 to 0.54 2024-02-27 18:33:29 -08:00
LGUG2Z
1a8b6a7398 feat(client): introduce komorebi-client crate
This commit introduces the komorebi-client library crate for other Rust
applications to interact with a running instance of komorebi over Unix
Domain Sockets.

Currently the crate re-exports everything one might find in the
komorebi::State struct and everything that is publicly exposed in
komorebi-core.

Public types and methods are still lacking documentation, and this crate
should not be published on crates.io until this is no longer the case.
2024-02-26 18:18:40 -08:00
James Tucker
e5cf042ea9 fix(komorebi): fix unsound use of transmute
This was causing a crash in release mode when moving a window around by
titlebar.
2024-02-26 11:00:34 -08:00
James Tucker
c435f84afc fix(komorebi): remove some warnings that just snuck in 2024-02-25 22:31:39 -08:00
LGUG2Z
de0db4d014 docs(readme): contributing, uds subs + rust client
This commit adds some contribution guidelines and updates the "Window
Manager Event Subscriptions" section with information on using
subscribe-socket and komorebi-client.
2024-02-25 21:53:11 -08:00
James Tucker
0afcf6d86a fix(komorebi): don't scale for DPI, as we're not DPI aware
This fixes a regression from 344e6ad2fd
that assumed we were declared DPI aware.
2024-02-25 19:01:48 -08:00
LGUG2Z
e0e3afa5b9 feat(config): update border opts, add deprecations
This commit includes backwards-compatible renames of
active_window_border_offset and active_window_border_width to
border_offset and border_width respectively.

Since the invisible window border adjustments were removed in #678, the
invisible window borders set by the OS can now also be adjusted via
border_offset and border_width, which is the primary reason for the
rename.

invisible_borders has been marked as deprecated and the previously
deprecated alt_focus_hack option has been removed.
2024-02-25 17:41:49 -08:00
James Tucker
94d8f72904 fix(komorebi): don't raise the border window to top
This trades one issue for another, in order of importance:

- Pop-up windows such as a file upload dialog box for Firefox no longer
  have a window border drawn over the top - better.
- Opaquely bordered windows without DWM decorations, combined with a -1
  offset / single pixel border end up as invisible borders (e.g. EPIC
  Games Launcher).
2024-02-25 16:27:16 -08:00
James Tucker
9b9777feaf fix(komorebi): close the corner gap around rounded corners
The default window corner rounding is still slightly visible at offset
-1 until this corner radius that completely closes up the transparent
region, without needing to invasively draw over the target window.
2024-02-25 16:27:16 -08:00
James Tucker
0c2e37e127 fix(komorebi): raise windows and border to top, not topmost
topmost has a special meaning, in that it is a sticky raise, which is
not what we want - we don't want to be permanently above all other
windows, as this leads to bugs where for example the windows can end up
stuck above non-topmost windows in a different security context, such as
programs running with administrator priviliges.
2024-02-25 16:27:16 -08:00
James Tucker
10ae60f79b fix(config): set new default border offset and width
In the new border painting strategy, the 20 pixel border is huge. The
border is now offset -1 by default, so as to draw over the standard DWM
1px border (avoiding a "1 pixel see through gap"), and the default width
is 8px.
2024-02-25 16:27:16 -08:00
James Tucker
fbb34ba4b3 fix(komorebi): account for border decorations on resize
The SetWindowPos API will inset the provided dimensions by the amount of
space required for window decorations (shadows, etc). Compute the size
of the decorations and add them as padding to the provided size,
resulting in windows being set precisely to the target dimensions.

An active_window_border_width=1, active_window_border_offset=-1 will now
paint over the 1px window decoration consistently.

The border window is always made topmost on resize, so that it paints
over custom borders (e.g. EPIC Games Launcher) as those borders are
opaque and as such a 1px border configuration as above becomes invisible
in that condition.
2024-02-25 16:27:16 -08:00
James Tucker
5ee827ecaf fix(komorebi): account for border offset and width in layout
The layout should leave the space configured for the border, so that the
border always stays within the workspace bounds.

Border offset is cleaned up, as it is no longer a rect, but instead just
a fixed value.

The rect function for adjusting padding now takes a concrete value, as
the optional has no local meaning to the operation, being equivalent to
the default value.

A margin function is added to centralize the notion of increasing the
size of a rect by the given margin, the opposite of the padding
operation.
2024-02-25 16:27:16 -08:00
James Tucker
dc3ffb3bcb fix(komorebi): restore borders, no more DWM border on border window
This fixes a regression from an earlier commit that dropped the DWM
style borders without fixing corner rounding on Windows 11. This is now
fixed for Windows 11 again, while avoiding the extra system border
decorations.
2024-02-25 16:27:16 -08:00
James Tucker
4affefad88 fix(cfg,komorebi): remove all uses of invisible borders
This makes the borders pixel-perfect, and border_overflow can be
disabled on all applications.

Unfortunately this also means we lose the corner rounding, so that may
need to be done differently or the offsets refined in some way to
address that.
2024-02-25 16:27:16 -08:00
James Tucker
344e6ad2fd komorebi{,-core}: use window bounds without shadow
Switch to using the DWM API to get Window bounds so as to exclude the
outside of window decorations from the computation.

This is getting close to a precise window size, you can now set an
active border width of 1 and an offset of 1 and get a 1 pixel line
around most windows, except that there's some extra top padding I have
yet to find the cause of.

This implementation needs to be DPI aware, but I haven't yet tested if
the DPI scaling approach is entirely valid - we may instead need to get
the per-monitor DPI scale, identify the monitor the window is on, and
scale to that, rather than using the system wide scale.

Maybe fixes #574
Maybe updates #622
2024-02-25 16:27:16 -08:00
LGUG2Z
fd57d32bb5 refactor(clippy): apply various lint fixes and recs 2024-02-25 13:33:44 -08:00
LGUG2Z
0581950b21 feat(cli): add whkdrc config path command
This commit adds the "komorebic whkdrc" command to go along with the
"komorebic configuration" command introduced in
608ec03047, aimed it making it easier to
edit this file using a command line editor.

The "config" command has been renamed in the code to Configuration, with
an alias of "config". The Whkdrc command similarly comes with the "whkd"
alias.
2024-02-25 13:26:05 -08:00
LGUG2Z
a07bb4ac60 docs(mkdocs): update old videos in common workflows 2024-02-25 13:06:24 -08:00
Javier Portillo
eab7a64250 fix(grid): enables flip_layout and make it behave correctly 2024-02-25 11:12:34 -08:00
Javier Portillo
98244b9572 feat(wm): passes optional op_direction and count to <dir>_index functions 2024-02-25 11:12:34 -08:00
Javier Portillo
2c156e9a99 refactor(grid): use matches! for early returns 2024-02-25 11:12:34 -08:00
Javier Portillo
d33df04f38 fix(grid): prevents axis flips on grid layout 2024-02-25 11:12:34 -08:00
Javier Portillo
9c196b99c9 feat(grid): adds no-operations for Promote and PromoteFocus commands 2024-02-25 11:12:34 -08:00
Javier Portillo
9fcf4ec19f feat(wm): add grid layout
Based on the Grid layout on LeftWM

Co-authored-by: LGUG2Z <LGUG2Z@fastmail.com>
2024-02-25 11:12:34 -08:00
dependabot[bot]
c3e39311c1 chore(deps): bump which from 5.0.0 to 6.0.0
Bumps [which](https://github.com/harryfei/which-rs) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/harryfei/which-rs/releases)
- [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/harryfei/which-rs/compare/5.0.0...6.0.0)

---
updated-dependencies:
- dependency-name: which
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-25 11:02:19 -08:00
LGUG2Z
e7d928a065 feat(config): allow colours in both rgb and hex
This commit introduces the ability for users to specify colours in the
static config file in either RGB or Hex format.

This is done by introducing a new enum, Colour, which provides variants
wrapping the internal Rgb type, and the HexColour type from the
hex_colour crate. HexColour itself is wrapped in a new struct, Hex, in
order to allow the implementation of the JsonSchema trait.

A number of From<T> implementations have been done in order to make
working with the Colour enum more ergonomic.

Ultimately, the core representation for colours in komorebi remains the
Rgb struct, any and Hex-specified colours will be converted to this Rgb
type before being converted to u32 to pass them on to various Win32 API
calls.
2024-02-25 10:37:00 -08:00
LGUG2Z
608ec03047 feat(cli): add config command
This commit adds the "komorebic config" command as a helper to print the
path to komorebi.json, while respecting the KOMOREBI_CONFIG_HOME
environment variable if it exists.

This is particularly useful for users who wish to edit this file on the
command line, as they can now run commands like:

"lvim $(komorebic config)"
2024-02-25 09:31:57 -08:00
LGUG2Z
92359ebaed fix(wm): improve floating ws window handling
This commit addresses and number of bugs and improves the experience of
working with floating workspaces (ie. Workspace.tile = false).

- When the user moves or resizes a window on a floating workspace,
  WindowManagerEvent::MoveResizeStart will no longer trigger, which
  prevents the mouse focus from going to the middle of the window rect
  after the resize or move action (if mouse_follows_focus = true)

- If active_window_border = true, it will no longer be shown on focused
  windows in floating workspaces

- When windows are moved using a komorebic command from a floating
  workspace to a tiling workspace and active_window_border = true, the
  active window border will be shown again
2024-02-25 08:37:00 -08:00
LGUG2Z
c19f64144a fix(cli): remove socket connection retry loop
This commit remove the socket connection retry loop in send_message
which is no longer required after @raggi's changes in
c8f6502b02.

@azinsharaf noticed that when trying to run komorebic commands while
komorebi was not accepting connections, multiple hanging komorebic
instances could be spawned, particularly if commands were retried.

@eythaann proposed an additive fix for this in PR684 but ultimately as
the previous race condition with the query/response commands has been
handed by @raggi we can remove the socket connection retry loop
completely.
2024-02-25 08:17:20 -08:00
LGUG2Z
8642ac0946 fix(wm): improve maximized window handling
This commit addresses a few bugs with regards to maximized window
handling.

- Correctly restoring and focusing when switching to a workspace
  containing a window previously maximized with the toggle-maximize
  command

- Unmaximizing a window during the initial window scan when the wm
  initializes so that windows that are maximized before running komorebi
  will no longer have the ugly white bar at the top

- When updating workspace layouts, windows that have been maximized
  without using the komorebic toggle-maximize command will be
  unmaximized to prevent the wm state drifting out of sync with what is
  happening on the screen
2024-02-24 19:30:38 -08:00
LGUG2Z
dee5842c9c chore(deps): cargo update 2024-02-24 17:36:43 -08:00
LGUG2Z
a6deeef717 fix(wm): cycle stack focus w/ mff disabled
This commit ensures that the focus changes to the appropriate window
when a container stack is being cycled through by a user who has
disabled the mouse_follows_focus feature.

fix #680
2024-02-24 13:01:45 -08:00
James Tucker
0160e8eeeb fix(wm): cleanup window event messaging
- Use a single thread to bind the hook, and then start dispatching.
- Use a blocking loop for message dispatching.
- Remove the locks around crossbeam channel, as it's already Send + Sync
2024-02-20 18:01:56 -08:00
LGUG2Z
f519cbaf1e refactor(wm): split komorebi into bin and lib
This commit splits the komorebi crate into a mixed binary and library
crate.

All types and logic related to window management have been moved under
lib.rs, and are imported from there for use in main.rs, which is now
only responsible for starting and running the window manager process.

In preparation for exposing a new komorebi-client crate in the future,
serde::Deserialize has been derived on Notification and any struct that
may appear in a notification receievd by a process that has subscribed
to event updates.

re #659
2024-02-18 15:14:59 -08:00
LGUG2Z
ef1ce4a389 feat(subscriptions): add uds subscription support
This commit adds support for subscriptions via Unix Domain Sockets which
are better suited for IPC between Rust processes compared to Named Pipes
which have issues that I don't want to spend time resolving.

The main motivation for this change is to provide an easy way for the
new zebar project to consume information about komorebi's state in the
Rust backend so that a bar module can be created for komorebi users.

The next step in this process will be to finally refactor the komorebi
crate into a mixed bin/lib crate, and expose all notification-related
structs and maybe some connection helper methods in a new
komorebi-client crate.

The previous "subscribe" and "unsubscribe" komorebic commands have had
the "-pipe" suffix added to them, with aliases in place for the previous
names in order to ensure backwards compat.
2024-02-17 18:14:14 -08:00
James Tucker
c8f6502b02 fix(cli,tcp): replies are sent on the requesting channel
Replace the client socket with replies sent on the other side of the
querying stream, for both UDS and TCP clients. This has two results:
unix socket clients such as komorebic no longer race on the socket bind,
fixing the out of order bind error, and the response mixup conditions
that could occur. Queries over TCP now receive replies over TCP, rather
than replies being sent to a future or in-flight command line client.
2024-02-17 11:03:42 -08:00
LGUG2Z
afd93c34a2 docs(readme): add v0.1.21+ quickstart video 2024-02-16 15:14:15 -08:00
LGUG2Z
d52715a8fa fix(cli): create local appdata dir w/ quickstart
This commit ensures that the $Env:LOCALAPPDATA/komorebi dir is created
by the quickstart command, as it cannot be assumed that this will always
exist, especially on new machines with recent versions of Windows 11.

fix #671
2024-02-16 13:15:44 -08:00
LGUG2Z
549500887f chore(dev): begin v0.1.22-dev 2024-02-16 13:04:51 -08:00
LGUG2Z
40947e39e8 docs(quickstart): ensure $env:localappdata\komorebi creation 2024-02-16 08:51:42 -08:00
LGUG2Z
17a45804b4 chore(release): v0.1.21 2024-02-15 17:56:06 -08:00
LGUG2Z
0e14f25130 fix(scoop): detect shims correctly w/ sysinfo 0.30
This commit is a fix that handles a subtle breaking change in
sysinfo::Process:root() which no longer can be used to see if a process
is a scoop shim.

Instead we can stringify the executable path and see if the absolute exe
path contains the substring "shims".

With this fix duplicate process detection is once again working
correctly.
2024-02-15 17:54:03 -08:00
LGUG2Z
380971edee chore(dev): begin v0.1.21-dev 2024-02-15 14:05:49 -08:00
LGUG2Z
52122c401d chore(release): v0.1.20 2024-02-15 12:55:01 -08:00
LGUG2Z
e5ebf55115 docs(readme): add references to docs website 2024-02-15 12:21:51 -08:00
LGUG2Z
0c75ec37d0 docs(mkdocs): add common workflows section 2024-02-15 12:21:51 -08:00
LGUG2Z
731a4465f1 feat(config): reduce noise in jsonschema output 2024-02-15 12:21:51 -08:00
LGUG2Z
596884e9fd docs(mkdocs): link to ext jsonschema docgen 2024-02-15 12:21:51 -08:00
LGUG2Z
5ef53c2b68 docs(mkdocs): add cli reference 2024-02-15 12:21:51 -08:00
LGUG2Z
a00a85e63f feat(cli): add docgen cmd for mkdocs pages 2024-02-15 12:21:51 -08:00
LGUG2Z
e0aa0ac843 docs(mkdocs): add index and getting started sections 2024-02-15 12:21:51 -08:00
LGUG2Z
3e6e586d5b docs(mkdocs): start building dedicated site 2024-02-15 12:21:51 -08:00
dependabot[bot]
57a3ba6d57 chore(deps): bump h2 from 0.3.22 to 0.3.24
Bumps [h2](https://github.com/hyperium/h2) from 0.3.22 to 0.3.24.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/v0.3.24/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.22...v0.3.24)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-14 20:02:46 -08:00
LGUG2Z
58f47e7440 docs(whkd): target older ps ver with whkdrc sample 2024-02-13 12:50:46 -08:00
dependabot[bot]
fe5bbc8431 chore(deps): bump strum from 0.25.0 to 0.26.1
Bumps [strum](https://github.com/Peternator7/strum) from 0.25.0 to 0.26.1.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits/v0.26.1)

---
updated-dependencies:
- dependency-name: strum
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 07:29:24 -08:00
dependabot[bot]
0ed1a52950 chore(deps): bump regex from 1.10.2 to 1.10.3
Bumps [regex](https://github.com/rust-lang/regex) from 1.10.2 to 1.10.3.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.2...1.10.3)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 07:29:05 -08:00
LGUG2Z
b64c0e127d feat(config): recognize komorebi_config_home for asc path
This commit ensures that the KOMOREBI_CONFIG_HOME environment variable is recognized by the
komorebic check command and the static config loader when used to specify the location of the
applications.yaml file.

resolve #660
2024-02-09 16:49:49 -08:00
LGUG2Z
5d812aa41d feat(cli): read whkd config dir env in check cmd
This commit ensures that komorebic's check command will respect
WHKD_CONFIG_HOME when looking for whkdrc if it has been set by the user.

resolve #649
2024-02-09 16:30:19 -08:00
dependabot[bot]
a682c2a53d chore(deps): bump actions/cache from 3 to 4
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-09 08:43:15 -08:00
dependabot[bot]
cb30099610 chore(deps): bump crossbeam-channel from 0.5.10 to 0.5.11
Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.10 to 0.5.11.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.10...crossbeam-channel-0.5.11)

---
updated-dependencies:
- dependency-name: crossbeam-channel
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-09 08:42:46 -08:00
dependabot[bot]
052eb39276 chore(deps): bump serde_yaml from 0.9.29 to 0.9.31
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.29 to 0.9.31.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.29...0.9.31)

---
updated-dependencies:
- dependency-name: serde_yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-09 08:41:55 -08:00
dependabot[bot]
1033fe5e5e chore(deps): bump reqwest from 0.11.22 to 0.11.24
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.22 to 0.11.24.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.22...v0.11.24)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-09 08:41:43 -08:00
LGUG2Z
d4af033e8c fix(wm): store all logs in tempdir files 2024-01-19 15:54:14 -08:00
LGUG2Z
c8b8757594 fix(wm): add retries to socket connections 2024-01-19 15:53:45 -08:00
KamQb
21a5be0404 fix(component): fix ahk invocation by adding quotes around arguments
Fixes ahk launch uf user has spaces in arguments for ahk (ahk exe path or komorebi home directory)
2024-01-14 20:30:02 -08:00
LGUG2Z
7cb2965969 feat(cli): add asc path validation to check cmd 2024-01-14 15:41:07 -08:00
LGUG2Z
d6e83e1778 feat(cli): add last focused workspace cmd
This commit adds a new komorebic command, focus-last-workspace, which
switches to the last focused workspace on the focused monitor (if there
is one).
2024-01-11 18:51:41 -08:00
dependabot[bot]
8f30612220 chore(deps): bump sysinfo from 0.29.11 to 0.30.5
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.29.11 to 0.30.5.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

---
updated-dependencies:
- dependency-name: sysinfo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 11:51:29 -08:00
LGUG2Z
f3e41490b2 fix(cli): typo in autostart generation 2024-01-08 11:09:17 -08:00
LGUG2Z
5a6dcef7ea fix(wm): update border colour on ws change
This commit ensures that the border colour is set appropriately for
monocle and stack containers after workspace switching operations.

fix #621
2024-01-08 10:22:13 -08:00
dependabot[bot]
0e96cd65b8 chore(deps): bump quote from 1.0.33 to 1.0.35
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.33 to 1.0.35.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.33...1.0.35)

---
updated-dependencies:
- dependency-name: quote
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 10:15:53 -08:00
LGUG2Z
025cb08b3e fix(wm): identify monitor dpi correctly
This commit uses a more reliable Win32 API call to determine the scaling
factor / DPI of user monitors, so that the scale of a window can be
correctly adjusted when moved between monitors with different DPI
settings.

fix #622
2024-01-06 14:30:11 -08:00
LGUG2Z
f9c69e51aa chore(funding): add kofi for paypal sponsors 2024-01-03 11:27:28 -08:00
dependabot[bot]
8a7c75b9a7 chore(deps): bump ctrlc from 3.4.1 to 3.4.2
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.4.1 to 3.4.2.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.4.1...3.4.2)

---
updated-dependencies:
- dependency-name: ctrlc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-03 09:25:24 -08:00
dependabot[bot]
ed3b053323 chore(deps): bump crossbeam-channel from 0.5.8 to 0.5.10
Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.8 to 0.5.10.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.8...crossbeam-channel-0.5.10)

---
updated-dependencies:
- dependency-name: crossbeam-channel
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-03 09:25:15 -08:00
LGUG2Z
a1a7e6c2bf docs(readme): add tech for palestine badge 2024-01-02 13:35:11 -08:00
LGUG2Z
b4ae043b9c feat(cli): add visible-windows cmd
This commit adds a new komorebic command, "visible-windows", to make
tracking down ghost windows easier. The returned JSON structure will try
to use the device id to identify a monitor if it is available, or fall
back to the monitor index. Thanks to raggi on Discord for suggesting
this command!
2024-01-02 10:37:22 -08:00
dependabot[bot]
d2a06a11ac chore(deps): bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-31 19:19:34 -08:00
dependabot[bot]
e6bf30b567 chore(deps): bump serde_yaml from 0.9.27 to 0.9.29
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.27 to 0.9.29.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.27...0.9.29)

---
updated-dependencies:
- dependency-name: serde_yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-31 19:19:25 -08:00
dependabot[bot]
326d5bae42 chore(deps): bump proc-macro2 from 1.0.70 to 1.0.71
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.70 to 1.0.71.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.70...1.0.71)

---
updated-dependencies:
- dependency-name: proc-macro2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-31 19:19:17 -08:00
dependabot[bot]
d23e3e7c51 chore(deps): bump crossbeam-utils from 0.8.17 to 0.8.18
Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) from 0.8.17 to 0.8.18.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.17...crossbeam-utils-0.8.18)

---
updated-dependencies:
- dependency-name: crossbeam-utils
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-31 19:19:10 -08:00
dependabot[bot]
0eeba6cd0e chore(deps): bump uds_windows from 1.0.2 to 1.1.0
Bumps [uds_windows](https://github.com/haraldh/rust_uds_windows) from 1.0.2 to 1.1.0.
- [Release notes](https://github.com/haraldh/rust_uds_windows/releases)
- [Changelog](https://github.com/haraldh/rust_uds_windows/blob/v1.1.0/CHANGELOG.md)
- [Commits](https://github.com/haraldh/rust_uds_windows/compare/v1.0.2...v1.1.0)

---
updated-dependencies:
- dependency-name: uds_windows
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-24 15:00:20 -08:00
LGUG2Z
cf86b2cf98 refactor(windows-rs): use "wide" fns uniformly
This commit builds on @EBNull's comment shedding light on the uses of
the -A and -W functions in the Win32 API, and standardizes the calling
of the -W functions across the project.

Since UTF-16 String handling is a bit lacking in the Rust standard
library, I have pulled in the widestring crate to use the
from_slice_truncate fn to automagically remove all of the trailing null
chars when handling values returned from the various Win32 -W fns.

Comment ref: 657ac441ae (r135643553)
2023-12-23 16:46:30 -08:00
LGUG2Z
e221d96785 fix(wm): handle monitor index pref edge case
This commit handles an edge case where the first registered display
monitor has an index preference that is greater than the current length
of the Ring data structure storing the monitors.

re #612
2023-12-22 18:00:02 -08:00
LGUG2Z
d3bc78097c fix(wm): pass *const u8 to enum_display_devices
Thanks to @ids1024 for pointing out that the failing system calls were
likely due to optimizations being made with the release profile's
opt-level=3 and to @saethlin for pointing out that in the previous
commit I was returning a pointer to a temporary that was about to be
deallocated.

https://fosstodon.org/@ids1024/111627094548141620
https://hachyderm.io/@saethlin/111627135615930244

With this commit, the display ids are now successfully returned from
calls to EnumDisplayDevicesA on release builds.
2023-12-22 17:44:44 -08:00
LGUG2Z
657ac441ae feat(wm): use device id for monitor index pref
This commit begins to build on some of the knowledge shared by EBNull in
allowing users to specify monitor index preferences using physical
device identifiers. This does not presently go all the way to EDIDs, but
the display model and what I believe is a port identifier on the display
adapter(s) can be used to uniquely identify a display in most use cases.

However, I believe I may have unfortunately run into a bug in either
windows-rs or Rust itself, as when the code calling EnumDisplayDevices
is called, it always fails when running a release build, and always
succeeds when running a debug build. This needs to be investigated
further.

re #612
2023-12-22 17:01:59 -08:00
dependabot[bot]
0696a00bd3 chore(deps): bump unsafe-libyaml from 0.2.9 to 0.2.10
Bumps [unsafe-libyaml](https://github.com/dtolnay/unsafe-libyaml) from 0.2.9 to 0.2.10.
- [Release notes](https://github.com/dtolnay/unsafe-libyaml/releases)
- [Commits](https://github.com/dtolnay/unsafe-libyaml/compare/0.2.9...0.2.10)

---
updated-dependencies:
- dependency-name: unsafe-libyaml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-21 23:26:46 -05:00
dependabot[bot]
5111dbdfb9 chore(deps): bump crossbeam-utils from 0.8.16 to 0.8.17
Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) from 0.8.16 to 0.8.17.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.16...crossbeam-utils-0.8.17)

---
updated-dependencies:
- dependency-name: crossbeam-utils
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-21 23:26:34 -05:00
dependabot[bot]
dd12f0fc8a chore(deps): bump thiserror from 1.0.50 to 1.0.51
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.50 to 1.0.51.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.50...1.0.51)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-21 23:26:20 -05:00
dependabot[bot]
76a8695218 chore(deps): bump clap from 4.4.10 to 4.4.11
Bumps [clap](https://github.com/clap-rs/clap) from 4.4.10 to 4.4.11.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.4.10...v4.4.11)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-12 15:49:57 -08:00
LGUG2Z
ddfcf8b76f feat(config): add rudimentary config syntax checks
This commit attempts to introduce miette to provide users with quick
feedback when there may be syntax errors such as trailing commas in
their komorebi.json configuration file.

The lines and columns reported by serde_json don't actually line up with
the visualization of where we want to indicate a syntax error on the
miette Report. Some hackery has been done, but this should be improved
upon. Notably, this hackery does not accurately reflect the location of
a syntax error when the syntax error is a missing comma after a string
value.
2023-12-03 12:56:40 -08:00
LGUG2Z
d9eea34266 chore(just): update justfile 2023-12-03 09:06:35 -08:00
Amr Bashir
7078b065f4 feat(cli): make --config optional for enable-autostart (#596)
* feat(cli): make `--config` optional for `enable-autostart`

* actually make it optional

* remove unnecessary `action` attribute
2023-12-03 09:00:27 -08:00
Amr Bashir
900051a24b feat(cli): add --no-console to autostart without a console window (#598)
* feat(cli): autostart without a console window

This moves `komorebic` logic into a `lib.rs` file and calls it from `main.rs` (normal behavior) and then there is a second binary `komorebic-no-console` binary that uses `#![windows_subsystem = "windows"]` which tells the linker to not attach a console window to this binary.

* Revert "feat(cli): autostart without a console window"

This reverts commit 08494b46dd.

* feat(cli): autostart without a console window

This creates a second binary `komorebic-no-console` binary that uses `#![windows_subsystem = "windows"]` which tells the linker to not attach a console window to this binary and its only job is to run and pass its args to `komorebic`.

* add behind `--no-console` flag

* reference the new binary in wix

* remove no-console

* fix typo
2023-12-03 09:00:04 -08:00
LGUG2Z
1c589491a9 refactor(clippy): apply various lint fixes 2023-12-02 13:47:49 -08:00
LGUG2Z
5a99a688a6 feat(asc): add json schema cmd and output
This commit adds a command to output a JSON Schema for the
applications.yaml file maintained in the
komorebi-application-specific-configuration repo, and also adds an
up-to-date version of the JSON Schema as a file in the root of this
repository so that users can reference it as an autocompletion source.
2023-12-02 13:42:23 -08:00
LGUG2Z
8980e3b16e feat(config): make static config flag optional
This commit makes the --config flag on komorebi.exe optional, and
updates the configuration loading logic to try to find a komorebi.json
file in the HOME_DIR, which is either $Env:KOMOREBI_CONFIG_HOME or
$Env:PROFILE.

This unlocks the way for Amr's PR to make the --config flag optional on
the enable-autostart command.

re #596
2023-12-02 13:27:48 -08:00
LGUG2Z
ca9eccf247 chore(deps): cargo update 2023-12-02 09:17:37 -08:00
LGUG2Z
e04ba0e033 feat(win32): set foregroundlocktimeout explicitly
After another round of deep diving to find a workaround to all of the
mechanisms within Windows that prevent a process from changing the
focused window, I came across this gist which I saw setting
SPI_SETFOREGROUNDLOCKTIMEOUT to 0:
https://gist.github.com/EBNull/1419093

This tentatively seems like it works and it removes the need for the
alt_focus_hack setting.

However, according to this StackOverflow discussion, it seems like on
Win10+ changes to ForegroundLockTimeout in the registry are no longer
respected and changes made via SPI_SETFOREGROUNDLOCKTIMEOUT are not
persisted:
https://stackoverflow.com/questions/73735129/setforegroundwindow-relationship-between-the-foregroundlocktimeout-registry-val

Therefore on starting, komorebi will now check the value with
SPI_GETFOREGROUNDLOCKTIMEOUT and if it is not 0, it will be set to 0.

Logging has been added to inform the user of the changes that are
happening.
2023-12-01 16:21:34 -08:00
LGUG2Z
8afad7246f fix(config): make win32 calls for windows ffm
This commit ensures that the required calls are made to the system to
enable and disable the Windows focus-follows-mouse implementation when
users make changes to the focus_follows_mouse option in the static
config file.

fix #603
2023-11-29 21:44:44 -08:00
dependabot[bot]
8e9d63cd36 chore(deps): bump proc-macro2 from 1.0.69 to 1.0.70
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.69 to 1.0.70.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.69...1.0.70)

---
updated-dependencies:
- dependency-name: proc-macro2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 17:59:04 -08:00
dependabot[bot]
a673c69744 chore(deps): bump sysinfo from 0.29.10 to 0.29.11
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.29.10 to 0.29.11.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

---
updated-dependencies:
- dependency-name: sysinfo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 17:58:55 -08:00
dependabot[bot]
c0b65677a2 chore(deps): bump serde from 1.0.192 to 1.0.193
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.192 to 1.0.193.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.192...v1.0.193)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 17:58:45 -08:00
dependabot[bot]
0cf7147e39 chore(deps): bump openssl from 0.10.59 to 0.10.60
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.59 to 0.10.60.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.59...openssl-v0.10.60)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 17:31:19 -08:00
amrbashir
b39e65642b refactor(rust): cleanup path handling
- Avoids unnecessary string allocation when tracing paths
- Replaces `mut path & path.push()` with `path.join()`
- Avoids unncessary cloning of paths where applicable
- Use `dunce` crate to remove `UNC` prefix
- Improve performance of resolving `~` by avoiding unnecessary string allocations
- Resolve `~`, `$Env:USERPROFILE` and `$HOME` consistenly between different code paths
- Use `PathBuf` instead of `String` for paths in CLI args

I may have missed a couple of places but I think I covered 90% of path handling in the codebase
2023-11-26 15:25:43 -08:00
LGUG2Z
a68f3843b7 feat(cli): add ffm flag to enable-autostart
The user dumbhighrank mentioned on Discord that it was not possible to
call enable-autostart with the --ffm flag, as one might expect to be
able to do, given that it is accepted by the start command. This commit
introduces the --ffm flag for the enable-autostart command.
2023-11-24 14:40:51 -08:00
dependabot[bot]
b3e989c6c7 chore(deps): bump winreg from 0.51.0 to 0.52.0
Bumps [winreg](https://github.com/gentoo90/winreg-rs) from 0.51.0 to 0.52.0.
- [Release notes](https://github.com/gentoo90/winreg-rs/releases)
- [Changelog](https://github.com/gentoo90/winreg-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gentoo90/winreg-rs/compare/v0.51.0...v0.52.0)

---
updated-dependencies:
- dependency-name: winreg
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-22 21:39:52 -08:00
dependabot[bot]
4534a1511e chore(deps): bump tracing-appender from 0.2.2 to 0.2.3
Bumps [tracing-appender](https://github.com/tokio-rs/tracing) from 0.2.2 to 0.2.3.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-appender-0.2.2...tracing-appender-0.2.3)

---
updated-dependencies:
- dependency-name: tracing-appender
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-22 21:39:44 -08:00
dependabot[bot]
1f87e3acd2 chore(deps): bump tracing-subscriber from 0.3.17 to 0.3.18
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.3.17 to 0.3.18.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.17...tracing-subscriber-0.3.18)

---
updated-dependencies:
- dependency-name: tracing-subscriber
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-22 21:39:34 -08:00
LGUG2Z
f67d0c7b9b docs(readme): update donations with link to pcrf 2023-11-22 21:36:49 -08:00
LGUG2Z
aa0277d58c feat(cli): add quickstart cmd
This commit adds a new komorebic quickstart command to handle the
downloading of example configuration files, which is currently done
manually by the user if they are following the quickstart guide on the
README.

re #585
2023-11-19 17:40:51 -08:00
LGUG2Z
42ac13e0bd feat(config): autopopulate matcher for exes
This commit updates the fmt-asc command to automatically populate unset
matching strategies for Exe matching rules to be "Equals"
2023-11-17 17:56:28 -08:00
LGUG2Z
2a1d87d41b fix(cli): pick up static cfg in check cmd 2023-11-16 15:12:08 -08:00
LGUG2Z
0d1595e543 feat(cli): add focused ws padding cmds
This commit adds dedicated komorebic commands for setting the padding
values of the focused workspace and containers.

re #570
2023-11-16 15:05:14 -08:00
LGUG2Z
4283dfb0ba chore(deps): bump windows crates from 0.51 to 0.52 2023-11-16 14:40:27 -08:00
dependabot[bot]
2a6aa09b07 chore(deps): bump schemars from 0.8.15 to 0.8.16
Bumps [schemars](https://github.com/GREsau/schemars) from 0.8.15 to 0.8.16.
- [Release notes](https://github.com/GREsau/schemars/releases)
- [Changelog](https://github.com/GREsau/schemars/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GREsau/schemars/compare/v0.8.15...v0.8.16)

---
updated-dependencies:
- dependency-name: schemars
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-13 08:15:48 -08:00
LGUG2Z
8c6bd13511 fix(ahk): override derive-ahk output for stop cmd
This commit adds a last-second override the string output of the
derive-ahk proc macro for the stop command, which unfortunately ends up
in a broken state in komorebic.lib.ahk with the addition of a 'whkd'
flag in v0.1.19.

fix #578
2023-11-12 18:20:12 -08:00
LGUG2Z
ef61239580 chore(release): v0.1.19 2023-11-10 16:23:53 -08:00
LGUG2Z
96bf37b98d fix(config): disable tiling for ws without layouts
This commit ensures that when a layout or a custom layout is not defined
for a workspace in the static configuration file, Workspace.tile will be
set to false. Thanks to M. Kichel on Discord for pointing out the need
for this!
2023-11-10 12:47:21 -08:00
LGUG2Z
5fd90d222d fix(docs): quote $env:userprofile in quickstart to handle spaces 2023-11-08 07:58:25 -08:00
dependabot[bot]
6ffdc1e90e chore(deps): bump which from 4.4.2 to 5.0.0
Bumps [which](https://github.com/harryfei/which-rs) from 4.4.2 to 5.0.0.
- [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/harryfei/which-rs/commits)

---
updated-dependencies:
- dependency-name: which
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 11:11:35 -08:00
LGUG2Z
2595fa601f fix(config): typo in layered app id loading 2023-11-04 12:08:36 -07:00
LGUG2Z
41cd5ec222 chore(deps): cargo update 2023-11-03 09:46:37 -07:00
dependabot[bot]
e75ab17602 chore(deps): bump serde from 1.0.188 to 1.0.190
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.188 to 1.0.190.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.188...v1.0.190)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-03 09:29:18 -07:00
dependabot[bot]
79dfa45ec4 chore(deps): bump clap from 4.4.6 to 4.4.7
Bumps [clap](https://github.com/clap-rs/clap) from 4.4.6 to 4.4.7.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.4.6...v4.4.7)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-03 09:29:09 -07:00
dependabot[bot]
8771aab3f3 chore(deps): bump quote from 1.0.30 to 1.0.33 (#573)
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.30 to 1.0.33.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.30...1.0.33)

---
updated-dependencies:
- dependency-name: quote
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-03 09:28:47 -07:00
LGUG2Z
f659deb5e3 fix(wm): correct border overflow handling logic
This commit fixes a regression introduced in the regex rule matching
refactor.

Invisible borders should be removed from applications that are not
identified as border overflow applications, not vice versa.

This is because applications that are overflowing their borders
effectively erase the invisible borders, while applications that are not
overflowing their borders leave the system's invisible borders
visibility intact.

It is this latter group that we should be targeting with the
should_remove_border variable.
2023-11-03 09:24:43 -07:00
Kushashwa Ravi Shrimali
e9fb9297e9 feat(cli): add cycle-layout command (#556)
* Command to ToggleLayout

* Just improve logic of figuring out next layout

* Addr review: rename to "Cycle" instead of toggle, and add a small comment

* As per review comments, implement cycle method on DefaultLayout

* I forgot to remove this, my bad

* feat(cli): fixups for cycle-layout cmd

* Update komorebic/src/main.rs

Co-authored-by: Kushashwa Ravi Shrimali <kushashwaravishrimali@gmail.com>

---------

Co-authored-by: LGUG2Z <jadeiqbal@fastmail.com>
Co-authored-by: جاد <LGUG2Z@users.noreply.github.com>
2023-10-26 21:19:24 -07:00
جاد
557d1962a7 Merge pull request #565 from LGUG2Z/dependabot/cargo/proc-macro2-1.0.69
chore(deps): bump proc-macro2 from 1.0.64 to 1.0.69
2023-10-26 16:00:56 -07:00
جاد
d7991d2087 Merge pull request #566 from LGUG2Z/dependabot/cargo/serde_json-1.0.107
chore(deps): bump serde_json from 1.0.103 to 1.0.107
2023-10-26 15:58:33 -07:00
جاد
5606f1c5c4 Merge pull request #567 from LGUG2Z/dependabot/cargo/ctrlc-3.4.1
chore(deps): bump ctrlc from 3.4.0 to 3.4.1
2023-10-26 15:58:17 -07:00
dependabot[bot]
41a627e7dd chore(deps): bump ctrlc from 3.4.0 to 3.4.1
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.4.0...3.4.1)

---
updated-dependencies:
- dependency-name: ctrlc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 14:25:46 +00:00
dependabot[bot]
2b49ade205 chore(deps): bump serde_json from 1.0.103 to 1.0.107
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.103 to 1.0.107.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.103...v1.0.107)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 14:25:38 +00:00
dependabot[bot]
a0bebc7be8 chore(deps): bump proc-macro2 from 1.0.64 to 1.0.69
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.64 to 1.0.69.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.64...1.0.69)

---
updated-dependencies:
- dependency-name: proc-macro2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 14:25:29 +00:00
جاد
038256de6b fix(docs): typo whkrc -> whkdrc 2023-10-22 17:34:56 -07:00
sitiom
8c30b894fe ci(winget): change Winget Releaser job to ubuntu-latest (#518) 2023-10-22 10:58:33 -07:00
LGUG2Z
fce86397a5 feat(cli): add autostart commands
This commit introduce two new commands, enable-autostart and
disable-autostart, to help create shortcuts for users in shell:startup
to automatically start komorebi after logging in.
2023-10-22 10:57:05 -07:00
dependabot[bot]
f55b10caa0 chore(deps): bump sysinfo from 0.29.9 to 0.29.10 (#561)
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.29.9 to 0.29.10.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

---
updated-dependencies:
- dependency-name: sysinfo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-20 08:24:45 -07:00
dependabot[bot]
ce9d23e72e chore(deps): bump tracing from 0.1.37 to 0.1.39 (#562)
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.37 to 0.1.39.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.37...tracing-0.1.39)

---
updated-dependencies:
- dependency-name: tracing
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-20 08:24:33 -07:00
dependabot[bot]
d79e54fad8 chore(deps): bump rustix from 0.37.23 to 0.37.25 (#563)
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.37.23 to 0.37.25.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.37.23...v0.37.25)

---
updated-dependencies:
- dependency-name: rustix
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-20 08:10:44 -07:00
dependabot[bot]
a15c769bfc chore(deps): bump reqwest from 0.11.18 to 0.11.22 (#559)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.18 to 0.11.22.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.18...v0.11.22)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 08:58:59 -07:00
dependabot[bot]
89aa0387d7 chore(deps): bump winreg from 0.50.0 to 0.51.0 (#558)
Bumps [winreg](https://github.com/gentoo90/winreg-rs) from 0.50.0 to 0.51.0.
- [Release notes](https://github.com/gentoo90/winreg-rs/releases)
- [Changelog](https://github.com/gentoo90/winreg-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gentoo90/winreg-rs/compare/v0.50.0...v0.51.0)

---
updated-dependencies:
- dependency-name: winreg
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 08:20:04 -07:00
LGUG2Z
1e23a11b94 docs(readme): update badges 2023-10-08 11:11:03 -07:00
Artemiy
e5a8146927 feat(wm): ultrawide layout resizing (#545)
* Allow different resize constraints for layouts

Change Workspace::enforce_resize_constraints to enforce constraints differently for different layouts
Add enforce_no_resize method for all but bsp layout resize_dimensions

* Add resize constraints for UltrawideVerticalStack layout

Add Workspace::enforce_resize_for_ultrawide method to apply resize
constraints for ultrawide vertical stack layout.

* feat(wm): Use resize_dimensions in calculate for ultrawide layout

Add function calculate_ultrawide_adjustment to calculate adjustments for
individual containers in ultrawide vertical stack layout
Refactor ultrawide layout generation in separate function and use
calculated adjustments

* feat(wm): Enable ultrawide layout in DefaultLayout::resize

* feat(wm): refactor ultrawide resize calculation

Add some helper function and descriptive variable names in calculate_ultrawide_adjustment
Apply clippy lints
2023-10-06 17:33:37 -07:00
LGUG2Z
b048e7c3aa feat(rules): implement all matching strategies
This commit ensures that matching strategies can be used wherever
IdWithIdentifier is used, and that they are respected for users opting
to use the static configuration file format.

Some thought and planning needs to go into how this can be backported to
dynamic configurations via the CLI without breaking existing user
configurations.

re #60
2023-10-06 12:14:58 -07:00
dependabot[bot]
3ff3961381 chore(deps): bump clap from 4.4.2 to 4.4.6
Bumps [clap](https://github.com/clap-rs/clap) from 4.4.2 to 4.4.6.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.4.2...v4.4.6)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 08:10:15 -07:00
LGUG2Z
0797316ee6 feat(rules): add explicit matching strategies
This commit is the first in a series of commits which will pave the way
for regex rule matching support in komorebi.

For now, in order to maintain backwards compat and not break anything,
all rules without a matching strategy will get assigned as using the
"Legacy" strategy.

This and the "Equals" strategy are the only two which have been
implemented so far.

There should not be any breaking changes in this commit, not any
functionality lost for users with pre-existing configurations.

re #60
2023-09-22 15:05:20 -07:00
LGUG2Z
57cc02f083 fix(config): align border opts in st/dyn configs
This commit aligns the border option naming and arguments between the
dynamic and static configuration approaches.

The previously named border_width and border_offset options in the
static config will be replaced by active_window_border_width and
active_window_border_offset in v0.1.19.

Similarly the option for the offset will now take a single signed
integer, as it does when using the komorebic command.

re #526
2023-09-21 12:32:30 -07:00
LGUG2Z
45912745d6 chore(deps): bump windows crates from 0.48 to 0.51 2023-09-12 09:55:09 -07:00
dependabot[bot]
0088ca8cdb chore(deps): bump serde from 1.0.185 to 1.0.188
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.185 to 1.0.188.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.185...v1.0.188)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 16:36:59 -07:00
dependabot[bot]
6c912b660e chore(deps): bump clap from 4.3.19 to 4.4.2
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.19 to 4.4.2.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.3.19...v4.4.2)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 16:36:50 -07:00
dependabot[bot]
f02b7229fd chore(deps): bump serde_yaml from 0.9.23 to 0.9.25
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.23 to 0.9.25.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.23...0.9.25)

---
updated-dependencies:
- dependency-name: serde_yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 16:36:41 -07:00
LGUG2Z
ffaab771f3 fix(cli): remedy regression in start cmd
This commit remedies a regression noticed by user @notkvwu in #493,
which results in 'komorebic start' failing, due to an empty ArgumentList
being passed to the PS Start-Process command.

This has been fixed by ensuring that the ArgumentList is only passed
when the user has specified flags on the start command.

fix #493
2023-09-11 13:33:11 -07:00
LGUG2Z
710a8d76ea feat(cli): add ahk flag to static config start cmd
This commit introduces a new --ahk flag to the start command, which
works similarly to the --whkd, and attempts to load an ahk key binding
configuration script on startup.

The attempt is made from within the komorebic process, rather than the
komorebi process.

resolve #529
2023-09-11 11:26:35 -07:00
dependabot[bot]
09792a7924 chore(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [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/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-10 15:13:05 -07:00
dependabot[bot]
c1061dd3be chore(deps): bump serde from 1.0.179 to 1.0.185
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.179 to 1.0.185.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.179...v1.0.185)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-10 15:09:46 -07:00
dependabot[bot]
f8a096090f chore(deps): bump quote from 1.0.29 to 1.0.30
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.29 to 1.0.30.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.29...1.0.30)

---
updated-dependencies:
- dependency-name: quote
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-10 15:09:39 -07:00
dependabot[bot]
e4ccd45176 chore(deps): bump sysinfo from 0.29.7 to 0.29.9
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.29.7 to 0.29.9.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

---
updated-dependencies:
- dependency-name: sysinfo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-10 15:09:31 -07:00
LGUG2Z
f4e0fb9469 feat(cli): add opt to stop whkd alongside wm
This commit adds a '--whkd' flag to the 'komorebic stop' command, which
will also stop any running instance of whkd when stopping the window
manager.

This flag defaults to false, and should not change the existing
behaviour that users are used to.
2023-09-09 22:02:44 -07:00
LGUG2Z
d8892f3ff2 feat(config): add monitor index prefs to static
This commit adds an "monitor_index_preferences" key to the static config
schema, which was missed during the initial rollout of the static
configuration files. To help with testing, these indexes have also been
exposed on the State struct.

resolve #522
2023-09-01 08:59:22 -07:00
dependabot[bot]
fec56b1971 chore(deps): bump clap from 4.3.12 to 4.3.19
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.12 to 4.3.19.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.3.12...v4.3.19)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-10 10:54:43 -07:00
dependabot[bot]
15aedf1ead chore(deps): bump serde from 1.0.171 to 1.0.179
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.171 to 1.0.179.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.171...v1.0.179)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-10 10:54:31 -07:00
dependabot[bot]
86ed7e1297 chore(deps): bump sysinfo from 0.29.4 to 0.29.7
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.29.4 to 0.29.7.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

---
updated-dependencies:
- dependency-name: sysinfo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-10 10:54:17 -07:00
p1scescom
c132665ac7 fix 2023-08-02 18:22:37 +09:00
Matt Blacker
cfe4062369 fix(config): gen border colours only if set 2023-07-19 08:10:42 -07:00
Matt Blacker
acf201d9bc feat(config): border colours in static config gen 2023-07-19 08:09:16 -07:00
dependabot[bot]
fa4d14799e chore(deps): bump paste from 1.0.13 to 1.0.14
Bumps [paste](https://github.com/dtolnay/paste) from 1.0.13 to 1.0.14.
- [Release notes](https://github.com/dtolnay/paste/releases)
- [Commits](https://github.com/dtolnay/paste/compare/1.0.13...1.0.14)

---
updated-dependencies:
- dependency-name: paste
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 18:10:16 -07:00
dependabot[bot]
6979f4e699 chore(deps): bump serde_json from 1.0.102 to 1.0.103
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.102 to 1.0.103.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.102...v1.0.103)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 18:10:07 -07:00
dependabot[bot]
d3585ad720 chore(deps): bump serde_yaml from 0.9.22 to 0.9.23
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.22 to 0.9.23.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.22...0.9.23)

---
updated-dependencies:
- dependency-name: serde_yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 18:09:58 -07:00
LGUG2Z
e240bc7706 docs(readme): add static conf migration tutorial video 2023-07-15 16:19:45 -07:00
LGUG2Z
0ed732d085 chore(release): v0.1.18 2023-07-14 14:58:58 -07:00
Johnny Nguyen
fa11594103 fix(cli): support for spaces in config path 2023-07-14 14:57:29 -07:00
LGUG2Z
88aaf1f368 docs(readme): add new quickstart video 2023-07-14 11:27:32 -07:00
LGUG2Z
c5bf62fac0 docs(readme): add note on enabling long paths 2023-07-14 11:04:53 -07:00
LGUG2Z
528a0bf9ff docs(readme): fix typo in quickstart 2023-07-14 09:06:58 -07:00
LGUG2Z
f73d1bf0da chore(release): v0.1.17 2023-07-13 08:58:38 -07:00
LGUG2Z
4510cccc3e feat(config): add static json loader and whkd flag
This commit is an implementation of a static JSON configuration loader.

An example komorebi.json configuration file has been added.

The application-specific configurations can be loaded directly from a
file, and workspace configuration can be defined declaratively in the
JSON. Individual rules etc. can also be added directly in the static
configuration as one-offs.

A JSONSchema can be generated using komorebic's static-config-schema
command. This should be added to something like SchemaStore later.

Loading from static configuration is significantly faster on startup, as
the lock does not have to be reacquired for every command that is sent
over the socket.

When loading configuration from a static JSON file, a hotwatch instance
will automatically be created to listen to file changes and apply any
updates to both the global and window manager configuration state.

A new --whkd flag has been added to the komorebic start command to
optionally start whkd in a background process.

A new komorebic command 'generate-static-config' has been added to help
existing users migrate to a static JSON config file. Currently, custom
layout file path information can not be automatically populated in the
output of this command and must be added manually by the user if
required.

A new komorebic command 'fetch-asc' has been added to help users update
to the latest version of the application-specific configurations
in-place.

resolve #427
2023-07-13 08:12:43 -07:00
dependabot[bot]
b5035fbb5d chore(deps): bump sysinfo from 0.29.2 to 0.29.4
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.29.2 to 0.29.4.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

---
updated-dependencies:
- dependency-name: sysinfo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-11 08:57:24 -07:00
dependabot[bot]
1a703690c9 chore(deps): bump serde_yaml from 0.9.21 to 0.9.22
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.21 to 0.9.22.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.21...0.9.22)

---
updated-dependencies:
- dependency-name: serde_yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-11 08:57:14 -07:00
dependabot[bot]
039f69b70b chore(deps): bump clap from 4.3.8 to 4.3.11
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.8 to 4.3.11.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.3.8...v4.3.11)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-11 08:57:02 -07:00
LGUG2Z
f7dccfe0f5 fix(wm): lars' secret sauce for min-width apps
This commit applies a technique shared by Lars from GlazeWM and first
noticed by J.SH on Discord to add the SWP_NOSENDCHANGING flag when
positioning windows to overcome any hard-coded minimum width
restrictions an application might have.
2023-07-09 19:44:44 -07:00
dependabot[bot]
fc7198823b chore(deps): bump quote from 1.0.28 to 1.0.29
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.28 to 1.0.29.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.28...1.0.29)

---
updated-dependencies:
- dependency-name: quote
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-06 18:14:41 -07:00
dependabot[bot]
c3637665e9 chore(deps): bump serde from 1.0.164 to 1.0.165
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.164 to 1.0.165.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.164...v1.0.165)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-06 18:14:30 -07:00
dependabot[bot]
45046a0e1e chore(deps): bump net2 from 0.2.38 to 0.2.39
Bumps [net2](https://github.com/deprecrated/net2-rs) from 0.2.38 to 0.2.39.
- [Commits](https://github.com/deprecrated/net2-rs/compare/0.2.38...0.2.39)

---
updated-dependencies:
- dependency-name: net2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-06 18:14:20 -07:00
Mitsuhiro Tanda
63dee21257 fix(wm): refer AHK_EXE 2023-07-06 18:14:02 -07:00
LGUG2Z
2675f747bb fix(wm): apply custom layouts when containers >= columns
Thanks to @thesobercoder and @olivoil for opening my eyes on this one.

This commit reduces the number of containers required before a custom
layout can be triggered. Please see the closed issue for more discussion
and rationale behind this change.

fix #390
2023-07-01 11:32:52 -07:00
dependabot[bot]
5b9730823e chore(deps): bump strum from 0.24.1 to 0.25.0
Bumps [strum](https://github.com/Peternator7/strum) from 0.24.1 to 0.25.0.
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 11:39:42 -07:00
dependabot[bot]
84da706d64 chore(deps): bump proc-macro2 from 1.0.59 to 1.0.63
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.59 to 1.0.63.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.59...1.0.63)

---
updated-dependencies:
- dependency-name: proc-macro2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 11:39:16 -07:00
dependabot[bot]
cf7a01695e chore(deps): bump clap from 4.3.4 to 4.3.8
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.4 to 4.3.8.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.3.4...v4.3.8)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 11:39:03 -07:00
Yusuf007R
510650cb94 refactor(wm): renaming SwapWorkspacesToMonitor to SwapWorkspacesWithMonitor 2023-06-24 07:04:07 -07:00
Yusuf007R
6fe2290d74 feat(swap-workspaces-monitor): command to swap focused monitor workspaces with another monitor
Basically this commit adds a command that allows you to swap two monitors, well it actually swaps
the workspaces between the monitors.
2023-06-24 07:04:07 -07:00
dependabot[bot]
647f5b7ded chore(deps): bump sysinfo from 0.29.0 to 0.29.2
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.29.0 to 0.29.2.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

---
updated-dependencies:
- dependency-name: sysinfo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-22 08:51:22 -07:00
dependabot[bot]
933122b073 chore(deps): bump serde from 1.0.163 to 1.0.164
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.163 to 1.0.164.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.163...v1.0.164)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-22 08:51:09 -07:00
dependabot[bot]
9b62d5408d chore(deps): bump clap from 4.3.1 to 4.3.4
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.1 to 4.3.4.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.3.1...v4.3.4)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-22 08:50:58 -07:00
LGUG2Z
087b08612d feat(wm): allow f32 width % for custom layouts
This commit allows users to provide an f32 value for the WidthPercentage
on the primary column of a custom layout.
2023-06-22 08:49:47 -07:00
LGUG2Z
c4be0636f7 fix(wm): update border on cycle-move
This commit ensures that the active window border is updated when the
cycle-move command is called.

fix #467
2023-06-14 07:49:47 -07:00
LGUG2Z
6df91d7d40 fix(wm): manually close process handles
ZiN on Discord noted that handles returned by OpenProcess must be closed
manually (this is not implemented in the Drop trait for handle, it
seems)

https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-openprocess#remarks
2023-06-12 16:47:12 -07:00
dependabot[bot]
b0737ff603 chore(deps): bump quote from 1.0.27 to 1.0.28
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.27 to 1.0.28.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.27...1.0.28)

---
updated-dependencies:
- dependency-name: quote
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-08 08:39:50 -07:00
dependabot[bot]
8ff0963203 chore(deps): bump clap from 4.3.0 to 4.3.1
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.3.0...clap_complete-v4.3.1)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-08 08:39:42 -07:00
dependabot[bot]
ce326f31bc chore(deps): bump ctrlc from 3.3.1 to 3.4.0
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.3.1...3.4.0)

---
updated-dependencies:
- dependency-name: ctrlc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-08 08:39:15 -07:00
LGUG2Z
2050d9a3fa fix(wm): add permaignore_classes for electron jank 2023-06-05 09:58:37 -07:00
LGUG2Z
8e47bfdba6 fix(wm): allow any id to override a float rule 2023-06-05 08:45:55 -07:00
LGUG2Z
9103ce2b2b feat(wm): add focus-workspaces cmd
This commit adds a new command, focus-workspaces, to allow the user to
change workspaces across all monitors at the same time. I'm not
convinced of the stability of this command and I would strongly
discourage using komorebi in this manner.

resolve #426
2023-06-03 17:30:43 -07:00
dependabot[bot]
7ba7067c96 chore(deps): bump proc-macro2 from 1.0.57 to 1.0.59
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.57 to 1.0.59.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.57...1.0.59)

---
updated-dependencies:
- dependency-name: proc-macro2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 07:00:19 -07:00
dependabot[bot]
a51f2387aa chore(deps): bump bitflags from 2.2.1 to 2.3.1
Bumps [bitflags](https://github.com/bitflags/bitflags) from 2.2.1 to 2.3.1.
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/2.2.1...2.3.1)

---
updated-dependencies:
- dependency-name: bitflags
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 07:00:07 -07:00
dependabot[bot]
e4189c19ce chore(deps): bump clap from 4.2.7 to 4.3.0
Bumps [clap](https://github.com/clap-rs/clap) from 4.2.7 to 4.3.0.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.2.7...clap_complete-v4.3.0)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 06:59:56 -07:00
dependabot[bot]
1a2be3bc02 chore(deps): bump ctrlc from 3.2.5 to 3.3.1
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.2.5 to 3.3.1.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.2.5...3.3.1)

---
updated-dependencies:
- dependency-name: ctrlc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 08:14:43 -07:00
LGUG2Z
c37ba42825 feat(wm): reintroduce remove-title-bar cmds
This commit reintroduces some old code from the feature/remove-titlebars
branch. This feature is very unstable and it is strongly advised that
nobody actually uses it. Wherever possible, please use the "remove
titlebar" functionality provided directly within an application.
2023-05-15 13:49:45 -07:00
dependabot[bot]
d0c081feae chore(deps): bump proc-macro2 from 1.0.56 to 1.0.57
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.56 to 1.0.57.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.56...1.0.57)

---
updated-dependencies:
- dependency-name: proc-macro2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-15 08:54:00 -07:00
dependabot[bot]
0027c7d1de chore(deps): bump serde from 1.0.162 to 1.0.163
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.162 to 1.0.163.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.162...v1.0.163)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-15 08:53:43 -07:00
349 changed files with 65323 additions and 9164 deletions

3
.czrc Normal file
View File

@@ -0,0 +1,3 @@
{
"path": "cz-conventional-changelog"
}

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

1
.github/FUNDING.yml vendored
View File

@@ -1 +1,2 @@
github: LGUG2Z
ko_fi: lgug2z

View File

@@ -1,52 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]: Short descriptive title"
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See bug
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots and Videos**
Add screenshots and videos to help explain your problem.
**Operating System**
Provide the output of `systeminfo | grep "^OS Name\|^OS Version"`
For example:
```
OS Name: Microsoft Windows 11 Pro
OS Version: 10.0.22000 N/A Build 22000
```
**`komorebic check` Output**
Provide the output of `komorebic check`
For example:
```
No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\LGUG2Z
Looking for configuration files in C:\Users\LGUG2Z
No komorebi configuration found in C:\Users\LGUG2Z
If running 'komorebic start --await-configuration', you will manually have to call the following command to begin tiling: komorebic complete-configuration
```
**Additional context**
Add any other context about the problem here.
In particular, if you have any other AHK scripts or software running that handle any aspect of window management or manipulation

66
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,66 @@
name: Bug report
description: File a bug report
labels: [bug]
title: "[BUG]: "
body:
- type: markdown
attributes:
value: |
Please **do not** open an issue for applications with invisible windows leaving ghost tiles.
You can run `komorebic visible-windows` when the ghost tile is present on your workspace to retrieve the invisible window's exe, class name and title, and then use that information to [ignore the window](https://lgug2z.github.io/komorebi/common-workflows/ignore-windows.html) responsible for the ghost tile.
If it is not possible to uniquely identify the invisible window resulting in a ghost tile through a mixture of exe, title and class identifiers, then this is not a bug with komorebi but a bug with the application you are using, and you should open an issue with the developer(s) of that application.
- type: textarea
validations:
required: true
attributes:
label: Summary
description: >
Please provide a short summary of the bug, along with any information
you feel is relevant to replicating the bug.
You may include screenshots and videos in this section.
- type: textarea
validations:
required: true
attributes:
label: Version Information
description: >
Please provide information about the versions of Windows and komorebi
running on your machine.
Do not submit a bug if you are not using an official version of Windows
such as AtlasOS; only official versions of Windows are supported.
```
systeminfo | findstr /B /C:"OS Name" /B /C:"OS Version"
```
```
komorebic --version
```
- type: textarea
validations:
required: true
attributes:
label: Komorebi Configuration
description: >
Please provide your configuration file (komorebi.json or komorebi.bar.json)
render: json
- type: textarea
validations:
required: true
attributes:
label: Hotkey Configuration
description: >
Please provide your whkdrc or komorebi.ahk hotkey configuration file
render: shell
- type: textarea
validations:
required: true
attributes:
label: Output of komorebic check
description: >
Please provide the output of `komorebic check`
render: shell

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Komorebi Documentation
url: https://lgug2z.github.io/komorebi/
about: Please search the documentation website before opening an issue
- name: Komorebi Quickstart Tutorial Video
url: https://www.youtube.com/watch?v=MMZUAtHbTYY
about: If you are new, please make sure you watch the quickstart tutorial video

View File

@@ -1,20 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEAT]: Short descriptive title"
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@@ -0,0 +1,37 @@
name: Feature request
description: Suggest a new feature (Limited to Sponsors, Commercial License Holders, and Collaborators)
labels: [enhancement]
title: "[FEAT]: "
body:
- type: dropdown
id: Eligibility
attributes:
label: Eligibility
description: >
Feature requests are considered from individuals who are current $5+ monthly sponsors to the project, individual commercial use license holders, and approved collaborators.
Please specify the platform you use to sponsor the project.
options:
- Individual Commercial Use License
- GitHub Sponsor
- Ko-fi Sponsor
- Approved Collaborator
default: 0
validations:
required: true
- type: textarea
validations:
required: true
attributes:
label: Suggestion
description: >
Please share your suggestion here. Be sure to include all necessary context.
If you sponsor on a platform where you use a different username, please specify the username here.
- type: textarea
validations:
required: true
attributes:
label: Alternatives Considered
description: >
Please share share alternatives you have considered here.

7
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,7 @@
<!--
Please follow the Conventional Commits specification.
If you need to update your PR with changes from `master`, please run `git rebase master`.
By opening this PR, you confirm that you have read and understood this project's `CONTRIBUTING.md`.
-->

47
.github/workflows/feature-check.yaml vendored Normal file
View File

@@ -0,0 +1,47 @@
name: Feature Issue Check
on:
issues:
types: [ opened ]
jobs:
auto-close:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Check and close feature issues
uses: actions/github-script@v8
with:
script: |
const issue = context.payload.issue;
if (issue.title.startsWith('[FEAT]: ')) {
const message = `
Feature requests on this repository are only open to current [GitHub sponsors](https://github.com/sponsors/LGUG2Z) on the $5/month tier and above, people with a valid [individual commercial use license](https://lgug2z.com/software/komorebi), and approved contributors.
This issue has been automatically closed until one of those pre-requisites can be validated.
`.replace(/^\s+/gm, '');
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
body: message,
});
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
state: 'closed'
});
await github.rest.issues.lock({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
state: 'resolved'
});
}

View File

@@ -13,115 +13,203 @@ on:
- hotfix/*
tags:
- v*
schedule:
- cron: "30 0 * * 1" # Every Monday at half past midnight UTC
# schedule:
# - cron: "30 0 * * 0" # Every day at 00:30 UTC
workflow_dispatch:
jobs:
build:
name: Build
runs-on: windows-latest
env:
RUSTFLAGS: -Ctarget-feature=+crt-static
strategy:
fail-fast: false
matrix:
target:
- x86_64-pc-windows-msvc
cargo-deny:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Prep cargo dirs
run: |
New-Item "${env:USERPROFILE}\.cargo\registry" -ItemType Directory -Force
New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
shell: powershell
- name: Set environment variables appropriately for the build
run: |
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
echo "TARGET=${{ matrix.target }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
echo "SKIP_TESTS=" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Cache cargo registry, git trees and binaries
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Get rustc commit hash
id: cargo-target-cache
run: |
echo "::set-output name=rust_hash::$(rustc -Vv | grep commit-hash | awk '{print $2}')"
shell: bash
- name: Cache cargo build
uses: actions/cache@v3
with:
path: target
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rustup using win.rustup.rs
run: |
# Disable the download progress bar which can cause perf issues
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --profile=minimal
shell: powershell
- name: Ensure stable toolchain is up to date
run: rustup update stable
shell: bash
- name: Install the target
run: |
rustup target install ${{ matrix.target }}
- name: Run a full build
run: |
cargo build --locked --release --target ${{ matrix.target }}
- name: Create MSI installer
run: |
cargo install cargo-wix
cargo wix -p komorebi --nocapture -I .\wix\main.wxs --target x86_64-pc-windows-msvc
- name: Upload the built artifacts
uses: actions/upload-artifact@v3
with:
name: komorebi-${{ matrix.target }}
path: |
target/${{ matrix.target }}/release/komorebi.exe
target/${{ matrix.target }}/release/komorebic.exe
target/${{ matrix.target }}/release/komorebi.pdb
target/${{ matrix.target }}/release/komorebic.pdb
target/wix/komorebi-*.msi
retention-days: 7
- uses: EmbarkStudios/cargo-deny-action@v2
# Release
- name: Generate changelog
if: startsWith(github.ref, 'refs/tags/v')
shell: bash
build:
strategy:
fail-fast: true
matrix:
platform:
- os-name: Windows-x86_64
runs-on: windows-latest
target: x86_64-pc-windows-msvc
- os-name: Windows-aarch64
runs-on: windows-latest
target: aarch64-pc-windows-msvc
runs-on: ${{ matrix.platform.runs-on }}
permissions: write-all
env:
RUSTFLAGS: -Ctarget-feature=+crt-static -Dwarnings
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- run: rustup toolchain install stable --profile minimal
- run: rustup component add --toolchain stable-x86_64-pc-windows-msvc clippy
- run: rustup toolchain install nightly --allow-downgrade -c rustfmt
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: "true"
cache-all-crates: "true"
key: ${{ matrix.platform.target }}
- run: cargo +nightly fmt --check
- run: cargo clippy
- run: cargo test
- uses: houseabsolute/actions-rust-cross@v1
with:
command: "build"
target: ${{ matrix.platform.target }}
args: "--locked --release"
- run: |
cargo install cargo-wix
cargo wix --no-build -p komorebi --nocapture -I .\wix\main.wxs --target ${{ matrix.platform.target }}
- uses: actions/upload-artifact@v5
with:
name: komorebi-${{ matrix.platform.target }}-${{ github.sha }}
path: |
target/${{ matrix.platform.target }}/release/*.exe
target/${{ matrix.platform.target }}/release/*.pdb
target/wix/komorebi-*.msi
retention-days: 14
nightly:
needs: build
runs-on: windows-latest
permissions: write-all
if: ${{ github.ref == 'refs/heads/master' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' ) }}
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- shell: bash
run: echo "VERSION=nightly" >> $GITHUB_ENV
- uses: actions/download-artifact@v6
- run: |
Compress-Archive -Force ./komorebi-x86_64-pc-windows-msvc-${{ github.sha }}/x86_64-pc-windows-msvc/release/*.exe komorebi-$Env:VERSION-x86_64-pc-windows-msvc.zip
Copy-Item ./komorebi-x86_64-pc-windows-msvc-${{ github.sha }}/wix/*x86_64.msi -Destination ./komorebi-$Env:VERSION-x86_64.msi
echo "$((Get-FileHash komorebi-$Env:VERSION-x86_64-pc-windows-msvc.zip).Hash.ToLower()) komorebi-$Env:VERSION-x86_64-pc-windows-msvc.zip" >checksums.txt
Compress-Archive -Force ./komorebi-aarch64-pc-windows-msvc-${{ github.sha }}/aarch64-pc-windows-msvc/release/*.exe komorebi-$Env:VERSION-aarch64-pc-windows-msvc.zip
Copy-Item ./komorebi-aarch64-pc-windows-msvc-${{ github.sha }}/wix/*aarch64.msi -Destination ./komorebi-$Env:VERSION-aarch64.msi
echo "$((Get-FileHash komorebi-$Env:VERSION-aarch64-pc-windows-msvc.zip).Hash.ToLower()) komorebi-$Env:VERSION-aarch64-pc-windows-msvc.zip" >>checksums.txt
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: "true"
cache-all-crates: "true"
- shell: bash
run: |
if ! type kokai >/dev/null; then cargo install --locked kokai --force; fi
git tag -d nightly || true
git tag nightly
kokai release --no-emoji --add-links github:commits,issues --ref nightly >"CHANGELOG.md"
- shell: bash
run: |
gh release delete nightly --yes || true
git push origin :nightly || true
gh release create nightly \
--target $GITHUB_SHA \
--prerelease \
--title "komorebi nightly (${GITHUB_SHA})" \
--notes-file CHANGELOG.md \
komorebi-nightly-x86_64-pc-windows-msvc.zip \
komorebi-nightly-x86_64.msi \
komorebi-nightly-aarch64-pc-windows-msvc.zip \
komorebi-nightly-aarch64.msi \
checksums.txt
release-dry-run:
needs: build
runs-on: windows-latest
permissions: write-all
if: ${{ github.ref == 'refs/heads/master' }}
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- shell: bash
run: |
TAG=${{ github.event.release.tag_name }}
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- uses: actions/download-artifact@v6
- run: |
Compress-Archive -Force ./komorebi-x86_64-pc-windows-msvc-${{ github.sha }}/x86_64-pc-windows-msvc/release/*.exe komorebi-$Env:VERSION-x86_64-pc-windows-msvc.zip
Copy-Item ./komorebi-x86_64-pc-windows-msvc-${{ github.sha }}/wix/*x86_64.msi -Destination ./komorebi-$Env:VERSION-x86_64.msi
echo "$((Get-FileHash komorebi-$Env:VERSION-x86_64-pc-windows-msvc.zip).Hash.ToLower()) komorebi-$Env:VERSION-x86_64-pc-windows-msvc.zip" >checksums.txt
Compress-Archive -Force ./komorebi-aarch64-pc-windows-msvc-${{ github.sha }}/aarch64-pc-windows-msvc/release/*.exe komorebi-$Env:VERSION-aarch64-pc-windows-msvc.zip
Copy-Item ./komorebi-aarch64-pc-windows-msvc-${{ github.sha }}/wix/*aarch64.msi -Destination ./komorebi-$Env:VERSION-aarch64.msi
echo "$((Get-FileHash komorebi-$Env:VERSION-aarch64-pc-windows-msvc.zip).Hash.ToLower()) komorebi-$Env:VERSION-aarch64-pc-windows-msvc.zip" >>checksums.txt
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: "true"
cache-all-crates: "true"
- shell: bash
run: |
if ! type kokai >/dev/null; then cargo install --locked kokai --force; fi
git tag -d nightly || true
kokai release --no-emoji --add-links github:commits,issues --ref "${{ github.ref_name }}" >"CHANGELOG.md"
- uses: softprops/action-gh-release@v2
with:
draft: true
body_path: "CHANGELOG.md"
files: |
checksums.txt
*.zip
*.msi
release:
needs: build
runs-on: windows-latest
permissions: write-all
if: startsWith(github.ref, 'refs/tags/v')
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- shell: bash
run: |
TAG=${{ github.ref_name }}
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- uses: actions/download-artifact@v6
- run: |
Compress-Archive -Force ./komorebi-x86_64-pc-windows-msvc-${{ github.sha }}/x86_64-pc-windows-msvc/release/*.exe komorebi-$Env:VERSION-x86_64-pc-windows-msvc.zip
Copy-Item ./komorebi-x86_64-pc-windows-msvc-${{ github.sha }}/wix/*x86_64.msi -Destination ./komorebi-$Env:VERSION-x86_64.msi
echo "$((Get-FileHash komorebi-$Env:VERSION-x86_64-pc-windows-msvc.zip).Hash.ToLower()) komorebi-$Env:VERSION-x86_64-pc-windows-msvc.zip" >checksums.txt
Compress-Archive -Force ./komorebi-aarch64-pc-windows-msvc-${{ github.sha }}/aarch64-pc-windows-msvc/release/*.exe komorebi-$Env:VERSION-aarch64-pc-windows-msvc.zip
Copy-Item ./komorebi-aarch64-pc-windows-msvc-${{ github.sha }}/wix/*aarch64.msi -Destination ./komorebi-$Env:VERSION-aarch64.msi
echo "$((Get-FileHash komorebi-$Env:VERSION-aarch64-pc-windows-msvc.zip).Hash.ToLower()) komorebi-$Env:VERSION-aarch64-pc-windows-msvc.zip" >>checksums.txt
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: "true"
cache-all-crates: "true"
- shell: bash
run: |
if ! type kokai >/dev/null; then cargo install --locked kokai --force; fi
git tag -d nightly || true
kokai release --no-emoji --add-links github:commits,issues --ref "$(git tag --points-at HEAD)" >"CHANGELOG.md"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
if: startsWith(github.ref, 'refs/tags/v')
- uses: softprops/action-gh-release@v2
with:
version: latest
args: release --skip-validate --rm-dist --release-notes=CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SCOOP_TOKEN: ${{ secrets.SCOOP_TOKEN }}
- name: Add MSI to release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
files: "target/wix/komorebi-*.msi"
body_path: "CHANGELOG.md"
files: |
checksums.txt
*.zip
*.msi
winget:
name: Publish to WinGet
runs-on: windows-latest
needs: build
runs-on: ubuntu-latest
needs: release
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: vedantmgoyal2009/winget-releaser@v2
- uses: vedantmgoyal2009/winget-releaser@main
with:
identifier: LGUG2Z.komorebi
token: ${{ secrets.WINGET_TOKEN }}

10
.gitignore vendored
View File

@@ -3,4 +3,12 @@
/target
CHANGELOG.md
dummy.go
komorebi.ahk
komorebic/applications.yaml
komorebic/applications.json
/.vs
/bar-schema
/komorebi-schema
/.wrangler
/.xwin-cache
result
/.direnv

View File

@@ -1,44 +0,0 @@
# Adapted from https://jondot.medium.com/shipping-rust-binaries-with-goreleaser-d5aa42a46be0
project_name: komorebi
before:
hooks:
- powershell.exe -Command "New-Item -Path . -Name dummy.go -ItemType file -Force"
- powershell.exe -Command "Add-Content -Path .\dummy.go -Value 'package main'"
- powershell.exe -Command "Add-Content -Path .\dummy.go -Value 'func main() {}'"
builds:
- id: komorebi
main: dummy.go
goos: ["windows"]
goarch: ["amd64"]
binary: komorebi
hooks:
post:
- mkdir -p dist/windows_amd64
- cp ".\target\x86_64-pc-windows-msvc\release\komorebi.exe" ".\dist\komorebi_windows_amd64_v1\komorebi.exe"
- id: komorebic
main: dummy.go
goos: ["windows"]
goarch: ["amd64"]
binary: komorebic
hooks:
post:
- mkdir -p dist/windows_amd64
- cp ".\target\x86_64-pc-windows-msvc\release\komorebic.exe" ".\dist\komorebic_windows_amd64_v1\komorebic.exe"
archives:
- replacements:
windows: pc-windows-msvc
amd64: x86_64
format: zip
name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Arch }}-{{ .Os }}"
files:
- LICENSE
- CHANGELOG.md
checksum:
name_template: checksums.txt
changelog:
sort: asc

40
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,40 @@
# The Komorebi Code of Conduct
This document is based on the [Rust Code of
Conduct](https://www.rust-lang.org/policies/code-of-conduct)
## Conduct
- We are committed to providing a friendly, safe and welcoming environment for
all, regardless of level of experience, gender identity and expression, sexual
orientation, disability, personal appearance, body size, race, ethnicity, age,
religion, nationality, or other similar characteristic.
- Please avoid using overtly sexual aliases or other nicknames that might
detract from a friendly, safe and welcoming environment for all.
- Please be kind and courteous. Theres no need to be mean or rude.
- Respect that people have differences of opinion and that every design or
implementation choice carries a trade-off and numerous costs. There is seldom a
right answer.
- Please keep unstructured critique to a minimum. If you have solid ideas you
want to experiment with, make a fork and see how it works.
- We will exclude you from interaction if you insult, demean or harass anyone.
That is not welcome behavior. We interpret the term “harassment” as including
the definition in the [Citizen Code of
Conduct](https://github.com/stumpsyn/policies/blob/master/citizen_code_of_conduct.md);
if you have any lack of clarity about what might be included in that concept,
please read their definition. In particular, we dont tolerate behavior that
excludes people in socially marginalized groups.
- Private harassment is also unacceptable. No matter who you are, if you feel
you have been or are being harassed or made uncomfortable by a community member,
please contact me immediately. Whether youre a regular contributor or a
newcomer, we care about making this community a safe place for you and weve got
your back.
- Likewise any spamming, trolling, flaming, baiting or other attention-stealing
behavior is not welcome.

45
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,45 @@
# Contributing to the Project
The project is a collection of contributions from both the project leaders and
community members. There are many ways to contribute, this can include content
in the project repositories, as well as contributing in public and private
conversation, assisting users, writing blog posts, and many other ways.
## How contributions are made
Contributions to the project primarily happen in the project source
repositories, but may also occur in other places, such as discussion forums and
public and private discourse.
## Contributing content to the Project
In order for the project leaders to manage sustained progress toward the
project goals and maintain project velocity, focus and quality, the project may
adjust the license terms over time.
Content contributed to the project must therefore be provided under
sufficiently liberal terms to allow these operations to proceed unimpeded. As
such contributions are accepted with the following understanding:
* Contributed content is licensed under the terms of the 0-BSD license
* Contributors accept the terms of the project license at the time of
contribution
By making a contribution, you accept both the current project license terms,
and that all contributions that you have made are provided under the terms of
the 0-BSD license.
## Zero-Clause BSD
```
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
```

7981
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,87 @@
[workspace]
resolver = "2"
members = [
"derive-ahk",
"komorebi",
"komorebi-core",
"komorebic",
"komorebi",
"komorebi-client",
"komorebi-gui",
"komorebic",
"komorebic-no-console",
"komorebi-bar",
"komorebi-themes",
"komorebi-shortcuts",
]
[workspace.dependencies]
clap = { version = "4", features = ["derive", "wrap_help"] }
chrono-tz = "0.10"
chrono = "0.4"
crossbeam-channel = "0.5"
crossbeam-utils = "0.8"
color-eyre = "0.6"
eframe = "0.33"
egui_extras = "0.33"
dirs = "6"
dunce = "1"
hotwatch = "0.5"
schemars = "1.1"
lazy_static = "1"
serde = { version = "1", features = ["derive"] }
serde_json = { package = "serde_json_lenient", version = "0.2" }
serde_yaml = "0.9"
strum = { version = "0.27", features = ["derive"] }
tracing = "0.1"
tracing-appender = "0.2"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
parking_lot = "0.12"
paste = "1"
sysinfo = "0.37"
uds_windows = "1"
win32-display-data = { git = "https://github.com/LGUG2Z/win32-display-data", rev = "8c42d8db257d30fe95bc98c2e5cd8f75da861021" }
windows-numerics = { version = "0.3" }
windows-implement = { version = "0.60" }
windows-interface = { version = "0.59" }
windows-core = { version = "0.62" }
shadow-rs = "1"
which = "8"
[workspace.dependencies.windows]
version = "0.62"
features = [
"Foundation_Numerics",
"Win32_Devices",
"Win32_Devices_Display",
"Win32_System_Com",
"Win32_UI_Shell_Common", # for IObjectArray
"Win32_Foundation",
"Win32_Globalization",
"Win32_Graphics_Dwm",
"Win32_Graphics_Gdi",
"Win32_Graphics_Direct2D",
"Win32_Graphics_Direct2D_Common",
"Win32_Graphics_Dxgi_Common",
"Win32_System_LibraryLoader",
"Win32_System_Power",
"Win32_System_RemoteDesktop",
"Win32_System_Threading",
"Win32_UI_Accessibility",
"Win32_UI_HiDpi",
"Win32_UI_Input_KeyboardAndMouse",
"Win32_UI_Shell",
"Win32_UI_Shell_Common",
"Win32_UI_WindowsAndMessaging",
"Win32_System_SystemServices",
"Win32_System_WindowsProgramming",
"Media",
"Media_Control",
]
[profile.release-opt]
inherits = "release"
lto = true
panic = "abort"
codegen-units = 1
strip = true
[workspace.metadata.crane]
name = "komorebi-workspace"

21
LICENSE
View File

@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2021 Jade Iqbal
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

108
LICENSE.md Normal file
View File

@@ -0,0 +1,108 @@
# Komorebi License
Version 2.0.0
## Acceptance
In order to get any license under these terms, you must agree
to them as both strict obligations and conditions to all
your licenses.
## Copyright License
The licensor grants you a copyright license for the software
to do everything you might do with the software that would
otherwise infringe the licensor's copyright in it for any
permitted purpose. However, you may only distribute the source
code of the software according to the [Distribution License](
#distribution-license), you may only make changes according
to the [Changes License](#changes-license), and you may not
otherwise distribute the software or new works based on the
software.
## Distribution License
The licensor grants you an additional copyright license to
distribute copies of the source code of the software. Your
license to distribute covers distributing the source code of
the software with changes permitted by the [Changes License](
#changes-license).
## Changes License
The licensor grants you an additional copyright license to
make changes for any permitted purpose.
## Patent License
The licensor grants you a patent license for the software that
covers patent claims the licensor can license, or becomes able
to license, that you would infringe by using the software.
## Personal Uses
Personal use for research, experiment, and testing for
the benefit of public knowledge, personal study, private
entertainment, hobby projects, amateur pursuits, or religious
observance, without any anticipated commercial application,
is use for a permitted purpose.
## Fair Use
You may have "fair use" rights for the software under the
law. These terms do not limit them.
## No Other Rights
These terms do not allow you to sublicense or transfer any of
your licenses to anyone else, or prevent the licensor from
granting licenses to anyone else. These terms do not imply
any other licenses.
## Patent Defense
If you make any written claim that the software infringes or
contributes to infringement of any patent, your patent license
for the software granted under these terms ends immediately. If
your company makes such a claim, your patent license ends
immediately for work on behalf of your company.
## Violations
The first time you are notified in writing that you have
violated any of these terms, or done anything with the software
not covered by your licenses, your licenses can nonetheless
continue if you come into full compliance with these terms,
and take practical steps to correct past violations, within
32 days of receiving notice. Otherwise, all your licenses
end immediately.
## No Liability
***As far as the law allows, the software comes as is, without
any warranty or condition, and the licensor will not be liable
to you for any damages arising out of these terms or the use
or nature of the software, under any kind of legal claim.***
## Definitions
The **licensor** is the individual or entity offering these
terms, and the **software** is the software the licensor makes
available under these terms.
**You** refers to the individual or entity agreeing to these
terms.
**Your company** is any legal entity, sole proprietorship,
or other kind of organization that you work for, plus all
organizations that have control over, are under the control of,
or are under common control with that organization. **Control**
means ownership of substantially all the assets of an entity,
or the power to direct its management and policies by vote,
contract, or otherwise. Control can be direct or indirect.
**Your licenses** are all the licenses granted to you for the
software under these terms.
**Use** means anything you do with the software requiring one
of your licenses.

8
PRIVACY.md Normal file
View File

@@ -0,0 +1,8 @@
# Privacy Policy for Komorebi
No data about your device(s) or _komorebi_ usage leave your device.
## Data Maintained by Komorebi
_komorebi_ writes log files to and keeps a list of temporary window handles (HWNDs) currently managed by the process in
the `$Env:LOCALAPPDATA\komorebi\` directory. This directory is owned by the user running the process.

957
README.md

File diff suppressed because it is too large Load Diff

432
check_schema_docs.py Normal file
View File

@@ -0,0 +1,432 @@
#!/usr/bin/env python3
"""
Check schema.json and schema.bar.json for missing docstrings and map them to Rust source files.
This script analyzes the generated JSON schemas and identifies:
1. Type definitions ($defs) missing top-level descriptions
2. Enum variants missing descriptions (in oneOf/anyOf)
3. Enum variants missing titles (object variants in oneOf/anyOf)
4. Struct properties missing descriptions
5. Top-level schema properties missing descriptions
For each missing docstring, it attempts to find the corresponding Rust source
file and line number where the docstring should be added.
"""
import json
import re
import sys
from dataclasses import dataclass
from pathlib import Path
from typing import Optional
@dataclass
class MissingDoc:
type_name: str
kind: str # "type", "variant", "property", "variant_title"
item_name: Optional[str] # variant or property name
rust_file: Optional[str] = None
rust_line: Optional[int] = None
def __str__(self):
location = ""
if self.rust_file and self.rust_line:
location = f" -> {self.rust_file}:{self.rust_line}"
elif self.rust_file:
location = f" -> {self.rust_file}"
if self.kind == "type":
return f"[TYPE] {self.type_name}{location}"
elif self.kind == "variant":
return f"[VARIANT] {self.type_name}::{self.item_name}{location}"
elif self.kind == "variant_title":
return f"[VARIANT_TITLE] {self.type_name}::{self.item_name}{location}"
else:
return f"[PROPERTY] {self.type_name}.{self.item_name}{location}"
@dataclass
class SchemaConfig:
"""Configuration for a schema to check."""
schema_file: str
search_paths: list[str]
display_name: str
def find_rust_definition(
type_name: str, item_name: Optional[str], kind: str, search_paths: list[Path]
) -> tuple[Optional[str], Optional[int]]:
"""Find the Rust file and line number for a type/variant/property definition."""
if kind == "type":
patterns = [
rf"pub\s+enum\s+{type_name}\b",
rf"pub\s+struct\s+{type_name}\b",
]
elif kind in ("variant", "variant_title"):
patterns = [
rf"^\s*{re.escape(item_name)}\s*[,\(\{{]",
rf"^\s*{re.escape(item_name)}\s*$",
rf"^\s*#\[.*\]\s*\n\s*{re.escape(item_name)}\b",
]
else: # property
patterns = [rf"pub\s+{re.escape(item_name)}\s*:"]
for search_path in search_paths:
for rust_file in search_path.rglob("*.rs"):
try:
content = rust_file.read_text()
lines = content.split("\n")
if kind == "type":
for pattern in patterns:
for i, line in enumerate(lines):
if re.search(pattern, line):
return str(rust_file), i + 1
elif kind in ("variant", "variant_title", "property"):
parent_pattern = rf"pub\s+(?:enum|struct)\s+{type_name}\b"
in_type = False
brace_count = 0
found_open_brace = False
for i, line in enumerate(lines):
if re.search(parent_pattern, line):
in_type = True
brace_count = 0
found_open_brace = False
if in_type:
if "{" in line:
found_open_brace = True
brace_count += line.count("{") - line.count("}")
for pattern in patterns:
if re.search(pattern, line):
return str(rust_file), i + 1
if found_open_brace and brace_count <= 0:
in_type = False
except Exception:
continue
return None, None
def _get_variant_identifier(variant: dict) -> str:
"""Extract a meaningful identifier for a variant.
Tries to find the best identifier by checking:
1. A top-level const value (e.g., {"const": "Linear"})
2. A property with a const value (e.g., {"kind": {"const": "Bar"}})
3. The first required property name
4. The type field
5. Falls back to "unknown"
"""
# Check for top-level const value (simple enum variant)
if "const" in variant:
return str(variant["const"])
properties = variant.get("properties", {})
# Check for a property with a const value (common pattern for tagged enums)
for prop_name, prop_def in properties.items():
if isinstance(prop_def, dict) and "const" in prop_def:
return str(prop_def["const"])
# Fall back to first required property name
required = variant.get("required", [])
if required:
return str(required[0])
# Fall back to type
if "type" in variant:
return str(variant["type"])
return "unknown"
def check_type_description(type_name: str, type_def: dict) -> list[MissingDoc]:
"""Check if a type definition has proper documentation."""
missing = []
has_top_description = "description" in type_def
# Always check for top-level type description first
# (except for types that are purely references or have special handling)
needs_type_description = True
# Check oneOf variants (tagged enums with variant descriptions)
if "oneOf" in type_def:
# oneOf types should have a top-level description
if not has_top_description:
missing.append(MissingDoc(type_name, "type", None, None, None))
for variant in type_def["oneOf"]:
# Case 1: Simple const variant (e.g., {"const": "Swap", "description": "..."})
variant_name = variant.get("const") or variant.get("title")
if variant_name and "description" not in variant:
missing.append(
MissingDoc(type_name, "variant", str(variant_name), None, None)
)
# Case 2: String enum inside oneOf (e.g., {"type": "string", "enum": [...]})
# These variants don't have individual descriptions in the schema
if "enum" in variant and variant.get("type") == "string":
for enum_variant in variant["enum"]:
missing.append(
MissingDoc(type_name, "variant", str(enum_variant), None, None)
)
# Case 3: Object variant with properties (e.g., CubicBezier)
if "properties" in variant and "description" not in variant:
for prop_name in variant.get("required", []):
missing.append(
MissingDoc(type_name, "variant", str(prop_name), None, None)
)
# Case 4: Object variant missing title (needed for schema UI display)
# Object variants should have a title or const for proper display in editors
if (
"properties" in variant
and "title" not in variant
and "const" not in variant
):
# Try to find a good identifier for the variant (for display only)
variant_id = _get_variant_identifier(variant)
missing.append(
MissingDoc(type_name, "variant_title", str(variant_id), None, None)
)
# Check anyOf variants - check each variant individually
elif "anyOf" in type_def:
# anyOf types should have a top-level description
if not has_top_description:
missing.append(MissingDoc(type_name, "type", None, None, None))
# Check each variant for description (skip pure $ref and null types)
for variant in type_def["anyOf"]:
# Skip null type variants (used for Option<T>)
if variant.get("type") == "null":
continue
# Skip pure $ref variants (the referenced type is checked separately)
if "$ref" in variant and len(variant) == 1:
continue
# Skip $ref variants that have a description
if "$ref" in variant and "description" in variant:
continue
# Variant with $ref but no description
if "$ref" in variant and "description" not in variant:
# Extract the type name from the $ref
ref_name = variant["$ref"].split("/")[-1]
missing.append(MissingDoc(type_name, "variant", ref_name, None, None))
# Non-ref variant without description
elif "description" not in variant and "$ref" not in variant:
# Try to identify the variant by its type or const
variant_id = variant.get("const") or variant.get("type") or "unknown"
missing.append(
MissingDoc(type_name, "variant", str(variant_id), None, None)
)
# Check for missing title on object variants in anyOf
if (
"properties" in variant
and "title" not in variant
and "const" not in variant
):
variant_id = _get_variant_identifier(variant)
missing.append(
MissingDoc(type_name, "variant_title", str(variant_id), None, None)
)
# Check simple string enums (no oneOf means no variant descriptions possible in schema)
elif "enum" in type_def:
if not has_top_description:
missing.append(MissingDoc(type_name, "type", None, None, None))
# Each enum variant needs a docstring - these can't have descriptions in simple enum format
for variant in type_def["enum"]:
missing.append(MissingDoc(type_name, "variant", str(variant), None, None))
# Check struct properties
elif "properties" in type_def:
# Structs should always have a top-level description
if not has_top_description:
missing.append(MissingDoc(type_name, "type", None, None, None))
for prop_name, prop_def in type_def["properties"].items():
if "description" not in prop_def:
missing.append(MissingDoc(type_name, "property", prop_name, None, None))
# Simple type without description (like PathBuf, Hex)
elif not has_top_description:
# Only flag if it has a concrete type (not just a $ref)
if type_def.get("type") is not None:
missing.append(MissingDoc(type_name, "type", None, None, None))
return missing
def check_top_level_properties(schema: dict, root_type_name: str) -> list[MissingDoc]:
"""Check top-level schema properties for missing descriptions."""
missing = []
properties = schema.get("properties", {})
for prop_name, prop_def in properties.items():
if "description" not in prop_def:
missing.append(
MissingDoc(root_type_name, "property", prop_name, None, None)
)
return missing
def check_schema(
schema_path: Path,
search_paths: list[Path],
project_root: Path,
display_name: str,
) -> tuple[list[MissingDoc], int]:
"""Check a single schema file and return missing docs and exit code."""
if not schema_path.exists():
print(f"Error: {schema_path.name} not found at {schema_path}")
return [], 1
with open(schema_path) as f:
schema = json.load(f)
all_missing: list[MissingDoc] = []
# Check top-level schema properties
root_type_name = schema.get("title", "Root")
all_missing.extend(check_top_level_properties(schema, root_type_name))
# Check all type definitions
for type_name, type_def in sorted(schema.get("$defs", {}).items()):
# Skip PerAnimationPrefixConfig2/3 as they're generated variants
if (
type_name.startswith("PerAnimationPrefixConfig")
and type_name != "PerAnimationPrefixConfig"
):
continue
all_missing.extend(check_type_description(type_name, type_def))
# Find Rust source locations
print(f"Scanning Rust source files for {display_name}...", file=sys.stderr)
for doc in all_missing:
doc.rust_file, doc.rust_line = find_rust_definition(
doc.type_name, doc.item_name, doc.kind, search_paths
)
if doc.rust_file:
try:
doc.rust_file = str(Path(doc.rust_file).relative_to(project_root))
except ValueError:
pass
return all_missing, 0
def print_results(all_missing: list[MissingDoc], display_name: str) -> None:
"""Print the results for a schema check."""
# Group by file
by_file: dict[str, list[MissingDoc]] = {}
external: list[MissingDoc] = []
for doc in all_missing:
if doc.rust_file:
by_file.setdefault(doc.rust_file, []).append(doc)
else:
external.append(doc)
# Print summary
print("\n" + "=" * 70)
print(f"MISSING DOCSTRINGS IN SCHEMA ({display_name})")
print("=" * 70)
type_count = sum(1 for d in all_missing if d.kind == "type")
variant_count = sum(1 for d in all_missing if d.kind == "variant")
variant_title_count = sum(1 for d in all_missing if d.kind == "variant_title")
prop_count = sum(1 for d in all_missing if d.kind == "property")
print(f"\nTotal: {len(all_missing)} missing docstrings/titles")
print(f" - {type_count} types")
print(f" - {variant_count} variants")
print(f" - {variant_title_count} variant titles")
print(f" - {prop_count} properties")
# Print by file
for rust_file in sorted(by_file.keys()):
docs = sorted(by_file[rust_file], key=lambda d: d.rust_line or 0)
print(f"\n{rust_file}:")
print("-" * len(rust_file))
for doc in docs:
print(f" {doc}")
# Print external items (types not found in source)
if external:
print(f"\nExternal/Unknown location:")
print("-" * 25)
for doc in external:
print(f" {doc}")
print("\n" + "=" * 70)
def main():
project_root = Path.cwd()
# Define schemas to check with their respective search paths
schemas = [
SchemaConfig(
schema_file="schema.json",
search_paths=["komorebi/src", "komorebi-themes/src"],
display_name="komorebi",
),
SchemaConfig(
schema_file="schema.bar.json",
search_paths=["komorebi-bar/src", "komorebi-themes/src"],
display_name="komorebi-bar",
),
]
total_missing = 0
has_errors = False
for schema_config in schemas:
schema_path = project_root / schema_config.schema_file
search_paths = [
project_root / p
for p in schema_config.search_paths
if (project_root / p).exists()
]
missing, error_code = check_schema(
schema_path,
search_paths,
project_root,
schema_config.display_name,
)
if error_code != 0:
has_errors = True
continue
print_results(missing, schema_config.display_name)
total_missing += len(missing)
# Print combined summary
if len(schemas) > 1:
print("\n" + "=" * 70)
print("COMBINED SUMMARY")
print("=" * 70)
print(f"Total missing docstrings across all schemas: {total_missing}")
print("=" * 70)
if has_errors:
return 1
return 1 if total_missing > 0 else 0
if __name__ == "__main__":
sys.exit(main())

123
deny.toml Normal file
View File

@@ -0,0 +1,123 @@
[graph]
targets = [
"x86_64-pc-windows-msvc",
"i686-pc-windows-msvc",
"aarch64-pc-windows-msvc",
]
all-features = false
no-default-features = false
[output]
feature-depth = 1
[advisories]
ignore = [
{ id = "RUSTSEC-2020-0016", reason = "local tcp connectivity is an opt-in feature, and there is no upgrade path for TcpStreamExt" },
{ id = "RUSTSEC-2024-0436", reason = "paste being unmaintained is not an issue in our use" },
{ id = "RUSTSEC-2024-0320", reason = "not using any yaml features from this library" },
{ id = "RUSTSEC-2025-0056", reason = "only used for colour palette generation" },
]
[licenses]
allow = [
"0BSD",
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"Artistic-2.0",
"BSD-2-Clause",
"BSD-3-Clause",
"BSL-1.0",
"CC0-1.0",
"ISC",
"MIT",
"MIT-0",
"MPL-2.0",
"OFL-1.1",
"Ubuntu-font-1.0",
"Unicode-3.0",
"Zlib",
"LicenseRef-Komorebi-2.0",
]
confidence-threshold = 0.8
[[licenses.clarify]]
crate = "komorebi"
expression = "LicenseRef-Komorebi-2.0"
license-files = []
[[licenses.clarify]]
crate = "komorebi-client"
expression = "LicenseRef-Komorebi-2.0"
license-files = []
[[licenses.clarify]]
crate = "komorebic"
expression = "LicenseRef-Komorebi-2.0"
license-files = []
[[licenses.clarify]]
crate = "komorebic-no-console"
expression = "LicenseRef-Komorebi-2.0"
license-files = []
[[licenses.clarify]]
crate = "komorebi-themes"
expression = "LicenseRef-Komorebi-2.0"
license-files = []
[[licenses.clarify]]
crate = "komorebi-gui"
expression = "LicenseRef-Komorebi-2.0"
license-files = []
[[licenses.clarify]]
crate = "komorebi-bar"
expression = "LicenseRef-Komorebi-2.0"
license-files = []
[[licenses.clarify]]
crate = "komorebi-shortcuts"
expression = "LicenseRef-Komorebi-2.0"
license-files = []
[[licenses.clarify]]
crate = "whkd-core"
expression = "LicenseRef-Komorebi-2.0"
license-files = []
[[licenses.clarify]]
crate = "whkd-parser"
expression = "LicenseRef-Komorebi-2.0"
license-files = []
[[licenses.clarify]]
crate = "base16-egui-themes"
expression = "MIT"
license-files = []
[[licenses.clarify]]
crate = "win32-display-data"
expression = "0BSD"
license-files = []
[bans]
multiple-versions = "allow"
wildcards = "allow"
highlight = "all"
workspace-default-features = "allow"
external-default-features = "allow"
[sources]
unknown-registry = "deny"
unknown-git = "deny"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
allow-git = [
"https://github.com/LGUG2Z/base16-egui-themes",
"https://github.com/LGUG2Z/windows-icons",
"https://github.com/LGUG2Z/win32-display-data",
"https://github.com/LGUG2Z/flavours",
"https://github.com/LGUG2Z/base16_color_scheme",
"https://github.com/LGUG2Z/whkd",
"https://github.com/LGUG2Z/catppuccin-egui",
"https://github.com/amPerl/egui-phosphor",
]

987
dependencies.json Normal file
View File

@@ -0,0 +1,987 @@
{
"licenses": [
[
"0BSD",
[
"adler 1.0.2 registry+https://github.com/rust-lang/crates.io-index",
"adler2 2.0.1 registry+https://github.com/rust-lang/crates.io-index",
"win32-display-data 0.1.0 git+https://github.com/LGUG2Z/win32-display-data?rev=8c42d8db257d30fe95bc98c2e5cd8f75da861021"
]
],
[
"Apache-2.0",
[
"ab_glyph 0.2.32 registry+https://github.com/rust-lang/crates.io-index",
"ab_glyph_rasterizer 0.1.10 registry+https://github.com/rust-lang/crates.io-index",
"accesskit 0.21.1 registry+https://github.com/rust-lang/crates.io-index",
"accesskit_consumer 0.31.0 registry+https://github.com/rust-lang/crates.io-index",
"accesskit_windows 0.29.2 registry+https://github.com/rust-lang/crates.io-index",
"accesskit_winit 0.29.2 registry+https://github.com/rust-lang/crates.io-index",
"adler 1.0.2 registry+https://github.com/rust-lang/crates.io-index",
"adler2 2.0.1 registry+https://github.com/rust-lang/crates.io-index",
"ahash 0.8.12 registry+https://github.com/rust-lang/crates.io-index",
"aligned 0.4.3 registry+https://github.com/rust-lang/crates.io-index",
"allocator-api2 0.2.21 registry+https://github.com/rust-lang/crates.io-index",
"anstream 0.6.21 registry+https://github.com/rust-lang/crates.io-index",
"anstyle 1.0.13 registry+https://github.com/rust-lang/crates.io-index",
"anstyle-parse 0.2.7 registry+https://github.com/rust-lang/crates.io-index",
"anstyle-query 1.1.5 registry+https://github.com/rust-lang/crates.io-index",
"anstyle-wincon 3.0.11 registry+https://github.com/rust-lang/crates.io-index",
"anyhow 1.0.100 registry+https://github.com/rust-lang/crates.io-index",
"approx 0.3.2 registry+https://github.com/rust-lang/crates.io-index",
"arboard 3.6.1 registry+https://github.com/rust-lang/crates.io-index",
"arrayvec 0.7.6 registry+https://github.com/rust-lang/crates.io-index",
"as-slice 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
"atomic-waker 1.1.2 registry+https://github.com/rust-lang/crates.io-index",
"autocfg 1.5.0 registry+https://github.com/rust-lang/crates.io-index",
"backtrace 0.3.76 registry+https://github.com/rust-lang/crates.io-index",
"backtrace-ext 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
"base16_color_scheme 0.3.2 git+https://github.com/LGUG2Z/base16_color_scheme",
"base64 0.22.1 registry+https://github.com/rust-lang/crates.io-index",
"beef 0.5.2 registry+https://github.com/rust-lang/crates.io-index",
"bit_field 0.10.3 registry+https://github.com/rust-lang/crates.io-index",
"bitflags 1.3.2 registry+https://github.com/rust-lang/crates.io-index",
"bitflags 2.10.0 registry+https://github.com/rust-lang/crates.io-index",
"bitstream-io 4.9.0 registry+https://github.com/rust-lang/crates.io-index",
"block-buffer 0.10.4 registry+https://github.com/rust-lang/crates.io-index",
"bytemuck 1.24.0 registry+https://github.com/rust-lang/crates.io-index",
"bytemuck_derive 1.10.2 registry+https://github.com/rust-lang/crates.io-index",
"cc 1.2.51 registry+https://github.com/rust-lang/crates.io-index",
"cfg-if 0.1.10 registry+https://github.com/rust-lang/crates.io-index",
"cfg-if 1.0.4 registry+https://github.com/rust-lang/crates.io-index",
"chrono 0.4.42 registry+https://github.com/rust-lang/crates.io-index",
"chrono-tz 0.10.4 registry+https://github.com/rust-lang/crates.io-index",
"clap 4.5.54 registry+https://github.com/rust-lang/crates.io-index",
"clap_builder 4.5.54 registry+https://github.com/rust-lang/crates.io-index",
"clap_derive 4.5.49 registry+https://github.com/rust-lang/crates.io-index",
"clap_lex 0.7.6 registry+https://github.com/rust-lang/crates.io-index",
"color-eyre 0.6.5 registry+https://github.com/rust-lang/crates.io-index",
"color-spantrace 0.3.0 registry+https://github.com/rust-lang/crates.io-index",
"colorchoice 1.0.4 registry+https://github.com/rust-lang/crates.io-index",
"core2 0.4.0 registry+https://github.com/rust-lang/crates.io-index",
"cpufeatures 0.2.17 registry+https://github.com/rust-lang/crates.io-index",
"crc32fast 1.5.0 registry+https://github.com/rust-lang/crates.io-index",
"crossbeam-channel 0.5.15 registry+https://github.com/rust-lang/crates.io-index",
"crossbeam-deque 0.8.6 registry+https://github.com/rust-lang/crates.io-index",
"crossbeam-epoch 0.9.18 registry+https://github.com/rust-lang/crates.io-index",
"crossbeam-utils 0.8.21 registry+https://github.com/rust-lang/crates.io-index",
"crypto-common 0.1.7 registry+https://github.com/rust-lang/crates.io-index",
"ctrlc 3.5.1 registry+https://github.com/rust-lang/crates.io-index",
"cursor-icon 1.2.0 registry+https://github.com/rust-lang/crates.io-index",
"curve25519-dalek-derive 0.1.1 registry+https://github.com/rust-lang/crates.io-index",
"deflate 0.8.6 registry+https://github.com/rust-lang/crates.io-index",
"deranged 0.5.5 registry+https://github.com/rust-lang/crates.io-index",
"digest 0.10.7 registry+https://github.com/rust-lang/crates.io-index",
"dirs 3.0.2 registry+https://github.com/rust-lang/crates.io-index",
"dirs 4.0.0 registry+https://github.com/rust-lang/crates.io-index",
"dirs 6.0.0 registry+https://github.com/rust-lang/crates.io-index",
"dirs-sys 0.3.7 registry+https://github.com/rust-lang/crates.io-index",
"dirs-sys 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
"displaydoc 0.2.5 registry+https://github.com/rust-lang/crates.io-index",
"document-features 0.2.12 registry+https://github.com/rust-lang/crates.io-index",
"dpi 0.1.2 registry+https://github.com/rust-lang/crates.io-index",
"dunce 1.0.5 registry+https://github.com/rust-lang/crates.io-index",
"dyn-clone 1.0.20 registry+https://github.com/rust-lang/crates.io-index",
"ecolor 0.33.3 registry+https://github.com/rust-lang/crates.io-index",
"ed25519 2.2.3 registry+https://github.com/rust-lang/crates.io-index",
"eframe 0.33.3 registry+https://github.com/rust-lang/crates.io-index",
"egui 0.33.3 registry+https://github.com/rust-lang/crates.io-index",
"egui-phosphor 0.10.0 git+https://github.com/amPerl/egui-phosphor?rev=d13688738478ecd12b426e3e74c59d6577a85b59",
"egui-winit 0.33.3 registry+https://github.com/rust-lang/crates.io-index",
"egui_extras 0.33.3 registry+https://github.com/rust-lang/crates.io-index",
"egui_glow 0.33.3 registry+https://github.com/rust-lang/crates.io-index",
"either 1.15.0 registry+https://github.com/rust-lang/crates.io-index",
"emath 0.33.3 registry+https://github.com/rust-lang/crates.io-index",
"encoding_rs 0.8.35 registry+https://github.com/rust-lang/crates.io-index",
"enum-map 2.7.3 registry+https://github.com/rust-lang/crates.io-index",
"enum-map-derive 0.17.0 registry+https://github.com/rust-lang/crates.io-index",
"env_home 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
"epaint 0.33.3 registry+https://github.com/rust-lang/crates.io-index",
"epaint_default_fonts 0.33.3 registry+https://github.com/rust-lang/crates.io-index",
"equivalent 1.0.2 registry+https://github.com/rust-lang/crates.io-index",
"eyre 0.6.12 registry+https://github.com/rust-lang/crates.io-index",
"fastrand 2.3.0 registry+https://github.com/rust-lang/crates.io-index",
"fdeflate 0.3.7 registry+https://github.com/rust-lang/crates.io-index",
"filetime 0.2.26 registry+https://github.com/rust-lang/crates.io-index",
"find-msvc-tools 0.1.6 registry+https://github.com/rust-lang/crates.io-index",
"flate2 1.1.5 registry+https://github.com/rust-lang/crates.io-index",
"fnv 1.0.7 registry+https://github.com/rust-lang/crates.io-index",
"form_urlencoded 1.2.2 registry+https://github.com/rust-lang/crates.io-index",
"futures 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
"futures-channel 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
"futures-core 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
"futures-executor 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
"futures-io 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
"futures-macro 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
"futures-sink 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
"futures-task 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
"futures-util 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
"getrandom 0.1.16 registry+https://github.com/rust-lang/crates.io-index",
"getrandom 0.2.16 registry+https://github.com/rust-lang/crates.io-index",
"getrandom 0.3.4 registry+https://github.com/rust-lang/crates.io-index",
"gif 0.11.4 registry+https://github.com/rust-lang/crates.io-index",
"gif 0.14.1 registry+https://github.com/rust-lang/crates.io-index",
"git2 0.20.3 registry+https://github.com/rust-lang/crates.io-index",
"gl_generator 0.14.0 registry+https://github.com/rust-lang/crates.io-index",
"glob 0.3.3 registry+https://github.com/rust-lang/crates.io-index",
"glow 0.16.0 registry+https://github.com/rust-lang/crates.io-index",
"glutin 0.32.3 registry+https://github.com/rust-lang/crates.io-index",
"glutin_egl_sys 0.7.1 registry+https://github.com/rust-lang/crates.io-index",
"glutin_wgl_sys 0.6.1 registry+https://github.com/rust-lang/crates.io-index",
"half 2.7.1 registry+https://github.com/rust-lang/crates.io-index",
"hashbrown 0.12.3 registry+https://github.com/rust-lang/crates.io-index",
"hashbrown 0.14.5 registry+https://github.com/rust-lang/crates.io-index",
"hashbrown 0.15.5 registry+https://github.com/rust-lang/crates.io-index",
"hashbrown 0.16.1 registry+https://github.com/rust-lang/crates.io-index",
"heck 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
"hex 0.4.3 registry+https://github.com/rust-lang/crates.io-index",
"hex_color 3.0.0 registry+https://github.com/rust-lang/crates.io-index",
"hotwatch 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
"http 1.4.0 registry+https://github.com/rust-lang/crates.io-index",
"httparse 1.10.1 registry+https://github.com/rust-lang/crates.io-index",
"hyper-tls 0.6.0 registry+https://github.com/rust-lang/crates.io-index",
"iana-time-zone 0.1.64 registry+https://github.com/rust-lang/crates.io-index",
"ident_case 1.0.1 registry+https://github.com/rust-lang/crates.io-index",
"idna 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
"idna_adapter 1.2.1 registry+https://github.com/rust-lang/crates.io-index",
"image 0.25.9 registry+https://github.com/rust-lang/crates.io-index",
"image-webp 0.2.4 registry+https://github.com/rust-lang/crates.io-index",
"imgref 1.12.0 registry+https://github.com/rust-lang/crates.io-index",
"indenter 0.3.4 registry+https://github.com/rust-lang/crates.io-index",
"indexmap 1.9.3 registry+https://github.com/rust-lang/crates.io-index",
"indexmap 2.13.0 registry+https://github.com/rust-lang/crates.io-index",
"ipnet 2.11.0 registry+https://github.com/rust-lang/crates.io-index",
"iri-string 0.7.10 registry+https://github.com/rust-lang/crates.io-index",
"is_debug 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
"is_terminal_polyfill 1.70.2 registry+https://github.com/rust-lang/crates.io-index",
"itertools 0.14.0 registry+https://github.com/rust-lang/crates.io-index",
"itoa 1.0.17 registry+https://github.com/rust-lang/crates.io-index",
"jobserver 0.1.34 registry+https://github.com/rust-lang/crates.io-index",
"jpeg-decoder 0.1.22 registry+https://github.com/rust-lang/crates.io-index",
"khronos_api 3.1.0 registry+https://github.com/rust-lang/crates.io-index",
"lazy_static 1.5.0 registry+https://github.com/rust-lang/crates.io-index",
"libc 0.2.180 registry+https://github.com/rust-lang/crates.io-index",
"libgit2-sys 0.18.3+1.9.2 registry+https://github.com/rust-lang/crates.io-index",
"libz-sys 1.1.23 registry+https://github.com/rust-lang/crates.io-index",
"linked-hash-map 0.5.6 registry+https://github.com/rust-lang/crates.io-index",
"litrs 1.0.0 registry+https://github.com/rust-lang/crates.io-index",
"lock_api 0.4.14 registry+https://github.com/rust-lang/crates.io-index",
"log 0.4.29 registry+https://github.com/rust-lang/crates.io-index",
"logos 0.14.4 registry+https://github.com/rust-lang/crates.io-index",
"logos-codegen 0.14.4 registry+https://github.com/rust-lang/crates.io-index",
"logos-derive 0.14.4 registry+https://github.com/rust-lang/crates.io-index",
"miette 7.6.0 registry+https://github.com/rust-lang/crates.io-index",
"miette-derive 7.6.0 registry+https://github.com/rust-lang/crates.io-index",
"mime 0.3.17 registry+https://github.com/rust-lang/crates.io-index",
"minimal-lexical 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
"miniz_oxide 0.4.4 registry+https://github.com/rust-lang/crates.io-index",
"miniz_oxide 0.8.9 registry+https://github.com/rust-lang/crates.io-index",
"miow 0.6.1 registry+https://github.com/rust-lang/crates.io-index",
"moxcms 0.7.11 registry+https://github.com/rust-lang/crates.io-index",
"native-tls 0.2.14 registry+https://github.com/rust-lang/crates.io-index",
"net2 0.2.39 registry+https://github.com/rust-lang/crates.io-index",
"nohash-hasher 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
"ntapi 0.4.2 registry+https://github.com/rust-lang/crates.io-index",
"num 0.4.3 registry+https://github.com/rust-lang/crates.io-index",
"num-bigint 0.4.6 registry+https://github.com/rust-lang/crates.io-index",
"num-complex 0.4.6 registry+https://github.com/rust-lang/crates.io-index",
"num-conv 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
"num-derive 0.4.2 registry+https://github.com/rust-lang/crates.io-index",
"num-integer 0.1.46 registry+https://github.com/rust-lang/crates.io-index",
"num-iter 0.1.45 registry+https://github.com/rust-lang/crates.io-index",
"num-rational 0.3.2 registry+https://github.com/rust-lang/crates.io-index",
"num-rational 0.4.2 registry+https://github.com/rust-lang/crates.io-index",
"num-traits 0.2.19 registry+https://github.com/rust-lang/crates.io-index",
"object 0.32.2 registry+https://github.com/rust-lang/crates.io-index",
"once_cell 1.21.3 registry+https://github.com/rust-lang/crates.io-index",
"once_cell_polyfill 1.70.2 registry+https://github.com/rust-lang/crates.io-index",
"owned_ttf_parser 0.25.1 registry+https://github.com/rust-lang/crates.io-index",
"palette 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
"palette_derive 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
"parking_lot 0.12.5 registry+https://github.com/rust-lang/crates.io-index",
"parking_lot_core 0.9.12 registry+https://github.com/rust-lang/crates.io-index",
"paste 1.0.15 registry+https://github.com/rust-lang/crates.io-index",
"pastey 0.1.1 registry+https://github.com/rust-lang/crates.io-index",
"percent-encoding 2.3.2 registry+https://github.com/rust-lang/crates.io-index",
"pin-project-lite 0.2.16 registry+https://github.com/rust-lang/crates.io-index",
"pin-utils 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
"pkg-config 0.3.32 registry+https://github.com/rust-lang/crates.io-index",
"png 0.16.8 registry+https://github.com/rust-lang/crates.io-index",
"png 0.18.0 registry+https://github.com/rust-lang/crates.io-index",
"powerfmt 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
"ppv-lite86 0.2.21 registry+https://github.com/rust-lang/crates.io-index",
"proc-macro2 1.0.105 registry+https://github.com/rust-lang/crates.io-index",
"profiling 1.0.17 registry+https://github.com/rust-lang/crates.io-index",
"profiling-procmacros 1.0.17 registry+https://github.com/rust-lang/crates.io-index",
"psm 0.1.28 registry+https://github.com/rust-lang/crates.io-index",
"pxfm 0.1.27 registry+https://github.com/rust-lang/crates.io-index",
"qoi 0.4.1 registry+https://github.com/rust-lang/crates.io-index",
"quick-error 2.0.1 registry+https://github.com/rust-lang/crates.io-index",
"quote 1.0.43 registry+https://github.com/rust-lang/crates.io-index",
"rand 0.7.3 registry+https://github.com/rust-lang/crates.io-index",
"rand 0.8.5 registry+https://github.com/rust-lang/crates.io-index",
"rand 0.9.2 registry+https://github.com/rust-lang/crates.io-index",
"rand_chacha 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
"rand_chacha 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
"rand_chacha 0.9.0 registry+https://github.com/rust-lang/crates.io-index",
"rand_core 0.5.1 registry+https://github.com/rust-lang/crates.io-index",
"rand_core 0.6.4 registry+https://github.com/rust-lang/crates.io-index",
"rand_core 0.9.3 registry+https://github.com/rust-lang/crates.io-index",
"rand_pcg 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
"raw-window-handle 0.6.2 registry+https://github.com/rust-lang/crates.io-index",
"rayon 1.11.0 registry+https://github.com/rust-lang/crates.io-index",
"rayon-core 1.13.0 registry+https://github.com/rust-lang/crates.io-index",
"ref-cast 1.0.25 registry+https://github.com/rust-lang/crates.io-index",
"ref-cast-impl 1.0.25 registry+https://github.com/rust-lang/crates.io-index",
"regex 1.12.2 registry+https://github.com/rust-lang/crates.io-index",
"regex-automata 0.4.13 registry+https://github.com/rust-lang/crates.io-index",
"regex-syntax 0.8.8 registry+https://github.com/rust-lang/crates.io-index",
"reqwest 0.12.28 registry+https://github.com/rust-lang/crates.io-index",
"roxmltree 0.20.0 registry+https://github.com/rust-lang/crates.io-index",
"rustc-demangle 0.1.26 registry+https://github.com/rust-lang/crates.io-index",
"rustc_version 0.4.1 registry+https://github.com/rust-lang/crates.io-index",
"rustls-pki-types 1.13.2 registry+https://github.com/rust-lang/crates.io-index",
"ryu 1.0.22 registry+https://github.com/rust-lang/crates.io-index",
"scopeguard 1.2.0 registry+https://github.com/rust-lang/crates.io-index",
"semver 1.0.27 registry+https://github.com/rust-lang/crates.io-index",
"serde 1.0.228 registry+https://github.com/rust-lang/crates.io-index",
"serde_core 1.0.228 registry+https://github.com/rust-lang/crates.io-index",
"serde_derive 1.0.228 registry+https://github.com/rust-lang/crates.io-index",
"serde_derive_internals 0.29.1 registry+https://github.com/rust-lang/crates.io-index",
"serde_json 1.0.149 registry+https://github.com/rust-lang/crates.io-index",
"serde_json_lenient 0.2.4 registry+https://github.com/rust-lang/crates.io-index",
"serde_urlencoded 0.7.1 registry+https://github.com/rust-lang/crates.io-index",
"serde_variant 0.1.3 registry+https://github.com/rust-lang/crates.io-index",
"serde_with 3.16.1 registry+https://github.com/rust-lang/crates.io-index",
"serde_with_macros 3.16.1 registry+https://github.com/rust-lang/crates.io-index",
"serde_yaml 0.8.26 registry+https://github.com/rust-lang/crates.io-index",
"serde_yaml 0.9.34+deprecated registry+https://github.com/rust-lang/crates.io-index",
"sha2 0.10.9 registry+https://github.com/rust-lang/crates.io-index",
"shadow-rs 1.5.0 registry+https://github.com/rust-lang/crates.io-index",
"shell-words 1.1.1 registry+https://github.com/rust-lang/crates.io-index",
"shellexpand 2.1.2 registry+https://github.com/rust-lang/crates.io-index",
"shlex 1.3.0 registry+https://github.com/rust-lang/crates.io-index",
"signature 2.2.0 registry+https://github.com/rust-lang/crates.io-index",
"siphasher 0.3.11 registry+https://github.com/rust-lang/crates.io-index",
"siphasher 1.0.1 registry+https://github.com/rust-lang/crates.io-index",
"smallvec 1.15.1 registry+https://github.com/rust-lang/crates.io-index",
"smol_str 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
"socket2 0.6.1 registry+https://github.com/rust-lang/crates.io-index",
"stable_deref_trait 1.2.1 registry+https://github.com/rust-lang/crates.io-index",
"stacker 0.1.22 registry+https://github.com/rust-lang/crates.io-index",
"static_assertions 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
"supports-color 3.0.2 registry+https://github.com/rust-lang/crates.io-index",
"supports-hyperlinks 3.2.0 registry+https://github.com/rust-lang/crates.io-index",
"supports-unicode 3.0.0 registry+https://github.com/rust-lang/crates.io-index",
"syn 1.0.109 registry+https://github.com/rust-lang/crates.io-index",
"syn 2.0.114 registry+https://github.com/rust-lang/crates.io-index",
"sync_wrapper 1.0.2 registry+https://github.com/rust-lang/crates.io-index",
"tempfile 3.24.0 registry+https://github.com/rust-lang/crates.io-index",
"terminal_size 0.4.3 registry+https://github.com/rust-lang/crates.io-index",
"thiserror 2.0.17 registry+https://github.com/rust-lang/crates.io-index",
"thiserror-impl 2.0.17 registry+https://github.com/rust-lang/crates.io-index",
"thread_local 1.1.9 registry+https://github.com/rust-lang/crates.io-index",
"time 0.3.44 registry+https://github.com/rust-lang/crates.io-index",
"time-core 0.1.6 registry+https://github.com/rust-lang/crates.io-index",
"toml 0.5.11 registry+https://github.com/rust-lang/crates.io-index",
"ttf-parser 0.25.1 registry+https://github.com/rust-lang/crates.io-index",
"typenum 1.19.0 registry+https://github.com/rust-lang/crates.io-index",
"tz-rs 0.7.1 registry+https://github.com/rust-lang/crates.io-index",
"tzdb 0.7.3 registry+https://github.com/rust-lang/crates.io-index",
"tzdb_data 0.2.3 registry+https://github.com/rust-lang/crates.io-index",
"unicase 2.9.0 registry+https://github.com/rust-lang/crates.io-index",
"unicode-ident 1.0.22 registry+https://github.com/rust-lang/crates.io-index",
"unicode-linebreak 0.1.5 registry+https://github.com/rust-lang/crates.io-index",
"unicode-segmentation 1.12.0 registry+https://github.com/rust-lang/crates.io-index",
"unicode-width 0.1.14 registry+https://github.com/rust-lang/crates.io-index",
"unicode-width 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
"unicode-xid 0.2.6 registry+https://github.com/rust-lang/crates.io-index",
"uom 0.37.0 registry+https://github.com/rust-lang/crates.io-index",
"url 2.5.8 registry+https://github.com/rust-lang/crates.io-index",
"utf8_iter 1.0.4 registry+https://github.com/rust-lang/crates.io-index",
"utf8parse 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
"vcpkg 0.2.15 registry+https://github.com/rust-lang/crates.io-index",
"version_check 0.9.5 registry+https://github.com/rust-lang/crates.io-index",
"web-time 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
"webbrowser 1.0.6 registry+https://github.com/rust-lang/crates.io-index",
"weezl 0.1.12 registry+https://github.com/rust-lang/crates.io-index",
"win-msgbox 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
"winapi 0.3.9 registry+https://github.com/rust-lang/crates.io-index",
"windows 0.57.0 registry+https://github.com/rust-lang/crates.io-index",
"windows 0.58.0 registry+https://github.com/rust-lang/crates.io-index",
"windows 0.60.0 registry+https://github.com/rust-lang/crates.io-index",
"windows 0.61.3 registry+https://github.com/rust-lang/crates.io-index",
"windows 0.62.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-collections 0.1.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-collections 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-collections 0.3.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-core 0.57.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-core 0.58.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-core 0.60.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-core 0.61.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-core 0.62.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-future 0.1.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-future 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-future 0.3.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-implement 0.57.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-implement 0.58.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-implement 0.59.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-implement 0.60.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-interface 0.57.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-interface 0.58.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-interface 0.59.3 registry+https://github.com/rust-lang/crates.io-index",
"windows-link 0.1.3 registry+https://github.com/rust-lang/crates.io-index",
"windows-link 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-numerics 0.1.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-numerics 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-numerics 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-registry 0.6.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-result 0.1.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-result 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-result 0.3.4 registry+https://github.com/rust-lang/crates.io-index",
"windows-result 0.4.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-strings 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-strings 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-strings 0.4.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-strings 0.5.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-sys 0.48.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-sys 0.52.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-sys 0.59.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-sys 0.60.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-sys 0.61.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-targets 0.48.5 registry+https://github.com/rust-lang/crates.io-index",
"windows-targets 0.52.6 registry+https://github.com/rust-lang/crates.io-index",
"windows-targets 0.53.5 registry+https://github.com/rust-lang/crates.io-index",
"windows-threading 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-threading 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
"windows_aarch64_msvc 0.48.5 registry+https://github.com/rust-lang/crates.io-index",
"windows_aarch64_msvc 0.52.6 registry+https://github.com/rust-lang/crates.io-index",
"windows_aarch64_msvc 0.53.1 registry+https://github.com/rust-lang/crates.io-index",
"windows_i686_msvc 0.48.5 registry+https://github.com/rust-lang/crates.io-index",
"windows_i686_msvc 0.52.6 registry+https://github.com/rust-lang/crates.io-index",
"windows_i686_msvc 0.53.1 registry+https://github.com/rust-lang/crates.io-index",
"windows_x86_64_msvc 0.48.5 registry+https://github.com/rust-lang/crates.io-index",
"windows_x86_64_msvc 0.52.6 registry+https://github.com/rust-lang/crates.io-index",
"windows_x86_64_msvc 0.53.1 registry+https://github.com/rust-lang/crates.io-index",
"winit 0.30.12 registry+https://github.com/rust-lang/crates.io-index",
"wmi 0.15.2 registry+https://github.com/rust-lang/crates.io-index",
"yaml-rust 0.4.5 registry+https://github.com/rust-lang/crates.io-index",
"zerocopy 0.8.33 registry+https://github.com/rust-lang/crates.io-index",
"zerocopy-derive 0.8.33 registry+https://github.com/rust-lang/crates.io-index",
"zeroize 1.8.2 registry+https://github.com/rust-lang/crates.io-index",
"zune-core 0.4.12 registry+https://github.com/rust-lang/crates.io-index",
"zune-core 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
"zune-inflate 0.2.54 registry+https://github.com/rust-lang/crates.io-index",
"zune-jpeg 0.4.21 registry+https://github.com/rust-lang/crates.io-index",
"zune-jpeg 0.5.8 registry+https://github.com/rust-lang/crates.io-index"
]
],
[
"Apache-2.0 WITH LLVM-exception",
[
"ar_archive_writer 0.2.0 registry+https://github.com/rust-lang/crates.io-index"
]
],
[
"Artistic-2.0",
[
"file-id 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
"notify-debouncer-full 0.1.0 registry+https://github.com/rust-lang/crates.io-index"
]
],
[
"BSD-2-Clause",
[
"av1-grain 0.2.5 registry+https://github.com/rust-lang/crates.io-index",
"rav1e 0.8.1 registry+https://github.com/rust-lang/crates.io-index",
"v_frame 0.3.9 registry+https://github.com/rust-lang/crates.io-index",
"zerocopy 0.8.33 registry+https://github.com/rust-lang/crates.io-index",
"zerocopy-derive 0.8.33 registry+https://github.com/rust-lang/crates.io-index"
]
],
[
"BSD-3-Clause",
[
"alloc-no-stdlib 2.0.4 registry+https://github.com/rust-lang/crates.io-index",
"alloc-stdlib 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
"avif-serialize 0.8.6 registry+https://github.com/rust-lang/crates.io-index",
"brotli 8.0.2 registry+https://github.com/rust-lang/crates.io-index",
"brotli-decompressor 5.0.0 registry+https://github.com/rust-lang/crates.io-index",
"curve25519-dalek 4.1.3 registry+https://github.com/rust-lang/crates.io-index",
"ed25519-dalek 2.2.0 registry+https://github.com/rust-lang/crates.io-index",
"encoding_rs 0.8.35 registry+https://github.com/rust-lang/crates.io-index",
"exr 1.74.0 registry+https://github.com/rust-lang/crates.io-index",
"lebe 0.5.3 registry+https://github.com/rust-lang/crates.io-index",
"moxcms 0.7.11 registry+https://github.com/rust-lang/crates.io-index",
"pxfm 0.1.27 registry+https://github.com/rust-lang/crates.io-index",
"ravif 0.12.0 registry+https://github.com/rust-lang/crates.io-index",
"subtle 2.6.1 registry+https://github.com/rust-lang/crates.io-index"
]
],
[
"BSL-1.0",
[
"clipboard-win 5.4.1 registry+https://github.com/rust-lang/crates.io-index",
"error-code 3.3.2 registry+https://github.com/rust-lang/crates.io-index",
"ryu 1.0.22 registry+https://github.com/rust-lang/crates.io-index"
]
],
[
"CC0-1.0",
[
"dunce 1.0.5 registry+https://github.com/rust-lang/crates.io-index",
"file-id 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
"imgref 1.12.0 registry+https://github.com/rust-lang/crates.io-index",
"notify 6.1.1 registry+https://github.com/rust-lang/crates.io-index",
"notify-debouncer-full 0.1.0 registry+https://github.com/rust-lang/crates.io-index"
]
],
[
"ISC",
[
"is_ci 1.2.0 registry+https://github.com/rust-lang/crates.io-index",
"libloading 0.8.9 registry+https://github.com/rust-lang/crates.io-index",
"starship-battery 0.10.3 registry+https://github.com/rust-lang/crates.io-index"
]
],
[
"MIT",
[
"accesskit 0.21.1 registry+https://github.com/rust-lang/crates.io-index",
"accesskit_consumer 0.31.0 registry+https://github.com/rust-lang/crates.io-index",
"accesskit_windows 0.29.2 registry+https://github.com/rust-lang/crates.io-index",
"adler 1.0.2 registry+https://github.com/rust-lang/crates.io-index",
"adler2 2.0.1 registry+https://github.com/rust-lang/crates.io-index",
"ahash 0.8.12 registry+https://github.com/rust-lang/crates.io-index",
"aho-corasick 1.1.4 registry+https://github.com/rust-lang/crates.io-index",
"aligned 0.4.3 registry+https://github.com/rust-lang/crates.io-index",
"aligned-vec 0.6.4 registry+https://github.com/rust-lang/crates.io-index",
"allocator-api2 0.2.21 registry+https://github.com/rust-lang/crates.io-index",
"anstream 0.6.21 registry+https://github.com/rust-lang/crates.io-index",
"anstyle 1.0.13 registry+https://github.com/rust-lang/crates.io-index",
"anstyle-parse 0.2.7 registry+https://github.com/rust-lang/crates.io-index",
"anstyle-query 1.1.5 registry+https://github.com/rust-lang/crates.io-index",
"anstyle-wincon 3.0.11 registry+https://github.com/rust-lang/crates.io-index",
"anyhow 1.0.100 registry+https://github.com/rust-lang/crates.io-index",
"arboard 3.6.1 registry+https://github.com/rust-lang/crates.io-index",
"arg_enum_proc_macro 0.3.4 registry+https://github.com/rust-lang/crates.io-index",
"arrayvec 0.7.6 registry+https://github.com/rust-lang/crates.io-index",
"as-slice 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
"atomic-waker 1.1.2 registry+https://github.com/rust-lang/crates.io-index",
"autocfg 1.5.0 registry+https://github.com/rust-lang/crates.io-index",
"av-scenechange 0.14.1 registry+https://github.com/rust-lang/crates.io-index",
"backtrace 0.3.76 registry+https://github.com/rust-lang/crates.io-index",
"backtrace-ext 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
"base16_color_scheme 0.3.2 git+https://github.com/LGUG2Z/base16_color_scheme",
"base64 0.22.1 registry+https://github.com/rust-lang/crates.io-index",
"beef 0.5.2 registry+https://github.com/rust-lang/crates.io-index",
"bit_field 0.10.3 registry+https://github.com/rust-lang/crates.io-index",
"bitflags 1.3.2 registry+https://github.com/rust-lang/crates.io-index",
"bitflags 2.10.0 registry+https://github.com/rust-lang/crates.io-index",
"bitstream-io 4.9.0 registry+https://github.com/rust-lang/crates.io-index",
"block-buffer 0.10.4 registry+https://github.com/rust-lang/crates.io-index",
"brotli 8.0.2 registry+https://github.com/rust-lang/crates.io-index",
"brotli-decompressor 5.0.0 registry+https://github.com/rust-lang/crates.io-index",
"built 0.8.0 registry+https://github.com/rust-lang/crates.io-index",
"bytemuck 1.24.0 registry+https://github.com/rust-lang/crates.io-index",
"bytemuck_derive 1.10.2 registry+https://github.com/rust-lang/crates.io-index",
"byteorder 1.5.0 registry+https://github.com/rust-lang/crates.io-index",
"byteorder-lite 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
"bytes 1.11.0 registry+https://github.com/rust-lang/crates.io-index",
"calm_io 0.1.1 registry+https://github.com/rust-lang/crates.io-index",
"calmio_filters 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
"catppuccin-egui 5.6.0 git+https://github.com/LGUG2Z/catppuccin-egui?rev=b2f95cbf441d1dd99f3c955ef10dcb84ce23c20a",
"cc 1.2.51 registry+https://github.com/rust-lang/crates.io-index",
"cfg-if 0.1.10 registry+https://github.com/rust-lang/crates.io-index",
"cfg-if 1.0.4 registry+https://github.com/rust-lang/crates.io-index",
"cfg_aliases 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
"chrono 0.4.42 registry+https://github.com/rust-lang/crates.io-index",
"chrono-tz 0.10.4 registry+https://github.com/rust-lang/crates.io-index",
"chumsky 0.9.3 registry+https://github.com/rust-lang/crates.io-index",
"clap 4.5.54 registry+https://github.com/rust-lang/crates.io-index",
"clap_builder 4.5.54 registry+https://github.com/rust-lang/crates.io-index",
"clap_derive 4.5.49 registry+https://github.com/rust-lang/crates.io-index",
"clap_lex 0.7.6 registry+https://github.com/rust-lang/crates.io-index",
"color-eyre 0.6.5 registry+https://github.com/rust-lang/crates.io-index",
"color-spantrace 0.3.0 registry+https://github.com/rust-lang/crates.io-index",
"color-thief 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
"color_quant 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
"colorchoice 1.0.4 registry+https://github.com/rust-lang/crates.io-index",
"core2 0.4.0 registry+https://github.com/rust-lang/crates.io-index",
"cpufeatures 0.2.17 registry+https://github.com/rust-lang/crates.io-index",
"crc32fast 1.5.0 registry+https://github.com/rust-lang/crates.io-index",
"crossbeam-channel 0.5.15 registry+https://github.com/rust-lang/crates.io-index",
"crossbeam-deque 0.8.6 registry+https://github.com/rust-lang/crates.io-index",
"crossbeam-epoch 0.9.18 registry+https://github.com/rust-lang/crates.io-index",
"crossbeam-utils 0.8.21 registry+https://github.com/rust-lang/crates.io-index",
"crypto-common 0.1.7 registry+https://github.com/rust-lang/crates.io-index",
"ctrlc 3.5.1 registry+https://github.com/rust-lang/crates.io-index",
"cursor-icon 1.2.0 registry+https://github.com/rust-lang/crates.io-index",
"curve25519-dalek-derive 0.1.1 registry+https://github.com/rust-lang/crates.io-index",
"darling 0.21.3 registry+https://github.com/rust-lang/crates.io-index",
"darling_core 0.21.3 registry+https://github.com/rust-lang/crates.io-index",
"darling_macro 0.21.3 registry+https://github.com/rust-lang/crates.io-index",
"deflate 0.8.6 registry+https://github.com/rust-lang/crates.io-index",
"deranged 0.5.5 registry+https://github.com/rust-lang/crates.io-index",
"digest 0.10.7 registry+https://github.com/rust-lang/crates.io-index",
"dirs 3.0.2 registry+https://github.com/rust-lang/crates.io-index",
"dirs 4.0.0 registry+https://github.com/rust-lang/crates.io-index",
"dirs 6.0.0 registry+https://github.com/rust-lang/crates.io-index",
"dirs-sys 0.3.7 registry+https://github.com/rust-lang/crates.io-index",
"dirs-sys 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
"displaydoc 0.2.5 registry+https://github.com/rust-lang/crates.io-index",
"document-features 0.2.12 registry+https://github.com/rust-lang/crates.io-index",
"dpi 0.1.2 registry+https://github.com/rust-lang/crates.io-index",
"dyn-clone 1.0.20 registry+https://github.com/rust-lang/crates.io-index",
"ecolor 0.33.3 registry+https://github.com/rust-lang/crates.io-index",
"ed25519 2.2.3 registry+https://github.com/rust-lang/crates.io-index",
"eframe 0.33.3 registry+https://github.com/rust-lang/crates.io-index",
"egui 0.33.3 registry+https://github.com/rust-lang/crates.io-index",
"egui-phosphor 0.10.0 git+https://github.com/amPerl/egui-phosphor?rev=d13688738478ecd12b426e3e74c59d6577a85b59",
"egui-winit 0.33.3 registry+https://github.com/rust-lang/crates.io-index",
"egui_extras 0.33.3 registry+https://github.com/rust-lang/crates.io-index",
"egui_glow 0.33.3 registry+https://github.com/rust-lang/crates.io-index",
"either 1.15.0 registry+https://github.com/rust-lang/crates.io-index",
"emath 0.33.3 registry+https://github.com/rust-lang/crates.io-index",
"encoding_rs 0.8.35 registry+https://github.com/rust-lang/crates.io-index",
"enum-map 2.7.3 registry+https://github.com/rust-lang/crates.io-index",
"enum-map-derive 0.17.0 registry+https://github.com/rust-lang/crates.io-index",
"env_home 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
"epaint 0.33.3 registry+https://github.com/rust-lang/crates.io-index",
"epaint_default_fonts 0.33.3 registry+https://github.com/rust-lang/crates.io-index",
"equator 0.4.2 registry+https://github.com/rust-lang/crates.io-index",
"equator-macro 0.4.2 registry+https://github.com/rust-lang/crates.io-index",
"equivalent 1.0.2 registry+https://github.com/rust-lang/crates.io-index",
"eyre 0.6.12 registry+https://github.com/rust-lang/crates.io-index",
"fastrand 2.3.0 registry+https://github.com/rust-lang/crates.io-index",
"fax 0.2.6 registry+https://github.com/rust-lang/crates.io-index",
"fax_derive 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
"fdeflate 0.3.7 registry+https://github.com/rust-lang/crates.io-index",
"filetime 0.2.26 registry+https://github.com/rust-lang/crates.io-index",
"find-msvc-tools 0.1.6 registry+https://github.com/rust-lang/crates.io-index",
"flate2 1.1.5 registry+https://github.com/rust-lang/crates.io-index",
"flavours 0.7.2 git+https://github.com/LGUG2Z/flavours",
"fnv 1.0.7 registry+https://github.com/rust-lang/crates.io-index",
"font-loader 0.11.0 registry+https://github.com/rust-lang/crates.io-index",
"form_urlencoded 1.2.2 registry+https://github.com/rust-lang/crates.io-index",
"fs-tail 0.1.4 registry+https://github.com/rust-lang/crates.io-index",
"futures 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
"futures-channel 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
"futures-core 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
"futures-executor 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
"futures-io 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
"futures-macro 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
"futures-sink 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
"futures-task 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
"futures-util 0.3.31 registry+https://github.com/rust-lang/crates.io-index",
"generic-array 0.14.7 registry+https://github.com/rust-lang/crates.io-index",
"getrandom 0.1.16 registry+https://github.com/rust-lang/crates.io-index",
"getrandom 0.2.16 registry+https://github.com/rust-lang/crates.io-index",
"getrandom 0.3.4 registry+https://github.com/rust-lang/crates.io-index",
"gif 0.11.4 registry+https://github.com/rust-lang/crates.io-index",
"gif 0.14.1 registry+https://github.com/rust-lang/crates.io-index",
"git2 0.20.3 registry+https://github.com/rust-lang/crates.io-index",
"glob 0.3.3 registry+https://github.com/rust-lang/crates.io-index",
"glow 0.16.0 registry+https://github.com/rust-lang/crates.io-index",
"glutin-winit 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
"h2 0.4.13 registry+https://github.com/rust-lang/crates.io-index",
"half 2.7.1 registry+https://github.com/rust-lang/crates.io-index",
"hashbrown 0.12.3 registry+https://github.com/rust-lang/crates.io-index",
"hashbrown 0.14.5 registry+https://github.com/rust-lang/crates.io-index",
"hashbrown 0.15.5 registry+https://github.com/rust-lang/crates.io-index",
"hashbrown 0.16.1 registry+https://github.com/rust-lang/crates.io-index",
"heck 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
"hex 0.4.3 registry+https://github.com/rust-lang/crates.io-index",
"hex_color 3.0.0 registry+https://github.com/rust-lang/crates.io-index",
"hotwatch 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
"http 1.4.0 registry+https://github.com/rust-lang/crates.io-index",
"http-body 1.0.1 registry+https://github.com/rust-lang/crates.io-index",
"http-body-util 0.1.3 registry+https://github.com/rust-lang/crates.io-index",
"httparse 1.10.1 registry+https://github.com/rust-lang/crates.io-index",
"hyper 1.8.1 registry+https://github.com/rust-lang/crates.io-index",
"hyper-tls 0.6.0 registry+https://github.com/rust-lang/crates.io-index",
"hyper-util 0.1.19 registry+https://github.com/rust-lang/crates.io-index",
"iana-time-zone 0.1.64 registry+https://github.com/rust-lang/crates.io-index",
"ident_case 1.0.1 registry+https://github.com/rust-lang/crates.io-index",
"idna 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
"idna_adapter 1.2.1 registry+https://github.com/rust-lang/crates.io-index",
"image 0.23.14 registry+https://github.com/rust-lang/crates.io-index",
"image 0.25.9 registry+https://github.com/rust-lang/crates.io-index",
"image-webp 0.2.4 registry+https://github.com/rust-lang/crates.io-index",
"indenter 0.3.4 registry+https://github.com/rust-lang/crates.io-index",
"indexmap 1.9.3 registry+https://github.com/rust-lang/crates.io-index",
"indexmap 2.13.0 registry+https://github.com/rust-lang/crates.io-index",
"ipnet 2.11.0 registry+https://github.com/rust-lang/crates.io-index",
"iri-string 0.7.10 registry+https://github.com/rust-lang/crates.io-index",
"is_debug 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
"is_terminal_polyfill 1.70.2 registry+https://github.com/rust-lang/crates.io-index",
"itertools 0.14.0 registry+https://github.com/rust-lang/crates.io-index",
"itoa 1.0.17 registry+https://github.com/rust-lang/crates.io-index",
"jobserver 0.1.34 registry+https://github.com/rust-lang/crates.io-index",
"jpeg-decoder 0.1.22 registry+https://github.com/rust-lang/crates.io-index",
"lazy_static 1.5.0 registry+https://github.com/rust-lang/crates.io-index",
"libc 0.2.180 registry+https://github.com/rust-lang/crates.io-index",
"libgit2-sys 0.18.3+1.9.2 registry+https://github.com/rust-lang/crates.io-index",
"libz-sys 1.1.23 registry+https://github.com/rust-lang/crates.io-index",
"linked-hash-map 0.5.6 registry+https://github.com/rust-lang/crates.io-index",
"litrs 1.0.0 registry+https://github.com/rust-lang/crates.io-index",
"lock_api 0.4.14 registry+https://github.com/rust-lang/crates.io-index",
"log 0.4.29 registry+https://github.com/rust-lang/crates.io-index",
"logos 0.14.4 registry+https://github.com/rust-lang/crates.io-index",
"logos-codegen 0.14.4 registry+https://github.com/rust-lang/crates.io-index",
"logos-derive 0.14.4 registry+https://github.com/rust-lang/crates.io-index",
"loop9 0.1.5 registry+https://github.com/rust-lang/crates.io-index",
"mac-addr 0.3.0 registry+https://github.com/rust-lang/crates.io-index",
"matchers 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
"maybe-rayon 0.1.1 registry+https://github.com/rust-lang/crates.io-index",
"memchr 2.7.6 registry+https://github.com/rust-lang/crates.io-index",
"memoffset 0.9.1 registry+https://github.com/rust-lang/crates.io-index",
"mime 0.3.17 registry+https://github.com/rust-lang/crates.io-index",
"mime_guess2 2.3.1 registry+https://github.com/rust-lang/crates.io-index",
"minimal-lexical 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
"miniz_oxide 0.3.7 registry+https://github.com/rust-lang/crates.io-index",
"miniz_oxide 0.4.4 registry+https://github.com/rust-lang/crates.io-index",
"miniz_oxide 0.8.9 registry+https://github.com/rust-lang/crates.io-index",
"mio 1.1.1 registry+https://github.com/rust-lang/crates.io-index",
"miow 0.6.1 registry+https://github.com/rust-lang/crates.io-index",
"nanoid 0.4.0 registry+https://github.com/rust-lang/crates.io-index",
"native-tls 0.2.14 registry+https://github.com/rust-lang/crates.io-index",
"net2 0.2.39 registry+https://github.com/rust-lang/crates.io-index",
"netdev 0.40.0 registry+https://github.com/rust-lang/crates.io-index",
"new_debug_unreachable 1.0.6 registry+https://github.com/rust-lang/crates.io-index",
"nohash-hasher 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
"nom 7.1.3 registry+https://github.com/rust-lang/crates.io-index",
"nom 8.0.0 registry+https://github.com/rust-lang/crates.io-index",
"noop_proc_macro 0.3.0 registry+https://github.com/rust-lang/crates.io-index",
"ntapi 0.4.2 registry+https://github.com/rust-lang/crates.io-index",
"nu-ansi-term 0.50.3 registry+https://github.com/rust-lang/crates.io-index",
"num 0.4.3 registry+https://github.com/rust-lang/crates.io-index",
"num-bigint 0.4.6 registry+https://github.com/rust-lang/crates.io-index",
"num-complex 0.4.6 registry+https://github.com/rust-lang/crates.io-index",
"num-conv 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
"num-derive 0.4.2 registry+https://github.com/rust-lang/crates.io-index",
"num-integer 0.1.46 registry+https://github.com/rust-lang/crates.io-index",
"num-iter 0.1.45 registry+https://github.com/rust-lang/crates.io-index",
"num-rational 0.3.2 registry+https://github.com/rust-lang/crates.io-index",
"num-rational 0.4.2 registry+https://github.com/rust-lang/crates.io-index",
"num-traits 0.2.19 registry+https://github.com/rust-lang/crates.io-index",
"object 0.32.2 registry+https://github.com/rust-lang/crates.io-index",
"once_cell 1.21.3 registry+https://github.com/rust-lang/crates.io-index",
"once_cell_polyfill 1.70.2 registry+https://github.com/rust-lang/crates.io-index",
"open 5.3.3 registry+https://github.com/rust-lang/crates.io-index",
"os_info 3.14.0 registry+https://github.com/rust-lang/crates.io-index",
"owo-colors 4.2.3 registry+https://github.com/rust-lang/crates.io-index",
"palette 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
"palette_derive 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
"parking_lot 0.12.5 registry+https://github.com/rust-lang/crates.io-index",
"parking_lot_core 0.9.12 registry+https://github.com/rust-lang/crates.io-index",
"paste 1.0.15 registry+https://github.com/rust-lang/crates.io-index",
"pastey 0.1.1 registry+https://github.com/rust-lang/crates.io-index",
"percent-encoding 2.3.2 registry+https://github.com/rust-lang/crates.io-index",
"phf 0.11.3 registry+https://github.com/rust-lang/crates.io-index",
"phf 0.12.1 registry+https://github.com/rust-lang/crates.io-index",
"phf 0.8.0 registry+https://github.com/rust-lang/crates.io-index",
"phf_codegen 0.8.0 registry+https://github.com/rust-lang/crates.io-index",
"phf_generator 0.8.0 registry+https://github.com/rust-lang/crates.io-index",
"phf_shared 0.11.3 registry+https://github.com/rust-lang/crates.io-index",
"phf_shared 0.12.1 registry+https://github.com/rust-lang/crates.io-index",
"phf_shared 0.8.0 registry+https://github.com/rust-lang/crates.io-index",
"pin-project-lite 0.2.16 registry+https://github.com/rust-lang/crates.io-index",
"pin-utils 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
"pkg-config 0.3.32 registry+https://github.com/rust-lang/crates.io-index",
"png 0.16.8 registry+https://github.com/rust-lang/crates.io-index",
"png 0.18.0 registry+https://github.com/rust-lang/crates.io-index",
"powerfmt 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
"powershell_script 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
"ppv-lite86 0.2.21 registry+https://github.com/rust-lang/crates.io-index",
"proc-macro2 1.0.105 registry+https://github.com/rust-lang/crates.io-index",
"profiling 1.0.17 registry+https://github.com/rust-lang/crates.io-index",
"profiling-procmacros 1.0.17 registry+https://github.com/rust-lang/crates.io-index",
"psm 0.1.28 registry+https://github.com/rust-lang/crates.io-index",
"qoi 0.4.1 registry+https://github.com/rust-lang/crates.io-index",
"quick-error 2.0.1 registry+https://github.com/rust-lang/crates.io-index",
"quote 1.0.43 registry+https://github.com/rust-lang/crates.io-index",
"rand 0.7.3 registry+https://github.com/rust-lang/crates.io-index",
"rand 0.8.5 registry+https://github.com/rust-lang/crates.io-index",
"rand 0.9.2 registry+https://github.com/rust-lang/crates.io-index",
"rand_chacha 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
"rand_chacha 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
"rand_chacha 0.9.0 registry+https://github.com/rust-lang/crates.io-index",
"rand_core 0.5.1 registry+https://github.com/rust-lang/crates.io-index",
"rand_core 0.6.4 registry+https://github.com/rust-lang/crates.io-index",
"rand_core 0.9.3 registry+https://github.com/rust-lang/crates.io-index",
"rand_pcg 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
"random_word 0.5.2 registry+https://github.com/rust-lang/crates.io-index",
"raw-window-handle 0.6.2 registry+https://github.com/rust-lang/crates.io-index",
"rayon 1.11.0 registry+https://github.com/rust-lang/crates.io-index",
"rayon-core 1.13.0 registry+https://github.com/rust-lang/crates.io-index",
"ref-cast 1.0.25 registry+https://github.com/rust-lang/crates.io-index",
"ref-cast-impl 1.0.25 registry+https://github.com/rust-lang/crates.io-index",
"regex 1.12.2 registry+https://github.com/rust-lang/crates.io-index",
"regex-automata 0.4.13 registry+https://github.com/rust-lang/crates.io-index",
"regex-syntax 0.8.8 registry+https://github.com/rust-lang/crates.io-index",
"reqwest 0.12.28 registry+https://github.com/rust-lang/crates.io-index",
"rgb 0.8.52 registry+https://github.com/rust-lang/crates.io-index",
"roxmltree 0.20.0 registry+https://github.com/rust-lang/crates.io-index",
"rustc-demangle 0.1.26 registry+https://github.com/rust-lang/crates.io-index",
"rustc_version 0.4.1 registry+https://github.com/rust-lang/crates.io-index",
"rustls-pki-types 1.13.2 registry+https://github.com/rust-lang/crates.io-index",
"same-file 1.0.6 registry+https://github.com/rust-lang/crates.io-index",
"schannel 0.1.28 registry+https://github.com/rust-lang/crates.io-index",
"schemars 1.2.0 registry+https://github.com/rust-lang/crates.io-index",
"schemars_derive 1.2.0 registry+https://github.com/rust-lang/crates.io-index",
"scoped_threadpool 0.1.9 registry+https://github.com/rust-lang/crates.io-index",
"scopeguard 1.2.0 registry+https://github.com/rust-lang/crates.io-index",
"semver 1.0.27 registry+https://github.com/rust-lang/crates.io-index",
"serde 1.0.228 registry+https://github.com/rust-lang/crates.io-index",
"serde_core 1.0.228 registry+https://github.com/rust-lang/crates.io-index",
"serde_derive 1.0.228 registry+https://github.com/rust-lang/crates.io-index",
"serde_derive_internals 0.29.1 registry+https://github.com/rust-lang/crates.io-index",
"serde_json 1.0.149 registry+https://github.com/rust-lang/crates.io-index",
"serde_json_lenient 0.2.4 registry+https://github.com/rust-lang/crates.io-index",
"serde_urlencoded 0.7.1 registry+https://github.com/rust-lang/crates.io-index",
"serde_variant 0.1.3 registry+https://github.com/rust-lang/crates.io-index",
"serde_with 3.16.1 registry+https://github.com/rust-lang/crates.io-index",
"serde_with_macros 3.16.1 registry+https://github.com/rust-lang/crates.io-index",
"serde_yaml 0.8.26 registry+https://github.com/rust-lang/crates.io-index",
"serde_yaml 0.9.34+deprecated registry+https://github.com/rust-lang/crates.io-index",
"sha2 0.10.9 registry+https://github.com/rust-lang/crates.io-index",
"shadow-rs 1.5.0 registry+https://github.com/rust-lang/crates.io-index",
"sharded-slab 0.1.7 registry+https://github.com/rust-lang/crates.io-index",
"shell-words 1.1.1 registry+https://github.com/rust-lang/crates.io-index",
"shellexpand 2.1.2 registry+https://github.com/rust-lang/crates.io-index",
"shlex 1.3.0 registry+https://github.com/rust-lang/crates.io-index",
"signature 2.2.0 registry+https://github.com/rust-lang/crates.io-index",
"simd-adler32 0.3.8 registry+https://github.com/rust-lang/crates.io-index",
"simd_helpers 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
"siphasher 0.3.11 registry+https://github.com/rust-lang/crates.io-index",
"siphasher 1.0.1 registry+https://github.com/rust-lang/crates.io-index",
"slab 0.4.11 registry+https://github.com/rust-lang/crates.io-index",
"smallvec 1.15.1 registry+https://github.com/rust-lang/crates.io-index",
"smol_str 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
"socket2 0.6.1 registry+https://github.com/rust-lang/crates.io-index",
"stable_deref_trait 1.2.1 registry+https://github.com/rust-lang/crates.io-index",
"stacker 0.1.22 registry+https://github.com/rust-lang/crates.io-index",
"static_assertions 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
"strsim 0.11.1 registry+https://github.com/rust-lang/crates.io-index",
"strum 0.27.2 registry+https://github.com/rust-lang/crates.io-index",
"strum_macros 0.27.2 registry+https://github.com/rust-lang/crates.io-index",
"syn 1.0.109 registry+https://github.com/rust-lang/crates.io-index",
"syn 2.0.114 registry+https://github.com/rust-lang/crates.io-index",
"synstructure 0.13.2 registry+https://github.com/rust-lang/crates.io-index",
"sysinfo 0.33.1 registry+https://github.com/rust-lang/crates.io-index",
"sysinfo 0.37.2 registry+https://github.com/rust-lang/crates.io-index",
"tempfile 3.24.0 registry+https://github.com/rust-lang/crates.io-index",
"terminal_size 0.4.3 registry+https://github.com/rust-lang/crates.io-index",
"textwrap 0.16.2 registry+https://github.com/rust-lang/crates.io-index",
"thiserror 2.0.17 registry+https://github.com/rust-lang/crates.io-index",
"thiserror-impl 2.0.17 registry+https://github.com/rust-lang/crates.io-index",
"thread_local 1.1.9 registry+https://github.com/rust-lang/crates.io-index",
"tiff 0.10.3 registry+https://github.com/rust-lang/crates.io-index",
"tiff 0.6.1 registry+https://github.com/rust-lang/crates.io-index",
"time 0.3.44 registry+https://github.com/rust-lang/crates.io-index",
"time-core 0.1.6 registry+https://github.com/rust-lang/crates.io-index",
"tokio 1.49.0 registry+https://github.com/rust-lang/crates.io-index",
"tokio-native-tls 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
"tokio-util 0.7.18 registry+https://github.com/rust-lang/crates.io-index",
"toml 0.5.11 registry+https://github.com/rust-lang/crates.io-index",
"tower 0.5.2 registry+https://github.com/rust-lang/crates.io-index",
"tower-http 0.6.8 registry+https://github.com/rust-lang/crates.io-index",
"tower-layer 0.3.3 registry+https://github.com/rust-lang/crates.io-index",
"tower-service 0.3.3 registry+https://github.com/rust-lang/crates.io-index",
"tracing 0.1.44 registry+https://github.com/rust-lang/crates.io-index",
"tracing-appender 0.2.4 registry+https://github.com/rust-lang/crates.io-index",
"tracing-attributes 0.1.31 registry+https://github.com/rust-lang/crates.io-index",
"tracing-core 0.1.36 registry+https://github.com/rust-lang/crates.io-index",
"tracing-error 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
"tracing-log 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
"tracing-subscriber 0.3.22 registry+https://github.com/rust-lang/crates.io-index",
"try-lock 0.2.5 registry+https://github.com/rust-lang/crates.io-index",
"ttf-parser 0.25.1 registry+https://github.com/rust-lang/crates.io-index",
"typenum 1.19.0 registry+https://github.com/rust-lang/crates.io-index",
"tz-rs 0.7.1 registry+https://github.com/rust-lang/crates.io-index",
"tzdb_data 0.2.3 registry+https://github.com/rust-lang/crates.io-index",
"uds_windows 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
"unicase 2.9.0 registry+https://github.com/rust-lang/crates.io-index",
"unicode-ident 1.0.22 registry+https://github.com/rust-lang/crates.io-index",
"unicode-segmentation 1.12.0 registry+https://github.com/rust-lang/crates.io-index",
"unicode-width 0.1.14 registry+https://github.com/rust-lang/crates.io-index",
"unicode-width 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
"unicode-xid 0.2.6 registry+https://github.com/rust-lang/crates.io-index",
"unsafe-libyaml 0.2.11 registry+https://github.com/rust-lang/crates.io-index",
"uom 0.37.0 registry+https://github.com/rust-lang/crates.io-index",
"url 2.5.8 registry+https://github.com/rust-lang/crates.io-index",
"utf8_iter 1.0.4 registry+https://github.com/rust-lang/crates.io-index",
"utf8parse 0.2.2 registry+https://github.com/rust-lang/crates.io-index",
"vcpkg 0.2.15 registry+https://github.com/rust-lang/crates.io-index",
"version_check 0.9.5 registry+https://github.com/rust-lang/crates.io-index",
"walkdir 2.5.0 registry+https://github.com/rust-lang/crates.io-index",
"want 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
"web-time 1.1.0 registry+https://github.com/rust-lang/crates.io-index",
"webbrowser 1.0.6 registry+https://github.com/rust-lang/crates.io-index",
"weezl 0.1.12 registry+https://github.com/rust-lang/crates.io-index",
"which 8.0.0 registry+https://github.com/rust-lang/crates.io-index",
"win-msgbox 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
"winapi 0.3.9 registry+https://github.com/rust-lang/crates.io-index",
"winapi-util 0.1.11 registry+https://github.com/rust-lang/crates.io-index",
"windows 0.57.0 registry+https://github.com/rust-lang/crates.io-index",
"windows 0.58.0 registry+https://github.com/rust-lang/crates.io-index",
"windows 0.60.0 registry+https://github.com/rust-lang/crates.io-index",
"windows 0.61.3 registry+https://github.com/rust-lang/crates.io-index",
"windows 0.62.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-collections 0.1.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-collections 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-collections 0.3.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-core 0.57.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-core 0.58.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-core 0.60.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-core 0.61.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-core 0.62.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-future 0.1.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-future 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-future 0.3.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-icons 0.1.0 git+https://github.com/LGUG2Z/windows-icons?rev=0c9d7ee1b807347c507d3a9862dd007b4d3f4354",
"windows-icons 0.1.0 git+https://github.com/LGUG2Z/windows-icons?rev=d67cc9920aa9b4883393e411fb4fa2ddd4c498b5",
"windows-implement 0.57.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-implement 0.58.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-implement 0.59.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-implement 0.60.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-interface 0.57.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-interface 0.58.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-interface 0.59.3 registry+https://github.com/rust-lang/crates.io-index",
"windows-link 0.1.3 registry+https://github.com/rust-lang/crates.io-index",
"windows-link 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-numerics 0.1.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-numerics 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-numerics 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-registry 0.6.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-result 0.1.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-result 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-result 0.3.4 registry+https://github.com/rust-lang/crates.io-index",
"windows-result 0.4.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-strings 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-strings 0.3.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-strings 0.4.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-strings 0.5.1 registry+https://github.com/rust-lang/crates.io-index",
"windows-sys 0.48.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-sys 0.52.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-sys 0.59.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-sys 0.60.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-sys 0.61.2 registry+https://github.com/rust-lang/crates.io-index",
"windows-targets 0.48.5 registry+https://github.com/rust-lang/crates.io-index",
"windows-targets 0.52.6 registry+https://github.com/rust-lang/crates.io-index",
"windows-targets 0.53.5 registry+https://github.com/rust-lang/crates.io-index",
"windows-threading 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
"windows-threading 0.2.1 registry+https://github.com/rust-lang/crates.io-index",
"windows_aarch64_msvc 0.48.5 registry+https://github.com/rust-lang/crates.io-index",
"windows_aarch64_msvc 0.52.6 registry+https://github.com/rust-lang/crates.io-index",
"windows_aarch64_msvc 0.53.1 registry+https://github.com/rust-lang/crates.io-index",
"windows_i686_msvc 0.48.5 registry+https://github.com/rust-lang/crates.io-index",
"windows_i686_msvc 0.52.6 registry+https://github.com/rust-lang/crates.io-index",
"windows_i686_msvc 0.53.1 registry+https://github.com/rust-lang/crates.io-index",
"windows_x86_64_msvc 0.48.5 registry+https://github.com/rust-lang/crates.io-index",
"windows_x86_64_msvc 0.52.6 registry+https://github.com/rust-lang/crates.io-index",
"windows_x86_64_msvc 0.53.1 registry+https://github.com/rust-lang/crates.io-index",
"winput 0.2.5 registry+https://github.com/rust-lang/crates.io-index",
"winreg 0.55.0 registry+https://github.com/rust-lang/crates.io-index",
"winsafe 0.0.19 registry+https://github.com/rust-lang/crates.io-index",
"wmi 0.15.2 registry+https://github.com/rust-lang/crates.io-index",
"xml-rs 0.8.28 registry+https://github.com/rust-lang/crates.io-index",
"y4m 0.8.0 registry+https://github.com/rust-lang/crates.io-index",
"yaml-rust 0.4.5 registry+https://github.com/rust-lang/crates.io-index",
"zerocopy 0.8.33 registry+https://github.com/rust-lang/crates.io-index",
"zerocopy-derive 0.8.33 registry+https://github.com/rust-lang/crates.io-index",
"zeroize 1.8.2 registry+https://github.com/rust-lang/crates.io-index",
"zmij 1.0.12 registry+https://github.com/rust-lang/crates.io-index",
"zune-core 0.4.12 registry+https://github.com/rust-lang/crates.io-index",
"zune-core 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
"zune-inflate 0.2.54 registry+https://github.com/rust-lang/crates.io-index",
"zune-jpeg 0.4.21 registry+https://github.com/rust-lang/crates.io-index",
"zune-jpeg 0.5.8 registry+https://github.com/rust-lang/crates.io-index"
]
],
[
"MIT-0",
[
"dunce 1.0.5 registry+https://github.com/rust-lang/crates.io-index",
"tzdb_data 0.2.3 registry+https://github.com/rust-lang/crates.io-index"
]
],
[
"MPL-2.0",
[
"option-ext 0.2.0 registry+https://github.com/rust-lang/crates.io-index",
"ramhorns 1.0.1 registry+https://github.com/rust-lang/crates.io-index"
]
],
[
"OFL-1.1",
[
"epaint_default_fonts 0.33.3 registry+https://github.com/rust-lang/crates.io-index"
]
],
[
"Ubuntu-font-1.0",
[
"epaint_default_fonts 0.33.3 registry+https://github.com/rust-lang/crates.io-index"
]
],
[
"Unicode-3.0",
[
"icu_collections 2.1.1 registry+https://github.com/rust-lang/crates.io-index",
"icu_locale_core 2.1.1 registry+https://github.com/rust-lang/crates.io-index",
"icu_normalizer 2.1.1 registry+https://github.com/rust-lang/crates.io-index",
"icu_normalizer_data 2.1.1 registry+https://github.com/rust-lang/crates.io-index",
"icu_properties 2.1.2 registry+https://github.com/rust-lang/crates.io-index",
"icu_properties_data 2.1.2 registry+https://github.com/rust-lang/crates.io-index",
"icu_provider 2.1.1 registry+https://github.com/rust-lang/crates.io-index",
"litemap 0.8.1 registry+https://github.com/rust-lang/crates.io-index",
"potential_utf 0.1.4 registry+https://github.com/rust-lang/crates.io-index",
"tinystr 0.8.2 registry+https://github.com/rust-lang/crates.io-index",
"unicode-ident 1.0.22 registry+https://github.com/rust-lang/crates.io-index",
"writeable 0.6.2 registry+https://github.com/rust-lang/crates.io-index",
"yoke 0.8.1 registry+https://github.com/rust-lang/crates.io-index",
"yoke-derive 0.8.1 registry+https://github.com/rust-lang/crates.io-index",
"zerofrom 0.1.6 registry+https://github.com/rust-lang/crates.io-index",
"zerofrom-derive 0.1.6 registry+https://github.com/rust-lang/crates.io-index",
"zerotrie 0.2.3 registry+https://github.com/rust-lang/crates.io-index",
"zerovec 0.11.5 registry+https://github.com/rust-lang/crates.io-index",
"zerovec-derive 0.11.2 registry+https://github.com/rust-lang/crates.io-index"
]
],
[
"Unlicense",
[
"aho-corasick 1.1.4 registry+https://github.com/rust-lang/crates.io-index",
"byteorder 1.5.0 registry+https://github.com/rust-lang/crates.io-index",
"byteorder-lite 0.1.0 registry+https://github.com/rust-lang/crates.io-index",
"memchr 2.7.6 registry+https://github.com/rust-lang/crates.io-index",
"same-file 1.0.6 registry+https://github.com/rust-lang/crates.io-index",
"walkdir 2.5.0 registry+https://github.com/rust-lang/crates.io-index",
"winapi-util 0.1.11 registry+https://github.com/rust-lang/crates.io-index"
]
],
[
"Zlib",
[
"adler32 1.2.0 registry+https://github.com/rust-lang/crates.io-index",
"bytemuck 1.24.0 registry+https://github.com/rust-lang/crates.io-index",
"bytemuck_derive 1.10.2 registry+https://github.com/rust-lang/crates.io-index",
"const_format 0.2.35 registry+https://github.com/rust-lang/crates.io-index",
"const_format_proc_macros 0.2.34 registry+https://github.com/rust-lang/crates.io-index",
"cursor-icon 1.2.0 registry+https://github.com/rust-lang/crates.io-index",
"foldhash 0.1.5 registry+https://github.com/rust-lang/crates.io-index",
"glow 0.16.0 registry+https://github.com/rust-lang/crates.io-index",
"miniz_oxide 0.4.4 registry+https://github.com/rust-lang/crates.io-index",
"miniz_oxide 0.8.9 registry+https://github.com/rust-lang/crates.io-index",
"raw-window-handle 0.6.2 registry+https://github.com/rust-lang/crates.io-index",
"zune-core 0.4.12 registry+https://github.com/rust-lang/crates.io-index",
"zune-core 0.5.0 registry+https://github.com/rust-lang/crates.io-index",
"zune-inflate 0.2.54 registry+https://github.com/rust-lang/crates.io-index",
"zune-jpeg 0.4.21 registry+https://github.com/rust-lang/crates.io-index",
"zune-jpeg 0.5.8 registry+https://github.com/rust-lang/crates.io-index"
]
]
]
}

View File

@@ -1,14 +0,0 @@
[package]
name = "derive-ahk"
version = "0.1.1"
edition = "2021"
[lib]
proc-macro = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
proc-macro2 = "1.0"
syn = "1.0"
quote = "1.0"

View File

@@ -1,225 +0,0 @@
#![warn(clippy::all, clippy::nursery, clippy::pedantic)]
#![allow(clippy::missing_errors_doc)]
#![no_implicit_prelude]
use ::std::clone::Clone;
use ::std::convert::From;
use ::std::convert::Into;
use ::std::format;
use ::std::iter::Extend;
use ::std::iter::Iterator;
use ::std::matches;
use ::std::option::Option::Some;
use ::std::string::String;
use ::std::string::ToString;
use ::std::unreachable;
use ::std::vec::Vec;
use ::quote::quote;
use ::syn::parse_macro_input;
use ::syn::Data;
use ::syn::DataEnum;
use ::syn::DeriveInput;
use ::syn::Fields;
use ::syn::FieldsNamed;
use ::syn::FieldsUnnamed;
use ::syn::Meta;
use ::syn::NestedMeta;
#[allow(clippy::too_many_lines)]
#[proc_macro_derive(AhkFunction)]
pub fn ahk_function(input: ::proc_macro::TokenStream) -> ::proc_macro::TokenStream {
let input = parse_macro_input!(input as DeriveInput);
let name = input.ident;
match input.data {
Data::Struct(s) => match s.fields {
Fields::Named(FieldsNamed { named, .. }) => {
let argument_idents = named
.iter()
// Filter out the flags
.filter(|&f| {
let mut include = true;
for attribute in &f.attrs {
if let ::std::result::Result::Ok(Meta::List(list)) =
attribute.parse_meta()
{
for nested in list.nested {
if let NestedMeta::Meta(Meta::Path(path)) = nested {
if path.is_ident("long") {
include = false;
}
}
}
}
}
include
})
.map(|f| &f.ident);
let argument_idents_clone = argument_idents.clone();
let called_arguments = quote! {#(%#argument_idents_clone%) *}
.to_string()
.replace(" %", "%")
.replace("% ", "%")
.replace("%%", "% %");
let flag_idents = named
.iter()
// Filter only the flags
.filter(|f| {
let mut include = false;
for attribute in &f.attrs {
if let ::std::result::Result::Ok(Meta::List(list)) =
attribute.parse_meta()
{
for nested in list.nested {
if let NestedMeta::Meta(Meta::Path(path)) = nested {
// Identify them using the --long flag name
if path.is_ident("long") {
include = true;
}
}
}
}
}
include
})
.map(|f| &f.ident);
let has_flags = flag_idents.clone().count() != 0;
if has_flags {
let flag_idents_concat = flag_idents.clone();
let argument_idents_concat = argument_idents.clone();
// Concat the args and flag args if there are flags
let all_arguments =
quote! {#(#argument_idents_concat,) * #(#flag_idents_concat), *}
.to_string();
let flag_idents_clone = flag_idents.clone();
let flags = quote! {#(--#flag_idents_clone) *}
.to_string()
.replace("- - ", "--")
.replace('_', "-");
let called_flag_arguments = quote! {#(%#flag_idents%) *}
.to_string()
.replace(" %", "%")
.replace("% ", "%")
.replace("%%", "% %");
let flags_split: Vec<_> = flags.split(' ').collect();
let flag_args_split: Vec<_> = called_flag_arguments.split(' ').collect();
let mut consolidated_flags: Vec<String> = Vec::new();
for (idx, flag) in flags_split.iter().enumerate() {
consolidated_flags.push(format!("{} {}", flag, flag_args_split[idx]));
}
let all_flags = consolidated_flags.join(" ");
quote! {
impl AhkFunction for #name {
fn generate_ahk_function() -> String {
::std::format!(r#"
{}({}) {{
RunWait, komorebic.exe {} {} {}, , Hide
}}"#,
::std::stringify!(#name),
#all_arguments,
::std::stringify!(#name).to_kebab_case(),
#called_arguments,
#all_flags,
)
}
}
}
} else {
let arguments = quote! {#(#argument_idents), *}.to_string();
quote! {
impl AhkFunction for #name {
fn generate_ahk_function() -> String {
::std::format!(r#"
{}({}) {{
RunWait, komorebic.exe {} {}, , Hide
}}"#,
::std::stringify!(#name),
#arguments,
::std::stringify!(#name).to_kebab_case(),
#called_arguments
)
}
}
}
}
}
_ => unreachable!("only to be used on structs with named fields"),
},
_ => unreachable!("only to be used on structs"),
}
.into()
}
#[proc_macro_derive(AhkLibrary)]
pub fn ahk_library(input: ::proc_macro::TokenStream) -> ::proc_macro::TokenStream {
let input = parse_macro_input!(input as DeriveInput);
let name = input.ident;
match input.data {
Data::Enum(DataEnum { variants, .. }) => {
let enums = variants.iter().filter(|&v| {
matches!(v.fields, Fields::Unit) || matches!(v.fields, Fields::Unnamed(..))
});
let mut stream = ::proc_macro2::TokenStream::new();
for variant in enums.clone() {
match &variant.fields {
Fields::Unnamed(FieldsUnnamed { unnamed, .. }) => {
for field in unnamed {
stream.extend(quote! {
v.push(#field::generate_ahk_function());
});
}
}
Fields::Unit => {
let name = &variant.ident;
stream.extend(quote! {
v.push(::std::format!(r#"
{}() {{
RunWait, komorebic.exe {}, , Hide
}}"#,
::std::stringify!(#name),
::std::stringify!(#name).to_kebab_case()
));
});
}
Fields::Named(_) => {
unreachable!("only to be used with unnamed and unit fields");
}
}
}
quote! {
impl #name {
fn generate_ahk_library() -> String {
let mut v: Vec<String> = vec![String::from("; Generated by komorebic.exe")];
#stream
v.join("\n")
}
}
}
}
_ => unreachable!("only to be used on enums"),
}
.into()
}

View File

@@ -0,0 +1,19 @@
# adjust-container-padding
```
Adjust container padding on the focused workspace
Usage: komorebic.exe adjust-container-padding <SIZING> <ADJUSTMENT>
Arguments:
<SIZING>
[possible values: increase, decrease]
<ADJUSTMENT>
Pixels to adjust by as an integer
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# adjust-workspace-padding
```
Adjust workspace padding on the focused workspace
Usage: komorebic.exe adjust-workspace-padding <SIZING> <ADJUSTMENT>
Arguments:
<SIZING>
[possible values: increase, decrease]
<ADJUSTMENT>
Pixels to adjust by as an integer
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# ahk-app-specific-configuration
```
Generate common app-specific configurations and fixes to use in komorebi.ahk
Usage: komorebic.exe ahk-app-specific-configuration <PATH> [OVERRIDE_PATH]
Arguments:
<PATH>
YAML file from which the application-specific configurations should be loaded
[OVERRIDE_PATH]
Optional YAML file of overrides to apply over the first file
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,21 @@
# animation-duration
```
Set the duration for movement animations in ms
Usage: komorebic.exe animation-duration [OPTIONS] <DURATION>
Arguments:
<DURATION>
Desired animation durations in ms
Options:
-a, --animation-type <ANIMATION_TYPE>
Animation type to apply the duration to. If not specified, sets global duration
[possible values: movement, transparency]
-h, --help
Print help
```

16
docs/cli/animation-fps.md Normal file
View File

@@ -0,0 +1,16 @@
# animation-fps
```
Set the frames per second for movement animations
Usage: komorebic.exe animation-fps <FPS>
Arguments:
<FPS>
Desired animation frames per second
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,24 @@
# animation-style
```
Set the ease function for movement animations
Usage: komorebic.exe animation-style [OPTIONS]
Options:
-s, --style <STYLE>
Desired ease function for animation
[default: linear]
[possible values: linear, ease-in-sine, ease-out-sine, ease-in-out-sine, ease-in-quad, ease-out-quad, ease-in-out-quad, ease-in-cubic, ease-in-out-cubic, ease-in-quart, ease-out-quart, ease-in-out-quart, ease-in-quint, ease-out-quint, ease-in-out-quint, ease-in-expo,
ease-out-expo, ease-in-out-expo, ease-in-circ, ease-out-circ, ease-in-out-circ, ease-in-back, ease-out-back, ease-in-out-back, ease-in-elastic, ease-out-elastic, ease-in-out-elastic, ease-in-bounce, ease-out-bounce, ease-in-out-bounce]
-a, --animation-type <ANIMATION_TYPE>
Animation type to apply the style to. If not specified, sets global style
[possible values: movement, transparency]
-h, --help
Print help
```

21
docs/cli/animation.md Normal file
View File

@@ -0,0 +1,21 @@
# animation
```
Enable or disable movement animations
Usage: komorebic.exe animation [OPTIONS] <BOOLEAN_STATE>
Arguments:
<BOOLEAN_STATE>
[possible values: enable, disable]
Options:
-a, --animation-type <ANIMATION_TYPE>
Animation type to apply the state to. If not specified, sets global state
[possible values: movement, transparency]
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# application-specific-configuration-schema
```
Generate a JSON Schema for applications.json
Usage: komorebic.exe application-specific-configuration-schema
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# bar-configuration
```
Show the path to komorebi.bar.json
Usage: komorebic.exe bar-configuration
Options:
-h, --help
Print help
```

26
docs/cli/border-colour.md Normal file
View File

@@ -0,0 +1,26 @@
# border-colour
```
Set the colour for a window border kind
Usage: komorebic.exe border-colour [OPTIONS] <R> <G> <B>
Arguments:
<R>
Red
<G>
Green
<B>
Blue
Options:
-w, --window-kind <WINDOW_KIND>
[default: single]
[possible values: single, stack, monocle, unfocused, unfocused-locked, floating]
-h, --help
Print help
```

View File

@@ -0,0 +1,20 @@
# border-implementation
```
Set the border implementation
Usage: komorebic.exe border-implementation <STYLE>
Arguments:
<STYLE>
Desired border implementation
Possible values:
- komorebi: Use the adjustable komorebi border implementation
- windows: Use the thin Windows accent border implementation
Options:
-h, --help
Print help (see a summary with '-h')
```

16
docs/cli/border-offset.md Normal file
View File

@@ -0,0 +1,16 @@
# border-offset
```
Set the border offset
Usage: komorebic.exe border-offset <OFFSET>
Arguments:
<OFFSET>
Desired offset of the window border
Options:
-h, --help
Print help
```

21
docs/cli/border-style.md Normal file
View File

@@ -0,0 +1,21 @@
# border-style
```
Set the border style
Usage: komorebic.exe border-style <STYLE>
Arguments:
<STYLE>
Desired border style
Possible values:
- system: Use the system border style
- rounded: Use the Windows 11-style rounded borders
- square: Use the Windows 10-style square borders
Options:
-h, --help
Print help (see a summary with '-h')
```

16
docs/cli/border-width.md Normal file
View File

@@ -0,0 +1,16 @@
# border-width
```
Set the border width
Usage: komorebic.exe border-width <WIDTH>
Arguments:
<WIDTH>
Desired width of the window border
Options:
-h, --help
Print help
```

16
docs/cli/border.md Normal file
View File

@@ -0,0 +1,16 @@
# border
```
Enable or disable borders
Usage: komorebic.exe border <BOOLEAN_STATE>
Arguments:
<BOOLEAN_STATE>
[possible values: enable, disable]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# cancel-preselect
```
Cancel a workspace preselect set by the preselect-direction command, if one exists
Usage: komorebic.exe cancel-preselect
Options:
-h, --help
Print help
```

16
docs/cli/change-layout.md Normal file
View File

@@ -0,0 +1,16 @@
# change-layout
```
Set the layout on the focused workspace
Usage: komorebic.exe change-layout <DEFAULT_LAYOUT>
Arguments:
<DEFAULT_LAYOUT>
[possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack, grid, right-main-vertical-stack, scrolling]
Options:
-h, --help
Print help
```

15
docs/cli/check.md Normal file
View File

@@ -0,0 +1,15 @@
# check
```
Check komorebi configuration and related files for common errors
Usage: komorebic.exe check [OPTIONS]
Options:
-k, --komorebi-config <KOMOREBI_CONFIG>
Path to a static configuration JSON file
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# clear-all-workspace-rules
```
Remove all application association rules for all workspaces
Usage: komorebic.exe clear-all-workspace-rules
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# clear-named-workspace-layout-rules
```
Clear all dynamic layout rules for the specified workspace
Usage: komorebic.exe clear-named-workspace-layout-rules <WORKSPACE>
Arguments:
<WORKSPACE>
Target workspace name
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# clear-named-workspace-rules
```
Remove all application association rules for a named workspace
Usage: komorebic.exe clear-named-workspace-rules <WORKSPACE>
Arguments:
<WORKSPACE>
Name of a workspace
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# clear-session-float-rules
```
Clear all session float rules
Usage: komorebic.exe clear-session-float-rules
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# clear-workspace-layout-rules
```
Clear all dynamic layout rules for the specified workspace
Usage: komorebic.exe clear-workspace-layout-rules <MONITOR> <WORKSPACE>
Arguments:
<MONITOR>
Monitor index (zero-indexed)
<WORKSPACE>
Workspace index on the specified monitor (zero-indexed)
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# clear-workspace-rules
```
Remove all application association rules for a workspace by monitor and workspace index
Usage: komorebic.exe clear-workspace-rules <MONITOR> <WORKSPACE>
Arguments:
<MONITOR>
Monitor index (zero-indexed)
<WORKSPACE>
Workspace index on the specified monitor (zero-indexed)
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# close-workspace
```
Close the focused workspace (must be empty and unnamed)
Usage: komorebic.exe close-workspace
Options:
-h, --help
Print help
```

12
docs/cli/close.md Normal file
View File

@@ -0,0 +1,12 @@
# close
```
Close the focused window
Usage: komorebic.exe close
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# complete-configuration
```
For legacy komorebi.ahk or komorebi.ps1 configurations, signal that the final configuration option has been sent
Usage: komorebic.exe complete-configuration
Options:
-h, --help
Print help
```

12
docs/cli/configuration.md Normal file
View File

@@ -0,0 +1,12 @@
# configuration
```
Show the path to komorebi.json
Usage: komorebic.exe configuration
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,22 @@
# container-padding
```
Set the container padding for the specified workspace
Usage: komorebic.exe container-padding <MONITOR> <WORKSPACE> <SIZE>
Arguments:
<MONITOR>
Monitor index (zero-indexed)
<WORKSPACE>
Workspace index on the specified monitor (zero-indexed)
<SIZE>
Pixels to pad with as an integer
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# convert-app-specific-configuration
```
Convert a v1 ASC YAML file to a v2 ASC JSON file
Usage: komorebic.exe convert-app-specific-configuration <PATH>
Arguments:
<PATH>
YAML file from which the application-specific configurations should be loaded
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# cross-monitor-move-behaviour
```
Set the behaviour when moving windows across monitor boundaries
Usage: komorebic.exe cross-monitor-move-behaviour <MOVE_BEHAVIOUR>
Arguments:
<MOVE_BEHAVIOUR>
Possible values:
- swap: Swap the window container with the window container at the edge of the adjacent monitor
- insert: Insert the window container into the focused workspace on the adjacent monitor
- no-op: Do nothing if trying to move a window container in the direction of an adjacent monitor
Options:
-h, --help
Print help (see a summary with '-h')
```

View File

@@ -0,0 +1,16 @@
# cycle-empty-workspace
```
Focus the next empty workspace in the given cycle direction (if one exists)
Usage: komorebic.exe cycle-empty-workspace <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

16
docs/cli/cycle-focus.md Normal file
View File

@@ -0,0 +1,16 @@
# cycle-focus
```
Change focus to the window in the specified cycle direction
Usage: komorebic.exe cycle-focus <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

16
docs/cli/cycle-layout.md Normal file
View File

@@ -0,0 +1,16 @@
# cycle-layout
```
Cycle between available layouts
Usage: komorebic.exe cycle-layout <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

16
docs/cli/cycle-monitor.md Normal file
View File

@@ -0,0 +1,16 @@
# cycle-monitor
```
Focus the monitor in the given cycle direction
Usage: komorebic.exe cycle-monitor <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# cycle-move-to-monitor
```
Move the focused window to the monitor in the given cycle direction
Usage: komorebic.exe cycle-move-to-monitor <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# cycle-move-to-workspace
```
Move the focused window to the workspace in the given cycle direction
Usage: komorebic.exe cycle-move-to-workspace <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# cycle-move-workspace-to-monitor
```
Move the focused workspace monitor in the given cycle direction
Usage: komorebic.exe cycle-move-workspace-to-monitor <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

16
docs/cli/cycle-move.md Normal file
View File

@@ -0,0 +1,16 @@
# cycle-move
```
Move the focused window in the specified cycle direction
Usage: komorebic.exe cycle-move <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# cycle-send-to-monitor
```
Send the focused window to the monitor in the given cycle direction
Usage: komorebic.exe cycle-send-to-monitor <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# cycle-send-to-workspace
```
Send the focused window to the workspace in the given cycle direction
Usage: komorebic.exe cycle-send-to-workspace <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# cycle-stack-index
```
Cycle the index of the focused window in the focused stack in the specified cycle direction
Usage: komorebic.exe cycle-stack-index <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

16
docs/cli/cycle-stack.md Normal file
View File

@@ -0,0 +1,16 @@
# cycle-stack
```
Cycle the focused stack in the specified cycle direction
Usage: komorebic.exe cycle-stack <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# cycle-workspace
```
Focus the workspace in the given cycle direction
Usage: komorebic.exe cycle-workspace <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# data-directory
```
Show the path to komorebi's data directory in %LOCALAPPDATA%
Usage: komorebic.exe data-directory
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# disable-autostart
```
Deletes the komorebi.lnk shortcut in shell:startup to disable autostart
Usage: komorebic.exe disable-autostart
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# display-index-preference
```
Set the display index preference for a monitor identified using its display name
Usage: komorebic.exe display-index-preference <INDEX_PREFERENCE> <DISPLAY>
Arguments:
<INDEX_PREFERENCE>
Preferred monitor index (zero-indexed)
<DISPLAY>
Display name as identified in komorebic state
Options:
-h, --help
Print help
```

16
docs/cli/eager-focus.md Normal file
View File

@@ -0,0 +1,16 @@
# eager-focus
```
Focus the first managed window matching the given exe
Usage: komorebic.exe eager-focus <EXE>
Arguments:
<EXE>
Case-sensitive exe identifier
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,24 @@
# enable-autostart
```
Generates the komorebi.lnk shortcut in shell:startup to autostart komorebi
Usage: komorebic.exe enable-autostart [OPTIONS]
Options:
-c, --config <CONFIG>
Path to a static configuration JSON file
--whkd
Enable autostart of whkd
--bar
Enable autostart of komorebi-bar
--masir
Enable autostart of masir
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# enforce-workspace-rules
```
Enforce all workspace rules, including initial workspace rules that have already been applied
Usage: komorebic.exe enforce-workspace-rules
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# ensure-named-workspaces
```
Create these many named workspaces for the specified monitor
Usage: komorebic.exe ensure-named-workspaces <MONITOR> [NAMES]...
Arguments:
<MONITOR>
Monitor index (zero-indexed)
[NAMES]...
Names of desired workspaces
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# ensure-workspaces
```
Create at least this many workspaces for the specified monitor
Usage: komorebic.exe ensure-workspaces <MONITOR> <WORKSPACE_COUNT>
Arguments:
<MONITOR>
Monitor index (zero-indexed)
<WORKSPACE_COUNT>
Number of desired workspaces
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# fetch-app-specific-configuration
```
Fetch the latest version of applications.json from komorebi-application-specific-configuration
Usage: komorebic.exe fetch-app-specific-configuration
Options:
-h, --help
Print help
```

16
docs/cli/flip-layout.md Normal file
View File

@@ -0,0 +1,16 @@
# flip-layout
```
Flip the layout on the focused workspace
Usage: komorebic.exe flip-layout <AXIS>
Arguments:
<AXIS>
[possible values: horizontal, vertical, horizontal-and-vertical]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# focus-last-workspace
```
Focus the last focused workspace on the focused monitor
Usage: komorebic.exe focus-last-workspace
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# focus-monitor-at-cursor
```
Focus the monitor at the current cursor location
Usage: komorebic.exe focus-monitor-at-cursor
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# focus-monitor-workspace
```
Focus the specified workspace on the target monitor
Usage: komorebic.exe focus-monitor-workspace <TARGET_MONITOR> <TARGET_WORKSPACE>
Arguments:
<TARGET_MONITOR>
Target monitor index (zero-indexed)
<TARGET_WORKSPACE>
Workspace index on the target monitor (zero-indexed)
Options:
-h, --help
Print help
```

16
docs/cli/focus-monitor.md Normal file
View File

@@ -0,0 +1,16 @@
# focus-monitor
```
Focus the specified monitor
Usage: komorebic.exe focus-monitor <TARGET>
Arguments:
<TARGET>
Target index (zero-indexed)
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# focus-named-workspace
```
Focus the specified workspace
Usage: komorebic.exe focus-named-workspace <WORKSPACE>
Arguments:
<WORKSPACE>
Target workspace name
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# focus-stack-window
```
Focus the specified window index in the focused stack
Usage: komorebic.exe focus-stack-window <TARGET>
Arguments:
<TARGET>
Target index (zero-indexed)
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# focus-workspace
```
Focus the specified workspace on the focused monitor
Usage: komorebic.exe focus-workspace <TARGET>
Arguments:
<TARGET>
Target index (zero-indexed)
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# focus-workspaces
```
Focus the specified workspace on all monitors
Usage: komorebic.exe focus-workspaces <TARGET>
Arguments:
<TARGET>
Target index (zero-indexed)
Options:
-h, --help
Print help
```

16
docs/cli/focus.md Normal file
View File

@@ -0,0 +1,16 @@
# focus
```
Change focus to the window in the specified direction
Usage: komorebic.exe focus <OPERATION_DIRECTION>
Arguments:
<OPERATION_DIRECTION>
[possible values: left, right, up, down]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# focused-workspace-container-padding
```
Set container padding on the focused workspace
Usage: komorebic.exe focused-workspace-container-padding <SIZE>
Arguments:
<SIZE>
Pixels size to set as an integer
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# focused-workspace-padding
```
Set workspace padding on the focused workspace
Usage: komorebic.exe focused-workspace-padding <SIZE>
Arguments:
<SIZE>
Pixels size to set as an integer
Options:
-h, --help
Print help
```

12
docs/cli/force-focus.md Normal file
View File

@@ -0,0 +1,12 @@
# force-focus
```
Forcibly focus the window at the cursor with a left mouse click
Usage: komorebic.exe force-focus
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# generate-static-config
```
Generates a static configuration JSON file based on the current window manager state
Usage: komorebic.exe generate-static-config
Options:
-h, --help
Print help
```

12
docs/cli/global-state.md Normal file
View File

@@ -0,0 +1,12 @@
# global-state
```
Show a JSON representation of the current global state
Usage: komorebic.exe global-state
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,25 @@
# global-work-area-offset
```
Set offsets to exclude parts of the work area from tiling
Usage: komorebic.exe global-work-area-offset <LEFT> <TOP> <RIGHT> <BOTTOM>
Arguments:
<LEFT>
Size of the left work area offset (set right to left * 2 to maintain right padding)
<TOP>
Size of the top work area offset (set bottom to the same value to maintain bottom padding)
<RIGHT>
Size of the right work area offset
<BOTTOM>
Size of the bottom work area offset
Options:
-h, --help
Print help
```

12
docs/cli/gui.md Normal file
View File

@@ -0,0 +1,12 @@
# gui
```
Launch the komorebi-gui debugging tool
Usage: komorebic.exe gui
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# identify-layered-application
```
Identify an application that has WS_EX_LAYERED, but should still be managed
Usage: komorebic.exe identify-layered-application <IDENTIFIER> <ID>
Arguments:
<IDENTIFIER>
[possible values: exe, class, title, path]
<ID>
Identifier as a string
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# identify-object-name-change-application
```
Identify an application that sends EVENT_OBJECT_NAMECHANGE on launch
Usage: komorebic.exe identify-object-name-change-application <IDENTIFIER> <ID>
Arguments:
<IDENTIFIER>
[possible values: exe, class, title, path]
<ID>
Identifier as a string
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# identify-tray-application
```
Identify an application that closes to the system tray
Usage: komorebic.exe identify-tray-application <IDENTIFIER> <ID>
Arguments:
<IDENTIFIER>
[possible values: exe, class, title, path]
<ID>
Identifier as a string
Options:
-h, --help
Print help
```

19
docs/cli/ignore-rule.md Normal file
View File

@@ -0,0 +1,19 @@
# ignore-rule
```
Add a rule to ignore the specified application
Usage: komorebic.exe ignore-rule <IDENTIFIER> <ID>
Arguments:
<IDENTIFIER>
[possible values: exe, class, title, path]
<ID>
Identifier as a string
Options:
-h, --help
Print help
```

Some files were not shown because too many files have changed in this diff Show More