Compare commits

...

80 Commits

Author SHA1 Message Date
LGUG2Z
6cf99a3578 feat(config): initial outline of composite rules 2024-03-20 12:24:12 -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
202 changed files with 6857 additions and 4382 deletions

View File

@@ -73,6 +73,11 @@ jobs:
- name: Install the target
run: |
rustup target install ${{ matrix.target }}
- name: Run Cargo checks
run: |
cargo fmt --check
cargo check
cargo clippy
- name: Run a full build
run: |
cargo build --locked --release --target ${{ matrix.target }}
@@ -87,10 +92,17 @@ jobs:
path: |
target/${{ matrix.target }}/release/komorebi.exe
target/${{ matrix.target }}/release/komorebic.exe
target/${{ matrix.target }}/release/komorebic-no-console.exe
target/${{ matrix.target }}/release/komorebi.pdb
target/${{ matrix.target }}/release/komorebic.pdb
target/${{ matrix.target }}/release/komorebic-no-console.pdb
target/wix/komorebi-*.msi
retention-days: 7
- name: Check GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: build --skip=validate --clean
# Release
- name: Generate changelog
@@ -104,12 +116,12 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v')
with:
version: latest
args: release --skip-validate --clean --release-notes=CHANGELOG.md
args: release --skip=validate --clean --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
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/v')
with:
files: "target/wix/komorebi-*.msi"

View File

@@ -34,7 +34,7 @@ builds:
hooks:
post:
- mkdir -p dist/windows_amd64
- cp ".\target\x86_64-pc-windows-msvc\release\komorebic-no-console.exe" ".\dist\komorebic_no_console_windows_amd64_v1\komorebic-no-console.exe"
- cp ".\target\x86_64-pc-windows-msvc\release\komorebic-no-console.exe" ".\dist\komorebic-no-console_windows_amd64_v1\komorebic-no-console.exe"
archives:
- name_template: "{{ .ProjectName }}-{{ .Version }}-x86_64-pc-windows-msvc"

923
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,20 +4,22 @@ resolver = "2"
members = [
"derive-ahk",
"komorebi",
"komorebi-client",
"komorebi-core",
"komorebic",
"komorebic-no-console",
]
[workspace.dependencies]
windows-interface = { version = "0.52" }
windows-implement = { version = "0.52" }
windows-interface = { version = "0.53" }
windows-implement = { version = "0.53" }
dunce = "1"
dirs = "5"
color-eyre = "0.6"
serde_json = { package = "serde_json_lenient", version = "0.1" }
[workspace.dependencies.windows]
version = "0.52"
version = "0.54"
features = [
"implement",
"Win32_System_Com",

852
README.md
View File

@@ -29,74 +29,44 @@ Tiling Window Management for Windows.
![screenshot](https://user-images.githubusercontent.com/13164844/184027064-f5a6cec2-2865-4d65-a549-a1f1da589abf.png)
- [About](#about)
- [Charitable Donations](#charitable-donations)
- [GitHub Sponsors](#github-sponsors)
- [Demonstrations](#demonstrations)
- [Description](#description)
- [Design](#design)
- [Getting Started](#getting-started)
- [Quickstart](#quickstart)
- [GitHub Releases](#github-releases)
- [Building from Source](#building-from-source)
- [Running](#running)
- [Configuring](#configuring)
- [Common First-Time Tips](#common-first-time-tips)
- [Development](#development)
- [Logs and Debugging](#logs-and-debugging)
- [Restoring Windows](#restoring-windows)
- [Panics and Deadlocks](#panics-and-deadlocks)
- [Window Manager State and Integrations](#window-manager-state-and-integrations)
- [Window Manager Event Subscriptions](#window-manager-event-subscriptions)
- [Subscription Event Notification Schema](#subscription-event-notification-schema)
- [Communication over TCP](#communication-over-tcp)
- [Socket Message Schema](#socket-message-schema)
- [Appreciations](#appreciations)
## About
_komorebi_ is a tiling window manager that works as an extension to
Microsoft's [Desktop Window Manager](https://docs.microsoft.com/en-us/windows/win32/dwm/dwm-overview) in Windows 10 and
above.
_komorebi_ is a tiling window manager that works as an extension to Microsoft's
[Desktop Window
Manager](https://docs.microsoft.com/en-us/windows/win32/dwm/dwm-overview) in
Windows 10 and above.
_komorebi_ allows you to control application windows, virtual workspaces and display monitors with a CLI which can be
used with third-party software such as [AutoHotKey](https://github.com/Lexikos/AutoHotkey_L) to set user-defined
keyboard shortcuts.
used with third-party software such as [`whkd`](https://github.com/LGUG2Z/whkd)
and [AutoHotKey](https://github.com/Lexikos/AutoHotkey_L) to set user-defined keyboard shortcuts.
_komorebi_ aims to make _as few modifications as possible_ to the operating system and desktop environment by default.
Users are free to make such modifications in their own configuration files for _komorebi_, but these will remain
opt-in and off-by-default for the foreseeable future.
_komorebi_ aims to make _as few modifications as possible_ to the operating
system and desktop environment by default. Users are free to make such
modifications in their own configuration files for _komorebi_, but these will
remain opt-in and off-by-default for the foreseeable future.
Translations of this document can be found in the project wiki:
Please refer to the [documentation](https://lgug2z.github.io/komorebi) for instructions on how
to [install](https://lgug2z.github.io/komorebi/installation.html) and
[configure](https://lgug2z.github.io/komorebi/example-configurations.html)
_komorebi_, [common workflows](https://lgug2z.github.io/komorebi/common-workflows/komorebi-config-home.html), a complete
[configuration schema reference](https://komorebi.lgug2z.com/schema) and a
complete [CLI reference](https://lgug2z.github.io/komorebi/cli/quickstart.html).
- [komorebi 中文用户指南](https://github.com/LGUG2Z/komorebi/wiki/README-zh) (by [@crosstyan](https://github.com/crosstyan))
There is a [Discord server](https://discord.gg/mGkn66PHkx) available for _komorebi_-related discussion, help,
troubleshooting etc. If you have any specific feature requests or bugs to report, please create an issue in this
There is a [Discord server](https://discord.gg/mGkn66PHkx) available for
_komorebi_-related discussion, help, troubleshooting etc. If you have any
specific feature requests or bugs to report, please create an issue in this
repository.
There is a [YouTube channel](https://www.youtube.com/channel/UCeai3-do-9O4MNy9_xjO6mg) where I livestream development
on _komorebi_. If you would like to be notified of upcoming livestreams please subscribe and turn on
notifications. Videos of previous livestreams are also made available in
a [dedicated playlist](https://www.youtube.com/playlist?list=PLllZnrEJu89Cpu4tMO8LAg1m6gWYWLSGJ).
There is a [YouTube
channel](https://www.youtube.com/channel/UCeai3-do-9O4MNy9_xjO6mg) where I post
_komorebi_ development videos. If you would like to be notified of upcoming
videos please subscribe and turn on notifications.
Articles, blog posts, demos, and videos about _komorebi_ can be added to this list by PR:
- [Moving to Windows from Linux Pt 1](https://kvwu.io/posts/moving-to-windows/)
- [Windows 下的现代化平铺窗口管理器 komorebi](https://zhuanlan.zhihu.com/p/455064481)
- [komorebi を導入してみる](https://zenn.dev/omochice/articles/50f42a3df8f426)
## Charitable Donations
_komorebi_ is a free and open-source project, and one that encourages you to make charitable donations if
you find the software to be useful and have the financial means.
_komorebi_ is a free and open-source project, and one that encourages you to
make charitable donations if you find the software to be useful and have the
financial means.
I encourage you to make a charitable donation to the [Palestine Children's
Relief Fund](https://pcrf1.app.neoncrm.com/forms/gaza-recovery) and [Fresh
Start Refugee](https://www.freshstartrefugee.org/donate) before you consider
sponsoring me on GitHub.
## Project Sponsorship
Relief Fund](https://pcrf1.app.neoncrm.com/forms/gaza-recovery) before you
consider sponsoring me on GitHub.
[GitHub Sponsors is enabled for this
project](https://github.com/sponsors/LGUG2Z). Unfortunately I don't have
@@ -106,7 +76,15 @@ _komorebi_ live development videos and tutorials.
If you would like to tip or sponsor the project but are unable to use GitHub
Sponsors, you may also sponsor through [Ko-fi](https://ko-fi.com/lgug2z).
## Demonstrations
# Installation
A [detailed installation and quickstart
guide](https://lgug2z.github.io/komorebi/installation.html) is available which shows how to get started
using `scoop`, `winget` or building from source.
[![Watch the quickstart walkthrough video](https://img.youtube.com/vi/H9-_c1egQ4g/hqdefault.jpg)](https://www.youtube.com/watch?v=H9-_c1egQ4g)
# Demonstrations
[@haxibami](https://github.com/haxibami) showing _komorebi_ running on Windows
11 with a terminal emulator, a web browser and a code editor. The original
@@ -123,560 +101,76 @@ widget enabled. The original video can be viewed
https://user-images.githubusercontent.com/13164844/163496414-a9cde3d1-b8a7-4a7a-96fb-a8985380bc70.mp4
## Description
# Contribution Guidelines
_komorebi_ only responds to [WinEvents](https://docs.microsoft.com/en-us/windows/win32/winauto/event-constants) and the
messages it receives on a dedicated socket.
If you would like to contribute to `komorebi` please take the time to carefully read the guidelines below.
_komorebic_ is a CLI that writes messages on _komorebi_'s socket.
_komorebi_ doesn't handle any keyboard or mouse inputs; a third party program (e.g.
[whkd](https://github.com/LGUG2Z/whkd)) is needed in order to translate keyboard and mouse events to _komorebic_ commands.
This architecture, popularised by [_bspwm_](https://github.com/baskerville/bspwm) on Linux and
[_yabai_](https://github.com/koekeishiya/yabai) on macOS, is outlined as follows:
```
PROCESS SOCKET
whkd/ahk --------> komorebic <------> komorebi
```
## Design
_komorebi_ holds a list of physical monitors.
A monitor is just a rectangle of the available work area which contains one or more virtual workspaces.
A workspace holds a list of containers.
A container is just a rectangle where one or more application windows can be displayed.
This means that:
- Every monitor has its own collection of virtual workspaces
- Workspaces only know about containers and their dimensions, not about individual application windows
- Every application window must belong to a container, even if that container only contains one application window
- Many application windows can be stacked and cycled through in the same container within a workspace
## Getting Started
### Quickstart
It highly recommended that you enable support for long paths in Windows by running the following command in an
Administrator Terminal before starting with this quickstart guide:
```powershell
Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1
```
Make sure that you have either the [Scoop Package Manager](https://scoop.sh) or WinGet installed, then run the following
commands at a PowerShell prompt. If you are using WinGet, make sure that you open a new terminal window or reload your
profile after running the installation steps. Since this is not required when using `scoop`, I personally recommend that
you use `scoop` for this process.
As of v0.1.17, the quickstart recommends the use of a static configuration file. If you would like to see older versions
of this quickstart which recommend the use of dynamic configuration scripts, please refer to
the [README file of v0.1.16](https://github.com/LGUG2Z/komorebi/tree/v0.1.16).
```powershell
# if using scoop
scoop bucket add extras
scoop install whkd
scoop install komorebi
# if using winget
winget install LGUG2Z.whkd
winget install LGUG2Z.komorebi
# save the example configuration to ~/komorebi.json
iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.19/komorebi.example.json -OutFile "$Env:USERPROFILE\komorebi.json"
# save the latest generated app-specific config tweaks and fixes
komorebic fetch-app-specific-configuration
# ensure the ~/.config folder exists
mkdir "$Env:USERPROFILE\.config" -ea 0
# save the sample whkdrc file with key bindings to ~/.config/whkdrc
iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.19/whkdrc.sample -OutFile "$Env:USERPROFILE\.config\whkdrc"
# start komorebi and whkd
komorebic start -c "$Env:USERPROFILE\komorebi.json" --whkd
```
Thanks to [@sitiom](https://github.com/sitiom) for getting _komorebi_ added to both the popular Scoop Extras bucket and
to WinGet.
You can watch a walkthrough video of this quickstart below on YouTube.
[![Watch the quickstart walkthrough video](https://img.youtube.com/vi/hDDxtvpjpHs/hqdefault.jpg)](https://www.youtube.com/watch?v=hDDxtvpjpHs)
#### Using Autohotkey
If you would like to use Autohotkey, please make sure you have AutoHotKey v2 installed.
Generally, users who opt for AHK will have specific needs that can only be addressed by the advanced functionality of AHK,
and so they are assumed to be able to craft their own configuration files.
If you would like to try out AHK, a simple sample configuration powered by `komorebic.lib.ahk` is provided as a starting
point. This sample configuration does not take into account the use of a static configuration file; if you choose to use
a static configuration file alongside AHK, you can remove all the configuration options from your `komorebi.ahk` and use
it solely to handle hotkey bindings.
```powershell
# save the latest generated komorebic library to ~/komorebic.lib.ahk
iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.19/komorebic.lib.ahk -OutFile $Env:USERPROFILE\komorebic.lib.ahk
# save the latest generated app-specific config tweaks and fixes to ~/komorebi.generated.ahk
iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.19/komorebi.generated.ahk -OutFile $Env:USERPROFILE\komorebi.generated.ahk
# save the sample komorebi configuration file to ~/komorebi.ahk
iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.19/komorebi.sample.ahk -OutFile $Env:USERPROFILE\komorebi.ahk
```
### GitHub Releases
Prebuilt binaries are available on the [releases page](https://github.com/LGUG2Z/komorebi/releases) in a `zip` archive.
Once downloaded, you will need to move the `komorebi.exe` and `komorebic.exe` binaries to a directory in your `Path` (
you can see these directories by running `$Env:Path.split(";")` at a PowerShell prompt).
### Building from Source
If you prefer to compile _komorebi_ from source, you will need
a [working Rust development environment on Windows 10/11](https://rustup.rs/). The `x86_64-pc-windows-msvc` toolchain is
required, so make sure you have also installed
the [Build Tools for Visual Studio 2019](https://stackoverflow.com/a/55603112).
You can then clone this repo and compile the source code to install the binaries for `komorebi` and `komorebic`:
```powershell
cargo install --path komorebi --locked
cargo install --path komorebic --locked
```
### Running
`komorebi` can be run in two ways, using either a static configuration file or a dynamic configuration script.
The quickstart covers running with a static configuration file.
If you would like to use a dynamic configuration script, ensure that you have a `komorebi.ps1` or `komorebi.ahk` file
present, run `komorebic start --await-configuration` at a Powershell prompt, and you will see the following output:
```
Start-Process komorebi.exe -ArgumentList '--await-configuration' -WindowStyle hidden
Waiting for komorebi.exe to start...Started!
```
This means that `komorebi` is now running in the background, tiling all your windows, and listening for commands sent to
it by `komorebic`. You can similarly stop the process by running `komorebic stop`.
For further information on running with a dynamic configuration script, please refer to
the quickstart section in the [README file of v0.1.16](https://github.com/LGUG2Z/komorebi/tree/v0.1.16)
### Configuring
If you followed the quickstart, `komorebi.json` will be the single place where you declaratively configure the behaviour
of the window manager. There is a [complete JSON Schema for this configuration file](schema.json) available to provide
users with auto-completions in their editors.
If you are running with a dynamic configuration script as recommended in v0.1.16 and earlier, `komorebi` will find the
sample `komorebi.ps1` file in your `$Env:USERPROFILE` directory and automatically load it. This file also starts `whkd` using the sample `whkdrc` file
in your `$Env:USERPROFILE\.config` directory.
Alternatively, if you have AutoHotKey installed and a `komorebi.ahk` file in `$Env:UserProfile` directory, `komorebi`
will automatically try to load it when starting.
#### Migrating to a Static Configuration File
If you have been using `komorebi` with a dynamic configuration script and wish to migrate to using a static
configuration file, once you have `komorebi` running in the desired configuration state, you can
run `komorebic generate-static-config`.
This will print a static configuration that mostly represents your current configuration to the terminal.
There are four configuration options that you may need to set yourself, if you make use of them:
- Custom layouts paths for workspaces
- Custom layout rules for workspaces
- The applications.yaml path
- Any individual application rules you have that are not in applications.yaml
[![Watch the tutorial video](https://img.youtube.com/vi/yqCAOJgL3C0/hqdefault.jpg)](https://www.youtube.com/watch?v=yqCAOJgL3C0)
#### Configuration with `komorebic`
As previously mentioned, this project does not handle anything related to keybindings and shortcuts directly. I
personally use [`whkd`](https://github.com/LGUG2Z/whkd) to manage my window management shortcuts, and have provided a
sample [whkdrc](whkdrc.sample) configuration that you can use as a starting point for your own.
You can run `komorebic.exe` to get a full list of the commands that you can use to customise `komorebi` and create
keybindings with. You can run `komorebic.exe <COMMAND> --help` to get a full explanation of the arguments required for
each command.
You can run any configuration command in the `komorebi.ps1` file, and you can bind any action command to your desired
key combinations in the `whkdrc` file.
#### AutoHotKey Helper Library for `komorebic`
❗️**NOTE**: This section is only relevant for people who wish to use AutoHotKey instead of [`whkd`](https://github.com/LGUG2Z/whkd).
❗️**NOTE**: This helper library is only compatible with AutoHotKey v1.1, not with AutoHotKey v2.
Additionally, you may run `komorebic.exe ahk-library` to generate a helper library for AutoHotKey which wraps
every `komorebic` command in a native AHK function.
The output of this command is in AHKv1 syntax. It must be manually converted to AHKv2 syntax
using [this tool](https://github.com/mmikeww/AHK-v2-script-converter) or something similar.
If you include the generated library at the top of your `~/komorebi.ahk` configuration file, you will be able to call
any of the functions that it contains.
#### Using Different AHK Executables
❗️**NOTE**: This section is only relevant for people who wish to use AutoHotKey instead of [`whkd`](https://github.com/LGUG2Z/whkd).
The preferred way to install AutoHotKey for use with `komorebi` is to install it via `scoop`:
```powershell
scoop bucket add versions
scoop install autohotkey
```
If you install AutoHotKey using a different method, the name of the executable file may differ from the name given by
`scoop`, and thus what is expected by default in `komorebi`.
You may override the executable that `komorebi` looks for to launch and reload `komorebi.ahk` configuration files by
setting the `$Env:KOMOREBI_AHK_EXE` environment variable.
Please keep in mind that even when setting a custom executable name using these environment variables, the executables
are still required to be in your `Path`.
### Common First-Time Tips
#### Setting a Custom KOMOREBI_CONFIG_HOME Directory
If you do not want to keep _komorebi_-related files in your `$Env:USERPROFILE` directory, you can specify a custom directory
by setting the `$Env:KOMOREBI_CONFIG_HOME` environment variable.
For example, to use the `~/.config/komorebi` directory:
```powershell
# Run this command to make sure that the directory has been created
mkdir -p ~/.config/komorebi
# Run this command to open up your PowerShell profile configuration in Notepad
notepad $PROFILE
# Add this line (with your login user!) to the bottom of your PowerShell profile configuration
$Env:KOMOREBI_CONFIG_HOME = 'C:\Users\LGUG2Z\.config\komorebi'
# Save the changes and then reload the PowerShell profile
. $PROFILE
```
If you already have configuration files that you wish to keep, move them to the `~/.config/komorebi` directory.
The next time you run `komorebic start`, any files created by or loaded by _komorebi_ will be placed or expected to
exist in this folder.
#### Generating Common Application-Specific Configurations
❗️**NOTE**: This section is only relevant for people who use dynamic configuration scripts.
A curated selection of application-specific configurations can be generated to
help ease the setup for first-time users.
[`komorebi-application-specific-configuration`](https://github.com/LGUG2Z/komorebi-application-specific-configuration)
contains YAML definitions of settings that are known to make tricky
applications behave as expected. These YAML definitions can be used to generate
a `ps1` or an `ahk` file which you can import at the start of your own `komorebi.ps1` or `komorebi.ahk` files,
leaving you to focus primarily on your desired keybindings and workspace
configurations.
If you have settings for an application that you think should be part of this
curated selection, please open a PR on the configuration repository.
In the event that your PR is not accepted, or if you find there are any
settings that you wish to override, this can easily be done using an override
file.
```powershell
# Clone and enter the repository
git clone https://github.com/LGUG2Z/komorebi-application-specific-configuration.git
cd komorebi-application-specific-configuration
# Use komorebic to generate a ps1 file
komorebic.exe pwsh-app-specific-configuration applications.yaml
# Application-specific generated configuration written to C:\Users\LGUG2Z\.config\komorebi\komorebi.generated.ps1
# Or use komorebic to generate an ahk file
komorebic.exe ahk-app-specific-configuration applications.yaml
# Application-specific generated configuration written to C:\Users\LGUG2Z\.config\komorebi\komorebi.generated.ahk
#
# You can include the generated configuration at the top of your komorebi.ahk config with this line:
#
# #Include %A_ScriptDir%\komorebi.generated.ahk
# Optionally, provide an override file that follows the same schema as the second argument
komorebic.exe pwsh-app-specific-configuration applications.yaml overrides.yaml
```
#### Adding an Active Window Border
If you would like to add a visual border around the currently focused window, two commands are available:
```powershell
komorebic.exe active-window-border [enable|disable]
komorebic.exe active-window-border-colour [R G B] --window-kind single
# optionally, if you want a different colour for stacks of windows
komorebic.exe active-window-border-colour [R G B] --window-kind stack
# optionally, if you want a different colour for windows in monocle mode
komorebic.exe active-window-border-colour [R G B] --window-kind monocle
```
It is important to note that the active window border will only apply to windows managed by `komorebi`.
[![Watch the tutorial video](https://img.youtube.com/vi/ywiAvoMV_gE/hqdefault.jpg)](https://www.youtube.com/watch?v=ywiAvoMV_gE)
#### Removing Gaps
If you would like to remove all gaps from a given workspace, both between windows themselves, and between the monitor edges and the windows, you can set the following two configuration options to `0` for the desired monitors and workspaces:
```powershell
komorebic.exe container-padding <MONITOR_INDEX> <WORKSPACE_INDEX> 0
komorebic.exe workspace-padding <MONITOR_INDEX> <WORKSPACE_INDEX> 0
```
[![Watch the tutorial video](https://img.youtube.com/vi/eGr07mymgWE/hqdefault.jpg)](https://www.youtube.com/watch?v=eGr07mymgWE)
#### Multiple Layout Changes on Startup
❗️**NOTE**: This section is only relevant for people who use dynamic configuration scripts.
Depending on what is in your configuration, when `komorebi` is started, you may experience the layout rapidly being adjusted
with many retile events.
If you would like to avoid this, you can start `komorebi` with a flag which tells `komorebi` to wait until all configuration
has been loaded before listening to and responding to window manager events: `komorebic start --await-configuration`.
If you start `komorebi` with the `--await-configuration` flag, you _must_ send the `komorebic complete-configuration`
command at the end of the configuration section of your `komorebi.ps1` (or `komorebi.ahk` config, before you start
defining the key bindings). The layout will not be updated and `komorebi` will not respond to `komorebic` commands until
this command has been received.
#### Floating Windows
❗️**NOTE**: A significant number of floating window rules for the most common applications are
[already generated for you](https://github.com/LGUG2Z/komorebi/#generating-common-application-specific-configurations)
Sometimes you will want a specific application to never be tiled, and instead float all the time. You can add rules to
enforce this behaviour:
```powershell
komorebic.exe float-rule title "Control Panel"
# komorebic.exe float-rule exe [EXE NAME]
# komorebic.exe float-rule class [CLASS NAME]
```
#### Windows Not Getting Managed
❗️**NOTE**: A significant number of force-manage window rules for the most common applications are
[already generated for you](https://github.com/LGUG2Z/komorebi/#generating-common-application-specific-configurations)
In some rare cases, a window may not automatically be registered to be managed by `komorebi`. When this happens, you can
manually add a rule to force `komorebi` to manage it:
```powershell
komorebic.exe manage-rule exe TIM.exe
# komorebic.exe manage-rule class [CLASS NAME]
# komorebic.exe manage-rule title [TITLE]
```
#### Tray Applications
❗️**NOTE**: A significant number of tray application rules for the most common applications are
[already generated for you](https://github.com/LGUG2Z/komorebi/#generating-common-application-specific-configurations)
If you are experiencing behaviour where
[closing a window leaves a blank tile, but minimizing the same window does not](https://github.com/LGUG2Z/komorebi/issues/6)
, you have probably enabled a 'close/minimize to tray' option for that application. You can tell _komorebi_ to handle
this application appropriately by identifying it via the executable name or the window class:
```powershell
komorebic.exe identify-tray-application exe Discord.exe
# komorebic.exe identify-tray-application class [CLASS NAME]
# komorebic.exe identify-tray-application title [TITLE]
```
#### Microsoft Office Applications
❗️**NOTE**: Microsoft Office-specific application rules are
[already generated for you](https://github.com/LGUG2Z/komorebi/#generating-common-application-specific-configurations)
Microsoft Office applications such as Word and Excel require certain configuration options to be set in order to be
managed correctly. Below is an example of configuring Microsoft Word to be managed correctly by _komorebi_.
```powershell
# This only needs to be added once
komorebic.exe float-rule class _WwB
# Repeat these for other office applications such as EXCEL.EXE etc
# Note that the capitalised EXE is important here- double check the
# exact case for the name and the file extension in Task Manager or
# the AHK Window Spy
komorebic.exe identify-layered-application exe WINWORD.EXE
komorebic.exe identify-border-overflow-application exe WINWORD.EXE
```
#### Focus Follows Mouse
`komorebi` supports two focus-follows-mouse implementations; the native Windows Xmouse implementation, which treats the
desktop, the task bar, and the system tray as windows and switches focus to them eagerly, and a custom `komorebi`
implementation, which only considers windows managed by `komorebi` as valid targets to switch focus to when moving the
mouse.
To enable the `komorebi` implementation you must start the process with the `--ffm` flag to explicitly enable the feature.
This is because the mouse tracking required for this feature significantly increases the CPU usage of the process (on my
machine, it jumps from <1% to ~4~), and this CPU increase persists regardless of whether focus-follows-mouse is enabled
or disabled at any given time via `komorebic`'s configuration commands.
When calling any of the `komorebic` commands related to focus-follows-mouse functionality, the `windows`
implementation will be chosen as the default implementation. You can optionally specify the `komorebi` implementation by
passing it as an argument to the `--implementation` flag:
```powershell
komorebic.exe toggle-focus-follows-mouse --implementation komorebi
```
#### Mouse Follows Focus
By default, the mouse will move to the center of the window when the focus is changed in a given direction. This
behaviour is know is 'mouse follows focus'. To disable this behaviour across all workspaces, add the following command
to your configuration file:
```powershell
komorebic.exe mouse-follows-focus disable
```
[![Watch the tutorial video](https://img.youtube.com/vi/LBoyXQiNINc/hqdefault.jpg)](https://www.youtube.com/watch?v=LBoyXQiNINc)
#### Saving and Loading Resized Layouts
If you create a BSP layout through various resize adjustments that you want to be able to restore easily in the future,
it is possible to "quicksave" that layout to the system's temporary folder and load it later in the same session, or
alternatively, you may save it to a specific file to be loaded again at any point in the future.
```powershell
komorebic.exe quick-save # saves the focused workspace to $Env:TEMP\komorebi.quicksave.json
komorebic.exe quick-load # loads $Env:TEMP\komorebi.quicksave.json on the focused workspace
komorebic.exe save ~/layouts/primary.json # saves the focused workspace to $Env:USERPROFILE\layouts\primary.json
komorebic.exe load ~/layouts/secondary.json # loads $Env:USERPROFILE\layouts\secondary.json on the focused workspace
```
These layouts can be applied to arbitrary collections of windows on any workspace, as they only track the layout
dimensions and are not coupled to the applications that were running at the time of saving.
When layouts that expect more or less windows than the number currently on the focused workspace are loaded, `komorebi`
will automatically reconcile the difference.
#### Creating and Loading Custom Layouts
Particularly for users of ultrawide monitors, traditional tiling layouts may not seem like the most efficient use of
screen space. If you feel this is the case with any of the default layouts, you are also welcome to create your own
custom layouts and save them as JSON or YAML.
If you're not comfortable writing the layouts directly in JSON or YAML, you can use
the [komorebi Custom Layout Generator](https://lgug2z.github.io/komorebi-custom-layout-generator/) to interactively
define a custom layout, and then copy the generated JSON content.
Custom layouts can be loaded on the current workspace or configured for a specific workspace with the following
commands:
```powershell
komorebic.exe load-custom-layout ~/custom.yaml
komorebic.exe workspace-custom-layout 0 0 ~/custom.yaml
```
The fundamental building block of a custom _komorebi_ layout is the Column.
Columns come in three variants:
- **Primary**: This is where your primary focus will be on the screen most of the time. There must be exactly one Primary
Column in any custom layout. Optionally, you can specify the percentage of the screen width that you want the Primary
Column to occupy.
- **Secondary**: This is an optional column that can either be full height of split horizontally into a fixed number of
maximum rows. There can be any number of Secondary Columns in a custom layout.
- **Tertiary**: This is the final column where any remaining windows will be split horizontally into rows as they get added.
If there is only one window on the screen when a custom layout is selected, that window will take up the full work area
of the screen.
If the number of windows is equal to or less than the total number of columns defined in a custom layout, the windows
will be arranged in an equal-width columns.
When the number of windows is greater than the number of columns defined in the custom layout, the windows will begin to
be arranged according to the constraints set on the Primary and Secondary columns of the layout.
Here is an example custom layout that can be used as a starting point for your own:
YAML
```yaml
- column: Secondary
configuration: !Horizontal 2 # max number of rows
- column: Primary
configuration: !WidthPercentage 50 # percentage of screen
- column: Tertiary
configuration: Horizontal
```
[![Watch the tutorial video](https://img.youtube.com/vi/SgmBHKEOcQ4/hqdefault.jpg)](https://www.youtube.com/watch?v=SgmBHKEOcQ4)
#### Dynamically Changing Layouts Based on Number of Visible Window Containers
With `komorebi` it is possible to define rules to automatically change the layout on a specified workspace when a
threshold of window containers is met.
```powershell
# On the first workspace of the first monitor (0 0)
# When there are one or more window containers visible on the screen (1)
# Use the bsp layout (bsp)
komorebic workspace-layout-rule 0 0 1 bsp
# On the first workspace of the first monitor (0 0)
# When there are five or more window containers visible on the screen (five)
# Use the custom layout stored in the home directory (~/custom.yaml)
komorebic workspace-custom-layout-rule 0 0 5 ~/custom.yaml
```
However, if you add workspace layout rules, you will not be able to manually change the layout of a workspace until all
layout rules for that workspace have been cleared.
```powershell
# If you decide that workspace layout rules are not for you, you can remove them from that same workspace like this
komorebic clear-workspace-layout-rules 0 0
```
## Development
If you would like to contribute code to this repository, there are a few requests that I have to ensure a foundation of
code quality, consistency and commit hygiene:
## Commit hygiene
- Flatten all `use` statements
- Run `cargo +nightly clippy` and ensure that all lints and suggestions have been addressed before committing
- Run `cargo +stable clippy` and ensure that all lints and suggestions have been addressed before committing
- Run `cargo +nightly fmt --all` to ensure consistent formatting before committing
- Use `git cz` with
the [Commitizen CLI](https://github.com/commitizen/cz-cli#conventional-commit-messages-as-a-global-utility) to prepare
commit messages
- Provide at least one short sentence or paragraph in your commit message body to describe your thought process for the
- Provide **at least** one short sentence or paragraph in your commit message body to describe your thought process for the
changes being committed
## PRs should contain only a single feature or bug fix
It is very difficult to review pull requests which touch multiple unrelated features and parts of the codebase.
Please do not submit pull requests like this; you will be asked to separate them into smaller PRs that deal only with
one feature or bug fix at a time.
If you are working on multiple features and bug fixes, I suggest that you cut a branch called `local-trunk`
from `master` which you keep up to date, and rebase the various independent branches you are working on onto that branch
if you want to test them together or create a build with everything integrated.
## Refactors to the codebase must have prior approval
`komorebi` is a mature codebase with an internal consistency and structure that has developed organically over close to
half a decade.
There are [countless hours of live coding videos](https://youtube.com/@LGUG2Z) demonstrating work on this project and
showing new contributors how to do everything from basic tasks like implementing new `komorebic` commands to
distinguishing monitors by manufacturer hardware identifiers and video card ports.
Refactors to the structure of the codebase are not taken lightly and require prior discussion and approval.
Please do not start refactoring the codebase with the expectation of having your changes integrated until you receive an
explicit approval or a request to do so.
Similarly, when implementing features and bug fixes, please stick to the structure of the codebase as much as possible
and do not take this as an opportunity to do some "refactoring along the way".
It is extremely difficult to review PRs for features and bug fixes if they are lost in sweeping changes to the structure
of the codebase.
## Breaking changes to user-facing interfaces are unacceptable
This includes but is not limited to:
- All `komorebic` commands
- The `komorebi.json` schema
- The [`komorebi-application-specific-configuration`](https://github.com/LGUG2Z/komorebi-application-specific-configuration)
schema
No user should ever find that their configuration file has stopped working after upgrading to a new version
of `komorebi`.
More often than not there are ways to reformulate changes that may initially seem like they require breaking user-facing
interfaces into additive changes.
For some inspiration please take a look
at [this commit](https://github.com/LGUG2Z/komorebi/commit/e7d928a065eb63bb4ea1fb864c69c1cae8cc763b) which added the
ability for users to specify colours in `komorebi.json` in Hex format alongside RGB.
There is also a process in place for graceful, non-breaking, deprecation of configuration options that are no longer
required.
# Development
If you use IntelliJ, you should enable the following settings to ensure that code generated by macros is recognised by
the IDE for completions and navigation:
@@ -686,7 +180,7 @@ the IDE for completions and navigation:
- `org.rust.cargo.evaluate.build.scripts`
- `org.rust.macros.proc`
## Logs and Debugging
# Logs and Debugging
Logs from `komorebi` will be appended to `%LOCALAPPDATA%/komorebi/komorebi.log`; this file is never rotated or overwritten, so it will keep
growing until it is deleted by the user.
@@ -697,12 +191,12 @@ ensures that all hidden windows are restored before termination.
If however, you ever end up with windows that are hidden and cannot be restored, a list of window handles known
to `komorebi` are stored and continuously updated in `%LOCALAPPDATA%/komorebi//komorebi.hwnd.json`.
### Restoring Windows
## Restoring Windows
Running `komorebic restore-windows` will read the list of window handles and forcibly restore them, regardless of
whether the main `komorebi` process is running.
### Panics and Deadlocks
## Panics and Deadlocks
If `komorebi` ever stops responding, it is most likely either due to either a panic or a deadlock. In the case of a
panic, this will be reported in the log. In the case of a deadlock, there will not be any errors in the log, but the
@@ -712,23 +206,24 @@ If you believe you have encountered a deadlock, you can compile `komorebi` with
reproducing the deadlock again. This will check for deadlocks every 5 seconds in the background, and if a deadlock is
found, information about it will appear in the log which can be shared when opening an issue.
## Window Manager State and Integrations
# Window Manager State and Integrations
The current state of the window manager can be queried using the `komorebic state` command, which returns a JSON
representation of the `State` struct, which includes the current state of `WindowManager`.
representation of the `State` struct.
This may also be polled to build further integrations and widgets on top of (if you ever wanted to build something
like [Stackline](https://github.com/AdamWagner/stackline) for Windows, you could do it by polling this command).
This may also be polled to build further integrations and widgets on top of.
## Window Manager Event Subscriptions
# Window Manager Event Subscriptions
It is also possible to subscribe to notifications of every `WindowManagerEvent` and `SocketMessage` handled
## Named Pipes
It is possible to subscribe to notifications of every `WindowManagerEvent` and `SocketMessage` handled
by `komorebi` using [Named Pipes](https://docs.microsoft.com/en-us/windows/win32/ipc/named-pipes).
First, your application must create a named pipe. Once the named pipe has been created, run the following command:
```powershell
komorebic.exe subscribe <your pipe name>
komorebic.exe subscribe-pipe <your pipe name>
```
Note that you do not have to include the full path of the named pipe, just the name.
@@ -752,21 +247,134 @@ You may then filter on the `type` key to listen to the events that you are inter
notification types, refer to the enum variants of `WindowManagerEvent` in `komorebi` and `SocketMessage`
in `komorebi-core`.
An example of how to create a named pipe and a subscription to `komorebi`'s handled events in Python
by [@denBot](https://github.com/denBot) can be
found [here](https://gist.github.com/denBot/4136279812f87819f86d99eba77c1ee0).
Below is an example of how you can subscribe to and filter on events using a named pipe in `nodejs`.
An example of how to create a named pipe and a subscription to `komorebi`'s handled events in Rust can also be found
in the [`komokana`](https://github.com/LGUG2Z/komokana) repository.
```javascript
const { exec } = require("child_process");
const net = require("net");
### Subscription Event Notification Schema
const pipeName = "\\\\.\\pipe\\komorebi-js";
const server = net.createServer((stream) => {
console.log("Client connected");
// Every time there is a workspace-related event, let's log the names of all
// workspaces on the currently focused monitor, and then log the name of the
// currently focused workspace on that monitor
stream.on("data", (data) => {
let json = JSON.parse(data.toString());
let event = json.event;
if (event.type.includes("Workspace")) {
let monitors = json.state.monitors;
let current_monitor = monitors.elements[monitors.focused];
let workspaces = monitors.elements[monitors.focused].workspaces;
let current_workspace = workspaces.elements[workspaces.focused];
console.log(
workspaces.elements
.map((workspace) => workspace.name)
.filter((name) => name !== null)
);
console.log(current_workspace.name);
}
});
stream.on("end", () => {
console.log("Client disconnected");
});
});
server.listen(pipeName, () => {
console.log("Named pipe server listening");
});
const command = "komorebic subscribe-pipe komorebi-js";
exec(command, (error, stdout, stderr) => {
if (error) {
console.error(`Error executing command: ${error}`);
return;
}
});
```
## Unix Domain Sockets
It is possible to subscribe to notifications of every `WindowManagerEvent` and `SocketMessage` handled
by `komorebi` using [Unix Domain Sockets](https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/).
UDS are also the only mode of communication between `komorebi` and `komorebic`.
First, your application must create a socket in `$ENV:LocalAppData\komorebi`. Once the socket has been created, run the
following command:
```powershell
komorebic.exe subscribe-socket <your socket name>
```
If the socket exists, komorebi will start pushing JSON data of successfully handled events and messages as in the
example above in the Named Pipes section.
## Rust Client
As of `v0.1.22` it is possible to use the `komorebi-client` crate to subscribe to notifications of
every `WindowManagerEvent` and `SocketMessage` handled by `komorebi` in a Rust codebase.
Below is a simple example of how to use `komorebi-client` in a basic Rust application.
```rust
// komorebi-client = { git = "https://github.com/LGUG2Z/komorebi", tag = "v0.1.22"}
use anyhow::Result;
use komorebi_client::Notification;
use komorebi_client::NotificationEvent;
use komorebi_client::UnixListener;
use komorebi_client::WindowManagerEvent;
use std::io::BufRead;
use std::io::BufReader;
use std::io::Read;
pub fn main() -> anyhow::Result<()> {
let socket = komorebi_client::subscribe(NAME)?;
for incoming in socket.incoming() {
match incoming {
Ok(data) => {
let reader = BufReader::new(data.try_clone()?);
for line in reader.lines().flatten() {
let notification: Notification = match serde_json::from_str(&line) {
Ok(notification) => notification,
Err(error) => {
log::debug!("discarding malformed komorebi notification: {error}");
continue;
}
};
// match and filter on desired notifications
}
}
Err(error) => {
log::debug!("{error}");
}
}
}
}
```
A read-world example can be found
in [komokana](https://github.com/LGUG2Z/komokana/blob/feature/komorebi-uds/src/main.rs).
## Subscription Event Notification Schema
A [JSON Schema](https://json-schema.org/) of the event notifications emitted to subscribers can be generated with
the `komorebic notification-schema` command. The output of this command can be redirected to the clipboard or a file,
which can be used with services such as [Quicktype](https://app.quicktype.io/) to generate type definitions in different
programming languages.
### Communication over TCP
## Communication over TCP
A TCP listener can optionally be exposed on a port of your choosing with the `--tcp-port=N` flag. If this flag is not
provided to `komorebi` or `komorebic start`, no TCP listener will be created.
@@ -782,14 +390,14 @@ a [custom input handler](https://github.com/LGUG2Z/komorebi/issues/176#issue-130
If a client sends an unrecognized message, it will be disconnected and have to reconnect before trying to communicate
again.
### Socket Message Schema
## Socket Message Schema
A [JSON Schema](https://json-schema.org/) of socket messages used to send instructions to `komorebi` can be generated
with the `komorebic socket-schema` command. The output of this command can be redirected to the clipboard or a file,
which can be used with services such as [Quicktype](https://app.quicktype.io/) to generate type definitions in different
programming languages.
## Appreciations
# Appreciations
- First and foremost, thank you to my wife, both for naming this project and for her patience throughout its never-ending development

View File

@@ -0,0 +1,26 @@
# active-window-border-colour
```
Set the colour for the active window border
Usage: komorebic.exe active-window-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]
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# active-window-border-offset
```
Set the offset for the active window border
Usage: komorebic.exe active-window-border-offset <OFFSET>
Arguments:
<OFFSET>
Desired offset of the active window border
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# active-window-border-width
```
Set the width for the active window border
Usage: komorebic.exe active-window-border-width <WIDTH>
Arguments:
<WIDTH>
Desired width of the active window border
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# active-window-border
```
Enable or disable the active window border
Usage: komorebic.exe active-window-border <BOOLEAN_STATE>
Arguments:
<BOOLEAN_STATE>
[possible values: enable, disable]
Options:
-h, --help
Print help
```

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
```

12
docs/cli/ahk-library.md Normal file
View File

@@ -0,0 +1,12 @@
# ahk-library
```
Generate a library of AutoHotKey helper functions
Usage: komorebic.exe ahk-library
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# alt-focus-hack
```
DEPRECATED since v0.1.22
Usage: komorebic.exe alt-focus-hack <BOOLEAN_STATE>
Arguments:
<BOOLEAN_STATE>
[possible values: enable, disable]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# application-specific-configuration-schema
```
Generate a JSON Schema for applications.yaml
Usage: komorebic.exe application-specific-configuration-schema
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]
Options:
-h, --help
Print help
```

12
docs/cli/check.md Normal file
View File

@@ -0,0 +1,12 @@
# check
```
Check komorebi configuration and related files for common errors
Usage: komorebic.exe check
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,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
```

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
```
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,18 @@
# 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
Options:
-h, --help
Print help (see a summary with '-h')
```

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
```

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
```

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 @@
# 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
```

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
-f, --ffm
Enable komorebi's custom focus-follows-mouse implementation
--whkd
Enable autostart of whkd
--ahk
Enable autostart of ahk
-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.yaml 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 (BSP only)
Usage: komorebic.exe flip-layout <AXIS>
Arguments:
<AXIS>
[possible values: horizontal, vertical, horizontal-and-vertical]
Options:
-h, --help
Print help
```

19
docs/cli/float-rule.md Normal file
View File

@@ -0,0 +1,19 @@
# float-rule
```
Add a rule to always float the specified application
Usage: komorebic.exe float-rule <IDENTIFIER> <ID>
Arguments:
<IDENTIFIER>
[possible values: exe, class, title]
<ID>
Identifier as a string
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,23 @@
# focus-follows-mouse
```
Enable or disable focus follows mouse for the operating system
Usage: komorebic.exe focus-follows-mouse [OPTIONS] <BOOLEAN_STATE>
Arguments:
<BOOLEAN_STATE>
[possible values: enable, disable]
Options:
-i, --implementation <IMPLEMENTATION>
[default: windows]
Possible values:
- komorebi: A custom FFM implementation (slightly more CPU-intensive)
- windows: The native (legacy) Windows FFM implementation
-h, --help
Print help (see a summary with '-h')
```

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,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-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,16 @@
# format-app-specific-configuration
```
Format a YAML file for use with the 'ahk-app-specific-configuration' command
Usage: komorebic.exe format-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,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
```

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
```

View File

@@ -0,0 +1,19 @@
# identify-border-overflow-application
```
Identify an application that has overflowing borders
Usage: komorebic.exe identify-border-overflow-application <IDENTIFIER> <ID>
Arguments:
<IDENTIFIER>
[possible values: exe, class, title]
<ID>
Identifier as a string
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]
<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]
<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]
<ID>
Identifier as a string
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,22 @@
# initial-named-workspace-rule
```
Add a rule to associate an application with a named workspace on first show
Usage: komorebic.exe initial-named-workspace-rule <IDENTIFIER> <ID> <WORKSPACE>
Arguments:
<IDENTIFIER>
[possible values: exe, class, title]
<ID>
Identifier as a string
<WORKSPACE>
Name of a workspace
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,25 @@
# initial-workspace-rule
```
Add a rule to associate an application with a workspace on first show
Usage: komorebic.exe initial-workspace-rule <IDENTIFIER> <ID> <MONITOR> <WORKSPACE>
Arguments:
<IDENTIFIER>
[possible values: exe, class, title]
<ID>
Identifier as a string
<MONITOR>
Monitor index (zero-indexed)
<WORKSPACE>
Workspace index on the specified monitor (zero-indexed)
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,25 @@
# invisible-borders
```
Set the invisible border dimensions around each window
Usage: komorebic.exe invisible-borders <LEFT> <TOP> <RIGHT> <BOTTOM>
Arguments:
<LEFT>
Size of the left invisible border
<TOP>
Size of the top invisible border (usually 0)
<RIGHT>
Size of the right invisible border (usually left * 2)
<BOTTOM>
Size of the bottom invisible border (usually the same as left)
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# load-custom-layout
```
Load a custom layout from file for the focused workspace
Usage: komorebic.exe load-custom-layout <PATH>
Arguments:
<PATH>
JSON or YAML file from which the custom layout definition should be loaded
Options:
-h, --help
Print help
```

16
docs/cli/load-resize.md Normal file
View File

@@ -0,0 +1,16 @@
# load-resize
```
Load the resize layout dimensions from a file
Usage: komorebic.exe load-resize <PATH>
Arguments:
<PATH>
File from which the resize layout dimensions should be loaded
Options:
-h, --help
Print help
```

12
docs/cli/log.md Normal file
View File

@@ -0,0 +1,12 @@
# log
```
Tail komorebi.exe's process logs (cancel with Ctrl-C)
Usage: komorebic.exe log
Options:
-h, --help
Print help
```

19
docs/cli/manage-rule.md Normal file
View File

@@ -0,0 +1,19 @@
# manage-rule
```
Add a rule to always manage the specified application
Usage: komorebic.exe manage-rule <IDENTIFIER> <ID>
Arguments:
<IDENTIFIER>
[possible values: exe, class, title]
<ID>
Identifier as a string
Options:
-h, --help
Print help
```

12
docs/cli/manage.md Normal file
View File

@@ -0,0 +1,12 @@
# manage
```
Force komorebi to manage the focused window
Usage: komorebic.exe manage
Options:
-h, --help
Print help
```

12
docs/cli/minimize.md Normal file
View File

@@ -0,0 +1,12 @@
# minimize
```
Minimize the focused window
Usage: komorebic.exe minimize
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,28 @@
# monitor-index-preference
```
Set the monitor index preference for a monitor identified using its size
Usage: komorebic.exe monitor-index-preference <INDEX_PREFERENCE> <LEFT> <TOP> <RIGHT> <BOTTOM>
Arguments:
<INDEX_PREFERENCE>
Preferred monitor index (zero-indexed)
<LEFT>
Left value of the monitor's size Rect
<TOP>
Top value of the monitor's size Rect
<RIGHT>
Right value of the monitor's size Rect
<BOTTOM>
Bottom value of the monitor's size Rect
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,28 @@
# monitor-work-area-offset
```
Set offsets for a monitor to exclude parts of the work area from tiling
Usage: komorebic.exe monitor-work-area-offset <MONITOR> <LEFT> <TOP> <RIGHT> <BOTTOM>
Arguments:
<MONITOR>
Monitor index (zero-indexed)
<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
```

View File

@@ -0,0 +1,16 @@
# mouse-follows-focus
```
Enable or disable mouse follows focus on all workspaces
Usage: komorebic.exe mouse-follows-focus <BOOLEAN_STATE>
Arguments:
<BOOLEAN_STATE>
[possible values: enable, disable]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# move-to-monitor
```
Move the focused window to the specified monitor
Usage: komorebic.exe move-to-monitor <TARGET>
Arguments:
<TARGET>
Target index (zero-indexed)
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# move-to-named-workspace
```
Move the focused window to the specified workspace
Usage: komorebic.exe move-to-named-workspace <WORKSPACE>
Arguments:
<WORKSPACE>
Target workspace name
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# move-to-workspace
```
Move the focused window to the specified workspace
Usage: komorebic.exe move-to-workspace <TARGET>
Arguments:
<TARGET>
Target index (zero-indexed)
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# move-workspace-to-monitor
```
Move the focused workspace to the specified monitor
Usage: komorebic.exe move-workspace-to-monitor <TARGET>
Arguments:
<TARGET>
Target index (zero-indexed)
Options:
-h, --help
Print help
```

16
docs/cli/move.md Normal file
View File

@@ -0,0 +1,16 @@
# move
```
Move the focused window in the specified direction
Usage: komorebic.exe move <OPERATION_DIRECTION>
Arguments:
<OPERATION_DIRECTION>
[possible values: left, right, up, down]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# named-workspace-container-padding
```
Set the container padding for the specified workspace
Usage: komorebic.exe named-workspace-container-padding <WORKSPACE> <SIZE>
Arguments:
<WORKSPACE>
Target workspace name
<SIZE>
Pixels to pad with as an integer
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,22 @@
# named-workspace-custom-layout-rule
```
Add a dynamic custom layout for the specified workspace
Usage: komorebic.exe named-workspace-custom-layout-rule <WORKSPACE> <AT_CONTAINER_COUNT> <PATH>
Arguments:
<WORKSPACE>
Target workspace name
<AT_CONTAINER_COUNT>
The number of window containers on-screen required to trigger this layout rule
<PATH>
JSON or YAML file from which the custom layout definition should be loaded
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# named-workspace-custom-layout
```
Set a custom layout for the specified workspace
Usage: komorebic.exe named-workspace-custom-layout <WORKSPACE> <PATH>
Arguments:
<WORKSPACE>
Target workspace name
<PATH>
JSON or YAML file from which the custom layout definition should be loaded
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,22 @@
# named-workspace-layout-rule
```
Add a dynamic layout rule for the specified workspace
Usage: komorebic.exe named-workspace-layout-rule <WORKSPACE> <AT_CONTAINER_COUNT> <LAYOUT>
Arguments:
<WORKSPACE>
Target workspace name
<AT_CONTAINER_COUNT>
The number of window containers on-screen required to trigger this layout rule
<LAYOUT>
[possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack, grid]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# named-workspace-layout
```
Set the layout for the specified workspace
Usage: komorebic.exe named-workspace-layout <WORKSPACE> <VALUE>
Arguments:
<WORKSPACE>
Target workspace name
<VALUE>
[possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack, grid]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# named-workspace-padding
```
Set the workspace padding for the specified workspace
Usage: komorebic.exe named-workspace-padding <WORKSPACE> <SIZE>
Arguments:
<WORKSPACE>
Target workspace name
<SIZE>
Pixels to pad with as an integer
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,22 @@
# named-workspace-rule
```
Add a rule to associate an application with a named workspace
Usage: komorebic.exe named-workspace-rule <IDENTIFIER> <ID> <WORKSPACE>
Arguments:
<IDENTIFIER>
[possible values: exe, class, title]
<ID>
Identifier as a string
<WORKSPACE>
Name of a workspace
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# named-workspace-tiling
```
Enable or disable window tiling for the specified workspace
Usage: komorebic.exe named-workspace-tiling <WORKSPACE> <VALUE>
Arguments:
<WORKSPACE>
Target workspace name
<VALUE>
[possible values: enable, disable]
Options:
-h, --help
Print help
```

12
docs/cli/new-workspace.md Normal file
View File

@@ -0,0 +1,12 @@
# new-workspace
```
Create and append a new workspace on the focused monitor
Usage: komorebic.exe new-workspace
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# notification-schema
```
Generate a JSON Schema of subscription notifications
Usage: komorebic.exe notification-schema
Options:
-h, --help
Print help
```

12
docs/cli/promote-focus.md Normal file
View File

@@ -0,0 +1,12 @@
# promote-focus
```
Promote the user focus to the top of the tree
Usage: komorebic.exe promote-focus
Options:
-h, --help
Print help
```

12
docs/cli/promote.md Normal file
View File

@@ -0,0 +1,12 @@
# promote
```
Promote the focused window to the top of the tree
Usage: komorebic.exe promote
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# pwsh-app-specific-configuration
```
Generate common app-specific configurations and fixes in a PowerShell script
Usage: komorebic.exe pwsh-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
```

16
docs/cli/query.md Normal file
View File

@@ -0,0 +1,16 @@
# query
```
Query the current window manager state
Usage: komorebic.exe query <STATE_QUERY>
Arguments:
<STATE_QUERY>
[possible values: focused-monitor-index, focused-workspace-index, focused-container-index, focused-window-index]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# quick-load-resize
```
Load the last quicksaved resize layout dimensions
Usage: komorebic.exe quick-load-resize
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# quick-save-resize
```
Quicksave the current resize layout dimensions
Usage: komorebic.exe quick-save-resize
Options:
-h, --help
Print help
```

12
docs/cli/quickstart.md Normal file
View File

@@ -0,0 +1,12 @@
# quickstart
```
Gather example configurations for a new-user quickstart
Usage: komorebic.exe quickstart
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# reload-configuration
```
Reload ~/komorebi.ahk (if it exists)
Usage: komorebic.exe reload-configuration
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# remove-title-bar
```
Whitelist an application for title bar removal
Usage: komorebic.exe remove-title-bar <IDENTIFIER> <ID>
Arguments:
<IDENTIFIER>
[possible values: exe, class, title]
<ID>
Identifier as a string
Options:
-h, --help
Print help
```

19
docs/cli/resize-axis.md Normal file
View File

@@ -0,0 +1,19 @@
# resize-axis
```
Resize the focused window or primary column along the specified axis
Usage: komorebic.exe resize-axis <AXIS> <SIZING>
Arguments:
<AXIS>
[possible values: horizontal, vertical, horizontal-and-vertical]
<SIZING>
[possible values: increase, decrease]
Options:
-h, --help
Print help
```

16
docs/cli/resize-delta.md Normal file
View File

@@ -0,0 +1,16 @@
# resize-delta
```
Set the resize delta (used by resize-edge and resize-axis)
Usage: komorebic.exe resize-delta <PIXELS>
Arguments:
<PIXELS>
The delta of pixels by which to increase or decrease window dimensions when resizing
Options:
-h, --help
Print help
```

19
docs/cli/resize-edge.md Normal file
View File

@@ -0,0 +1,19 @@
# resize-edge
```
Resize the focused window in the specified direction
Usage: komorebic.exe resize-edge <EDGE> <SIZING>
Arguments:
<EDGE>
[possible values: left, right, up, down]
<SIZING>
[possible values: increase, decrease]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,12 @@
# restore-windows
```
Restore all hidden windows (debugging command)
Usage: komorebic.exe restore-windows
Options:
-h, --help
Print help
```

Some files were not shown because too many files have changed in this diff Show More