Compare commits

...

531 Commits

Author SHA1 Message Date
LGUG2Z
8ceed09c20 fix(wm): dynamically reserve monitor ring space
This commit makes a small change to dynamically keep reserving space in
the VecDeque that backs Ring<Monitor> until an index preference can be
contained within the current length.
2024-05-23 16:58:54 -07:00
LGUG2Z
1712042dda chore(dev): begin v0.1.27-dev 2024-05-23 16:47:26 -07:00
LGUG2Z
3556f38469 chore(release): v0.1.26 2024-05-22 15:36:20 -07:00
LGUG2Z
62770033f2 fix(wm): make close + min op on foreground hwnd
This commit changes the handlers for the Close and Minimize
SocketMessages to operate on the output of
WindowsApi::foreground_window, without checking the window manager state
as it was doing previously.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

resolve #434
2024-05-15 09:51:56 -07:00
LGUG2Z
70ef90b304 perf(wm): compare rects before position updates
This commit ensures that both windows and borders will make a comparison
to the current values returned by WindowRect before attempting to make
update calls to SetWindowPos. This should greatly reduce visual
flickering in both the borders and sensitive apps like JetBrains IDEs.
2024-05-15 09:51:56 -07:00
LGUG2Z
d102c00ffe feat(wm): add alt-tab heuristics to wsr
This commit adds some rough heuristics to workspace_reconciliator which
should help with having the correct window focused after reconciliation
in the majority of, but probably not all, cases.

EnumWindows generally returns HWNDs according to z order, and a window
selected by alt-tab will almost always be put on the top of the z order.
Before sending a workspace_reconciliator::Notification, we store this
HWND along with an Instant and an AtomicBool telling us that we have a
candidate to focus after the workspace switch.
2024-05-15 09:51:56 -07:00
LGUG2Z
87b1ab9c53 fix(wm): restart bm and wsr notif handlers on fail
This commit ensures that if and when either the border_manager or
workspace_reconciliator notification handlers crash in their respective
threads, they will be restarted instead of killing the whole thread.

This is acheived via a loop running in the spawned threads of both
listeners, which will report whichever error killed the notification
handler functions.

Clippy annotations to deny expect and unwrap calls have been added to
these two modules.

Calls to DestroyWindow for expired borders were sporadically failing in
unpredictable circumstances, so these have been switched out with calls
to CloseWindow which has been working well so far with the stackbar
feature.
2024-05-15 09:51:56 -07:00
LGUG2Z
a4dd5fc741 refactor(clippy): apply lints 2024-05-15 09:51:56 -07:00
LGUG2Z
226ee73aa4 fix(borders): reap untracked hwnds in destroy_all
This commit ensures that even border hwnds that may now be untracked as
a result of events such as monitor changes will now be reaped in the
destroy_all_borders function.
2024-05-15 09:51:56 -07:00
LGUG2Z
e14235c3a9 perf(wm): ignore same-workspace switch requests
This commit ensures that if a user uses index-based commands to switch
workspaces, workspace layout update code paths will not be run if the
user is already on the desired monitor and workspace indices.

resolve #647
2024-05-15 09:51:56 -07:00
LGUG2Z
855bb49804 feat(wm): add noop cross-monitor-move-behaviour
This commit adds a new "NoOp" MoveBehaviour for users who don't want any
moves to happen across monitor boundaries. The
toggle-cross-monitor-move-behaviour will only toggle between Swap and
Insert, and will do nothing if NoOp is the selected MoveBehaviour.

resolve #667
2024-05-15 09:51:56 -07:00
LGUG2Z
07b2da69a1 feat(wm): add workspace reconciliator module
This commit adds the workspace_reconciliator module which uses a tightly
bounded channel (cap: 1) to update the focused workspace in situations
where the user or another process has foregrounded a window that is on a
different workspace.

This most often happens via Alt-Tab, or by clicking a link which opens
in another application.

workspace_reconciliator::Notification contains the target monitor and
workspace indices, which when received allows for the correct workspace to
be focused.

These notifications are sent in process_event.rs when handling
WindowManagerEvent::Show, Manage and Uncloak events.

All previous logic pertaining to workspace reconciliation which lived in
the handler for these events has been removed and replaced with
notifications sent to the reconciliator.

As the notifications channel is tightly capped and any notifications
which overflow the cap will never be delivered, we are able to avoid the
infinite workspace switching loops which happened when using the
previous logic, which ran on every single event.
2024-05-12 09:14:55 -07:00
LGUG2Z
6a1ed3bcaa feat(borders): add border manager module
This commit removes all border-related code from process_command,
process_event etc. and centralizes it in the new border_manager module.

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

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

Borders on workspaces that lose focus are now destroyed and recreated
when those workspaces regain focus, instead of trying to share
individual border instances across workspaces.

A number of common edge cases that have been addressed in this commit
are:

* Paused window manager
* Floating workspaces
* Maximized windows
* Fullscreen videos
* Monocle containers
* Ghost borders on workspace switching
* Incorrect focused window border colours

Global state related to borders has also been moved into the
border_manager module, which also tracks the state of border objects
(BORDER_STATE), their rects (RECT_STATE) and their focus kinds
(FOCUS_STATE).

This allows us to now track multiple borders per-container, enabling
unfocused border windows for the first time.

Additionally, the Z-Order for border windows is now also configurable.

ActiveWindowBorderColours has been expanded to include Unfocused, but in
order to not introduce a breaking configuration change for end users,
all members of this struct have been made Option<Colour>.
2024-05-12 09:14:50 -07:00
LGUG2Z
1b30561989 fix(wm): update focused idx on cross-monitor moves
This commit ensures that in situations where the last container on a
monitor is moved to an adjacent monitor, the focused container index of
the origin monitor will be appropriately decremented.
2024-05-11 16:47:44 -07:00
LGUG2Z
c47cf4718b docs(mkdocs): add ahk exe troubleshooting section 2024-05-10 14:50:41 -07:00
LGUG2Z
1accbf65ca docs(mkdocs): add shell.nix for python doc deps 2024-05-10 14:39:41 -07:00
0x3bb
7ee3c928d8 docs(mkdocs): addressing display suspension within monitor OSD 2024-05-10 14:39:41 -07:00
0x3bb
6d1903099a docs(mkdocs): add pymdownx.highlight and pymdownx.superfences extensions
Used for syntax highlighting in code blocks, and allows for indenting existing code blocks.

References:
- https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown-extensions/#highlight
- https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown-extensions/#superfences
2024-05-10 14:39:41 -07:00
0x3bb
d5c6f090cc docs(mkdocs): add admonition extension
Used for bringing attention to troubleshooting steps in komorebi documentation.

Reference: https://squidfunk.github.io/mkdocs-material/reference/admonitions/
2024-05-10 14:39:41 -07:00
LGUG2Z
598f9ec0aa fix(wm): avoid dupes when following links
When adding selective handling of Uncloak events, a regression was
introduced where, for example, when clicking a link from Discord on
Workspace 2, a Firefox instance on Workspace 1 would be moved to
Workspace 2 to open the link, but when moving back to Workspace 1, a
ghost tile would be left, and the Firefox instance would be duplicated
across two workspaces.

This commit fixes this regression and makes the handler a bit easier to
reason about while also removing unnecessary early return statements
which prevent notifcations from getting sent to subscribers.
2024-05-09 20:10:38 -07:00
LGUG2Z
11acff5236 refactor(wm): reduce noise in info and error logs 2024-05-09 19:49:43 -07:00
LGUG2Z
4802b55452 feat(wm): selectively handle uncloak events
This commit adds selective handling for WindowManagerEvent::Uncloak
alongside Show and Manage, avoiding the workspace-switching logic that
is known to cause infinite workspace loops.
2024-05-08 08:58:41 -07:00
dependabot[bot]
482a7b1d7f chore(deps): bump schemars from 0.8.17 to 0.8.18
Bumps [schemars](https://github.com/GREsau/schemars) from 0.8.17 to 0.8.18.
- [Release notes](https://github.com/GREsau/schemars/releases)
- [Changelog](https://github.com/GREsau/schemars/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GREsau/schemars/compare/v0.8.17...v0.8.18)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 20:32:36 -07:00
dependabot[bot]
d00ee82a9d chore(deps): bump sysinfo from 0.30.11 to 0.30.12
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.30.11 to 0.30.12.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 20:32:19 -07:00
dependabot[bot]
9f01d8fa0f chore(deps): bump serde from 1.0.199 to 1.0.200
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.199 to 1.0.200.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.199...v1.0.200)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 20:31:51 -07:00
LGUG2Z
627088c9b9 fix(wm): focus workspaces on cross-monitor cmds
This commit ensures that if a window is moved to a workspace on another
monitor which is not the currently focused workspace on that monitor,
the target workspace will be focused as part of the operation.
2024-05-06 18:31:01 -07:00
LGUG2Z
22cf7b5017 docs(readme): add comparison with fancy zones 2024-05-02 15:52:19 -07:00
LGUG2Z
3e984d886c docs(mkdocs): fix header level typo 2024-05-01 17:42:27 -07:00
LGUG2Z
185cb4d4a8 chore(dev): begin v0.1.26-dev 2024-04-30 15:02:48 -07:00
LGUG2Z
62900c59cb chore(release): v0.1.25 2024-04-30 14:49:45 -07:00
MasouShizuka
a2e9a46582 feat(wm): add resize of all layouts except grid with filp
fix: fix horizontal-stack out of monitor with vertical flip (db28e25)

feat: add resize of right-main-vertical-stack layout with filp (28dd546)
2024-04-30 13:09:53 -07:00
dependabot[bot]
871a53821c chore(deps): bump schemars from 0.8.16 to 0.8.17
Bumps [schemars](https://github.com/GREsau/schemars) from 0.8.16 to 0.8.17.
- [Release notes](https://github.com/GREsau/schemars/releases)
- [Changelog](https://github.com/GREsau/schemars/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GREsau/schemars/compare/v0.8.16...v0.8.17)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 18:27:57 -07:00
dependabot[bot]
bcd1c50d82 chore(deps): bump parking_lot from 0.12.1 to 0.12.2
Bumps [parking_lot](https://github.com/Amanieu/parking_lot) from 0.12.1 to 0.12.2.
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/parking_lot/compare/0.12.1...0.12.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 18:27:44 -07:00
dependabot[bot]
0c41d9ded2 chore(deps): bump serde from 1.0.197 to 1.0.199
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.197 to 1.0.199.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.197...v1.0.199)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 18:27:17 -07:00
dependabot[bot]
4af62fe97b chore(deps): bump thiserror from 1.0.58 to 1.0.59
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.58 to 1.0.59.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.58...1.0.59)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 18:26:10 -07:00
LGUG2Z
7cab062124 fix(stackbar): avoid drops on notification events
This commit completely removes the custom Clone and Drop trait
implementation for Stackbar, and moves the handling to be explicit
within container.rs, which helps us to avoid unintentional drops when
the Stackbar struct is cloned for Notification events sent to
subscribers such as Zebar.

re #746
2024-04-29 17:31:27 -07:00
LGUG2Z
611fa34567 fix(stackbar): avoid drops from variable updates
This commit ensures that when we call methods to change
Container.stackbar we are not unintentionally invoking a Drop which
kills a stackbar window that already exists.

Checks have been added to make sure that we not change the value of the
stackbar variable if it is already an Option::Some.

re #746 re #792
2024-04-29 13:56:24 -07:00
LGUG2Z
95990d682b fix(config): ensure tiling with layout rules
This commit ensures that tiling on a workspace will be enabled if a user
specifies layout rules or custom layout rules without providing an
option to the "layout" key.
2024-04-29 08:06:37 -07:00
LGUG2Z
e363a494c3 docs(mkdocs): various updates to reflect v0.1.25-dev.0 2024-04-28 13:51:08 -07:00
LGUG2Z
383533e2d9 feat(wm): add right-main-vertical-stack layout
This commit adds a new RightMainVerticalStack layout, adapting code from
the similarly named LeftWM layout.

It turns out that the horizontal axis flip on the VerticalStack does not
play well with resize offsets.

It was ultimately easier to implement this layout and the logic for
resizing both VerticalStack and RightMainVerticalStack independently
than to make resize offsets and horizontal axis flips work together.

I still have no idea why resize offsets and horizontal axis flips aren't
working properly together.

Horizontal axis flips have been disabled for both the VerticalStack and
RightMainVerticalStack layouts.

re #789
2024-04-28 12:17:53 -07:00
LGUG2Z
0b04e3ef93 fix(wm): avoid out of range container focus op
This commit ensures that when floating the sole window visible on a
workspace that the focused container index for the workspace will not be
decremented below 0.

re #787
2024-04-25 18:30:52 -07:00
LGUG2Z
3370e6acc5 fix(wm): revert mff edge case regression
This commit ensures that the wm's mouse_follows_mouse state is respected when handling FocusChange
WindowManagerEvents, so that applications opened on empty workspaces do not automatically center the
cursor unless configured to do so.

fix #782
2024-04-23 07:19:53 -07:00
LGUG2Z
4ffffc5eec fix(wm): revert regression in ffm raise handler 2024-04-23 07:03:48 -07:00
dependabot[bot]
2b5f737d14 chore(deps): bump proc-macro2 from 1.0.80 to 1.0.81
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.80 to 1.0.81.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.80...1.0.81)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 17:16:27 -07:00
dependabot[bot]
8a455c8ab7 chore(deps): bump serde_json from 1.0.115 to 1.0.116
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.115 to 1.0.116.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.115...v1.0.116)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 17:16:14 -07:00
dependabot[bot]
3d9871c576 chore(deps): bump reqwest from 0.12.3 to 0.12.4
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.12.3 to 0.12.4.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.3...v0.12.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 17:15:51 -07:00
dependabot[bot]
cafb8e9a48 chore(deps): bump sysinfo from 0.30.10 to 0.30.11
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.30.10 to 0.30.11.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/compare/v0.30.10...v0.30.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 17:15:26 -07:00
Sam Vendittelli
740cb3c877 fix(docs): correct typo in example config
The example configuration mistakenly used the key `border_padding` in
the place of `border_width`. As `border_padding` does not exist in the
spec, modifying its value has no effect.

As this file is used by `komorebic quickstart`, new users will have this
incorrect key in their default configuration. Notably, setting its value
to `0` to remove gaps has no effect. The rest of the documentation uses
the correct key, so users copying and pasting from that would not
encounter the bug.
2024-04-21 17:43:13 -07:00
LGUG2Z
b8b3b3d615 docs(wm): add stackbar config struct docs 2024-04-21 14:12:09 -07:00
LGUG2Z
6fce630be5 fix(wm): restore stackback on monocle off
This commit ensures that if a container stack has a stackbar, when
toggling off monocle mode, the stackbar will be restored as expected.
This requires an additional retile which it would be nice to avoid in
the future.
2024-04-21 12:35:23 -07:00
LGUG2Z
dfd0d604aa feat(cli): add move-to-monitor-workspace command
This commit adds a move-to-monitor-workspace command, which, following
the existing convention, does the same action as
send-to-monitor-workspace, but sets the focused monitor, workspace and
container to the window container once it is inserted into the target
monitor and workspace indices.
2024-04-20 14:58:57 -07:00
LGUG2Z
aff1081ccd feat(cli): detailed start failure error feedback
This commit ensures that after 3 failures to start komorebi with
'komorebic start', 'komorebi.exe' will be run directly in order to show
the detailed error output to the end user.
2024-04-20 14:37:27 -07:00
LGUG2Z
793e81d43d fix(cli): use force-quit if stop signal fails
This commit ensures that the komorebic stop command will force-quit
komorebi if the Stop SocketMessage handler fails.
2024-04-20 14:37:23 -07:00
LGUG2Z
eac4c8e9b1 fix(wm): add regex ws rule matching support
This commit ensures that enforce_workspace_rules() will try to match
exact exe names, classes and titles, and then against any potential
regexes that may have been used as keys to index matching rules against
the current window's exe, title and class.

Support for other matchers isn't implemented yet. Not sure it's worth
adding while using a HashMap to store the workspace rules, probably need
to rethink the data structure first.
2024-04-18 19:44:08 -07:00
جاد
6b42587af4 docs(ahk): add #requires line, remove asc ref
* re-add the #requires line that was removed in commit e044a5a
* remove the "generated by komorebic" comment which is incorrect. komorebic only generates an AHK v1 lib
* update common-workflows/autohotkey.md to remove line about `komorebi.generated.ahk file which no longer exists
2024-04-16 08:04:15 -07:00
LGUG2Z
46152621c0 feat(wm): immediate stackbar mode updates via ipc
This commit ensures that when the stackbar mode is updated via a
SocketMessage or static config update, any visible stackbars will have
their mode updated immediately without having to wait for user
interaction.
2024-04-16 07:54:31 -07:00
mmikeww
b78693118b Update autohotkey.md
komorebi.generated.ahk is no longer in the repo, it was deleted in commit 52122c401d, so remove the instruction to download it
2024-04-15 21:29:31 -04:00
mmikeww
7caa839a00 Update komorebic.lib.ahk
re-add the #Requires v2 line
remove the "generated by komorebic" comment
2024-04-15 21:24:11 -04:00
LGUG2Z
1671f31e3e feat(wm): add window debugging
This commit adds support for debugging windows and emitting information
about how they go through komorebi's decision making pipeline and rules
engines which ultimately decide how they are or aren't managed.
2024-04-15 15:05:20 -07:00
LGUG2Z
6fe46610fc refactor(wm): ensure configurability via ipc
This commit ensures that new features such as stackbar, particularly
where the configuration is located in the global state, can be
configured via SocketMessages.

A few structs had to be moved to komorebi-core to make this possible.
I've also cleaned up a bunch of strum snake_case attrs which seemed to
be unused.

A new GlobalState SocketMessage has been introduced, and going forward
we should make sure that this can send all global state to a requester,
and move global state out of the State handler, which should only handle
window manager state.
2024-04-15 08:36:28 -07:00
LGUG2Z
4ba3125dde fix(wm): ensure window restore on stackbar click
This commit ensures that a window is restored before a focus call is
made on it when switching windows in a stack by using a window's tab in
the stackbar.

This handles the issue where two clicks are required to trigger a layout
update the first time a window that is not currently at the top of the
stack is brought to the front via a stackbar click.
2024-04-13 22:38:41 -07:00
James Tucker
efa562de5c fix(wm): avoid out of range subtraction
This fixes the panic, but not the underlying problem.

Updates #757
Updates #758
2024-04-13 22:17:57 -07:00
James Tucker
b476bee1d8 fix(wm): fix focus changes with stackbar enabled
Notify all stackbars on focus change, and they now respond to changes,
but do not create focus changes themselves just from an update.
2024-04-13 22:07:53 -07:00
James Tucker
86b07f28dd chore(deps): update deps, including miow
Fixes #696
2024-04-13 21:59:48 -07:00
James Tucker
311e37c8a2 fix(wm): reduce errors from non-window events
As we have been working down some bugs from earlier changes, we
introduced some additional error conditions in the logs. Now that the
new focus approach is available, switching the stackbar to that means we
can avoid needing to pass down ForceUpdate and FocusChange events for
non-windows, which removes many of these cases.

In addition we do a check in should_manage that the target object is
actually a window, ignoring the event if it is not.
2024-04-13 21:14:59 -07:00
James Tucker
15c3b32608 feat(wm): report full errors in debug mode
This gives us a stack trace style error report in the log when in debug
mode, which makes it much quicker to track down the origin of an error.
2024-04-13 17:28:49 -07:00
James Tucker
28b46c54da fix(wm): correct use of z-order flags
We had been setting managed windows to HWND_TOPMOST which is a sticky
and viral parameter. This was also the cause of the border window ending
up behind other windows in an undesirable fashion, as even though it was
marked WS_EX_TOPMOST, we were then having to mark it HWND_NOTOPTMOST
when raising it to avoid it ending up drawing over other windows.

Since we've fixed the border window to no longer be visible when
unmanaged windows are focused, we can now set the border window to
HWND_TOP when we reposition, which will ensure it's drawing in the order
that we want.

Now we also set managed windows only to HWND_TOP, rather than
HWND_TOPMOST which stops us from incorrectly reordering internal
concerns vs. child windows and owned windows that we're not managing.
Windows are still brought to the foreground as expected/desired, but
they're no longer 'sticking' there, nor are they drawing over the border
window.

This change does have a slight transition behavior as it initially rolls
out, as prior versions of the Komorebi have been setting HWND_TOPMOST,
which as a sticky parameter won't be cleared until the application or
host system removes that flag. This means that the final z-order
behavior will come good eventually.

To immediately see the correct results, restarting affected apps or
logging out / in will do. Unfortuantely we can't just set
HWND_NOTTOPMOST, as similarly to setting HWND_TOPMOST, this can cause
issues with an applications intended owned-window Z-Ordering - mostly
affecting toolwindows and child windows, such as file dialogs, toolbars
and so on, most of which we do not manage.
2024-04-13 17:28:45 -07:00
James Tucker
732aca77b5 refactor(wm): use a new method to focus windows
Use the same method as FancyZones to enable setting the foreground
window. This makes it possible then to remove the thread attachment
behaviors that have a number of other complex side effects, and aren't
always allowed.

In addition, cleanup old focus/raise methods some, in particular the
border window is now explicitly not activated when it is raised, as it
should never be activated.
2024-04-13 16:51:01 -07:00
James Tucker
f56fc36557 refactor(wm): remove mutability from window and events
We had a mut requirement on some of the Window functions which may have
been vestigial or in preparation for more state on Window objects, but
presently unused. I removed that, as the Window struct is currently just
carrying an HWND value that's essentially always immutable - there's no
advantage to ever reusing a Window struct vs. making a new one for
another HWND.

In doing so we then no longer needed to be passing in mutable events, so
I applied a little simplification of the event receiver / dispatcher to
process_event. After that it became obvious that we could just pass the
owned event directly into process_event instead, which substantially
simplifies the ownership model and lifetime for those objects.

This is small, and shouldn't create any meaningful behavioral change.
2024-04-13 16:50:26 -07:00
LGUG2Z
5334e1944e fix(wm): ensure stackbar tab clicks trigger
This commit fixes a small regression that prevented events emitted from
clicks on stackbar tabs from being handled.
2024-04-13 12:02:46 -07:00
LGUG2Z
d8d087e621 fix(wm): ensure borders are drawn w/ stackbar
This commit fixes a small regression and ensures that the active window
border, when enabled, will be drawn as expected when a container stack
has a stackbar active.
2024-04-13 11:02:14 -07:00
James Tucker
b61146ead4 fix(wm): hide border when unmanged windows are focused
Previously we were dropping events that don't pertain to managed
windows, with one exception in should_manage that could probably do with
further cleanup (DisplayChange).

This first step fixes the latent border window problem, where we would
retain a border window when the last managed window was closed and focus
transitioned to an unmanaged window.
2024-04-13 10:22:03 -07:00
LGUG2Z
16cb811aa9 docs(license): switch to polyform, add contributing.md 2024-04-12 14:46:36 -07:00
LGUG2Z
862219b9a3 chore(dev): begin v0.1.25-dev 2024-04-11 16:59:01 -07:00
LGUG2Z
0fc75afb00 chore(release): v0.1.24 2024-04-09 17:57:41 -07:00
LGUG2Z
d67f355a17 refactor(logs): reduce noise on info level 2024-04-09 17:34:14 -07:00
LGUG2Z
3d0ed4cfc4 fix(wm): address regression from 5e714ca
This commit fixes a regression introduced in 5e714ca which broke the
cross-monitor mouse move behaviour.
2024-04-09 16:30:58 -07:00
Carlos Regis
21be01b9aa docs(mkdocs): show default loc for whkdrc (#739) 2024-04-08 16:48:52 -07:00
LGUG2Z
648ba672e3 docs(config): update schema version in docstring 2024-04-07 14:26:27 -07:00
LGUG2Z
af6529851e chore(dev): begin v0.1.24-dev 2024-04-07 14:18:29 -07:00
LGUG2Z
bea3d1fcbc chore(release): v0.1.23 2024-04-07 13:34:18 -07:00
LGUG2Z
e40fa11b0d docs(mkdocs): offline install, stackbar, border style 2024-04-05 18:37:16 -07:00
LGUG2Z
251ec3d53e fix(wm): address toggle-float container edge case
This commit ensures that the focused container index on a workspace is
updated appropriately if the user calls toggle-float on the last
Container in a Ring. Previously, doing this would leave a ghost tile.
Now that we check if the focused_idx is still valid after removing an
empty Container from the workspace, users will no longer be left with a
ghost tile.
2024-04-05 17:12:14 -07:00
LGUG2Z
5e714cafab fix(wm): limit resize/move path to managed hwnds
This commit ensures that the MoveResizeEnd handler will only proceed if
the window triggering the event is a managed window on the focused
workspace.

fix #733
2024-04-05 15:19:32 -07:00
LGUG2Z
6aa9be1ea0 fix(config): gracefully handled deprecated asc opt
This commit ensures that if an applications.yaml revision is passed
which includes the now-deprecated border_overflow option, komorebi will
gracefully handle it instead of crashing on an unknown enum variant
error.
2024-04-05 15:15:07 -07:00
dependabot[bot]
6238d1f848 chore(deps): bump h2 from 0.4.3 to 0.4.4
Bumps [h2](https://github.com/hyperium/h2) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.4.3...v0.4.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-05 08:37:53 -07:00
LGUG2Z
d83dc48230 feat(docs): deprecate border overflow identifiers 2024-04-04 14:45:23 -07:00
LGUG2Z
f2c4dadcde feat(docs): update schema.json + mkdocs cli pages 2024-04-04 14:34:58 -07:00
LGUG2Z
c05e9ea089 fix(wm): always check/ensure datadir creation
A user reported in an issue that their komorebi data dir did not persist
across reboots. While there have not been any other reports of this type
of system behaviour, it's worth just doing a mkdir -p equivalent call
whenever komorebi.exe is starting to ensure that the socket files can
always be created no matter what.

re #731
2024-04-04 12:56:55 -07:00
LGUG2Z
37aa99a537 feat(config): add active window border style opt
This commit adds a new active window border style configuration option
to komorebi.json, allowing users to explicitly opt in to square or
rounded active window borders to match whatever patches they may have
made at the system / dwm.exe level.
2024-04-02 19:39:19 -07:00
dependabot[bot]
dca32bead5 chore(deps): bump serde_json from 1.0.114 to 1.0.115
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.114 to 1.0.115.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.114...v1.0.115)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 12:10:17 -07:00
dependabot[bot]
77eaddca1e chore(deps): bump reqwest from 0.11.27 to 0.12.2
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.27 to 0.12.2.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.27...v0.12.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 12:10:08 -07:00
LGUG2Z
79fb098d04 docs(cli): add support + community links to start cmd 2024-03-25 17:55:28 -07:00
dependabot[bot]
d0bab4280a chore(deps): bump heck from 0.4.1 to 0.5.0
Bumps [heck](https://github.com/withoutboats/heck) from 0.4.1 to 0.5.0.
- [Changelog](https://github.com/withoutboats/heck/blob/master/CHANGELOG.md)
- [Commits](https://github.com/withoutboats/heck/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 17:27:02 -07:00
dependabot[bot]
e616004da7 chore(deps): bump serde_yaml from 0.9.33 to 0.9.34+deprecated
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.33 to 0.9.34+deprecated.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.33...0.9.34)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 17:26:43 -07:00
LGUG2Z
c65060fbd9 feat(wm): add stackbar for multi-window containers
This commit introduces the stackbar feature through careful extracting
and refactoring of code from the Komorebi-UI hard-fork.

Unfortunately on the fork, this feature was not implemented using atomic
commits, which resulted in the implementation here being more of a
"reinterpretation" than a lift-and-shit of the referenced code.

Nevertheless, this commit represents a working version of the stackbar
feature.

resolve #681
2024-03-25 14:30:30 -07:00
dependabot[bot]
50a851a660 chore(deps): bump which from 6.0.0 to 6.0.1
Bumps [which](https://github.com/harryfei/which-rs) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/harryfei/which-rs/releases)
- [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/harryfei/which-rs/compare/6.0.0...6.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 11:20:18 -07:00
dependabot[bot]
8ad6f4be1f chore(deps): bump regex from 1.10.3 to 1.10.4
Bumps [regex](https://github.com/rust-lang/regex) from 1.10.3 to 1.10.4.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.3...1.10.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 11:19:46 -07:00
LGUG2Z
24ac0c4cd3 refactor(cli): avoid http reqs for sample configs
re #716
2024-03-24 21:07:10 -07:00
LGUG2Z
e0652d953a feat(config): add negative matching strategies
This commit adds support for negative matching strategies to complement
Equals, StartsWith, EndsWith and Contains.
2024-03-22 21:06:24 -07:00
LGUG2Z
d6e0ecc507 feat(config): add support for composite rules
This commit adds support for composite rules in the static configuration
file, and for float_identifiers in the applications.yaml file.

A new enum, MatchingRule provides two variants, Simple and Composite,
and is now used in place of IdWithIdentifier throughout komorebi.

In order to keep this new enum lean, a variant for
IdWithIdentifierAndComment has not been added, and references to it in
the old config generation code have been replaced with MatchingRule.

resolve #462, resolve #715, resolve #237
2024-03-22 17:51:20 -07:00
LGUG2Z
ca22cdb07f fix(wm): add hack for new firefox windows
This commit adds a 10 millisecond thread sleep specifically for Firefox
as an interim solution for the race condition which results in new
windows often not being tiled correctly until interacted with.

The idea to add a sleep instead of spamming the output with dbg! calls
comes from @kornel@mastodon.social:

https://mastodon.social/@kornel/112125851048707993
2024-03-19 20:27:25 -07:00
dependabot[bot]
dc38eae2af chore(deps): bump serde_yaml from 0.9.32 to 0.9.33
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.32 to 0.9.33.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.32...0.9.33)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-18 13:24:46 -07:00
dependabot[bot]
66446f571c chore(deps): bump os_info from 3.8.0 to 3.8.1
Bumps [os_info](https://github.com/stanislav-tkach/os_info) from 3.8.0 to 3.8.1.
- [Release notes](https://github.com/stanislav-tkach/os_info/releases)
- [Changelog](https://github.com/stanislav-tkach/os_info/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stanislav-tkach/os_info/compare/v3.8.0...v3.8.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-18 13:18:37 -07:00
LGUG2Z
b2f6329963 fix(wm): raise applicationframehost apps via state
This commit ensures that ApplicationFrameHost.exe applications developed
by Microsoft are raised correctly when a user has the custom komorebi
ffm implementation enabled.

The Win32 API calls EnumWindows and WindowFromPoint return different
HWNDs for the same windows because of some jank in how the
ApplicationFrameHost apps are developed.

To avoid this inconsistency on the Win32 API level, komorebi now queries
its own state when looking up HWNDs for windows at any given cursor
position.
2024-03-16 15:35:37 -07:00
LGUG2Z
bc46f65f64 fix(wm): use focus fn in komorebi ffm
This commit swaps out the old "raise" fn for the more up-to-date and
tested "focus" fn when raising a window for focus when the "komorebi"
implementation of focus follows mouse is enabled.
2024-03-15 18:57:38 -07:00
LGUG2Z
69573c383f refactor(wm): use notopmost flag instead of bottom
It seems like when we use the bottom flag, Rainmeter widgets will be
drawn on top of windows that are managed by komorebi. After looking at
the GlazeWM codebase, where this issue does not occur, it seems like the
difference is made by the use of the notopmost flag.

resolve #679
2024-03-15 18:48:53 -07:00
LGUG2Z
45a3f2a6b5 chore(dev): begin v0.1.23-dev 2024-03-15 18:48:28 -07:00
dependabot[bot]
5af00b64cf chore(deps): bump softprops/action-gh-release from 1 to 2
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-11 11:27:03 -07:00
dependabot[bot]
81dff3279c chore(deps): bump clap from 4.5.1 to 4.5.2
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.1 to 4.5.2.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.1...v4.5.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-11 11:26:14 -07:00
dependabot[bot]
2f17e4bb29 chore(deps): bump reqwest from 0.11.24 to 0.11.25
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.24 to 0.11.25.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.24...v0.11.25)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-11 11:24:32 -07:00
dependabot[bot]
1b966d3731 chore(deps): bump ctrlc from 3.4.2 to 3.4.4
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.4.2 to 3.4.4.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.4.2...3.4.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-11 11:24:14 -07:00
dependabot[bot]
e58d776f81 chore(deps): bump sysinfo from 0.30.6 to 0.30.7
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.30.6 to 0.30.7.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/compare/v0.30.6...v0.30.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-11 11:24:00 -07:00
LGUG2Z
40e77fddfe chore(release): v0.1.22 2024-03-03 21:00:37 -08:00
LGUG2Z
9c8a50fe80 docs(mkdocs): updates for v0.1.22 2024-03-03 20:53:25 -08:00
LGUG2Z
41e9068fca chore(wm): add debug event info to ignored windows 2024-03-03 14:58:12 -08:00
LGUG2Z
3690f8ebd8 ci(github): add common cargo checks 2024-03-03 13:31:20 -08:00
LGUG2Z
7b24474ef2 fix(wm): prevent ghost active border on empty ws
This commit ensures that a "ghost border" will not be drawn when
switching to empty workspaces if active_window_border = true.
2024-03-02 19:30:50 -08:00
LGUG2Z
f675717844 ci(github): add goreleaser check to build 2024-03-02 15:23:06 -08:00
LGUG2Z
38b0418c3b fix(subscriptions): emit ws event on empty targets
This commit ensures that workspace change events get emitted even when
changing to workspaces with no window containers. Previously these were
failing due to early returns triggered when the workspace focused did
not have a focused container.
2024-03-02 11:15:20 -08:00
LGUG2Z
6781f34930 fix(wm): restore full mouse resize functionality
This commit fixes a regression that was most likely introduced in #678
which changed a bunch of stuff related to window and border dimension
calculation.

See commit 4e98d7d36d for more information
as the same approach to fix the behaviour there has been applied here.
2024-03-01 19:07:05 -08:00
Javier Portillo
4919872e1a fix(wm): adds special case for grid stacks to the right 2024-03-01 16:14:42 -08:00
LGUG2Z
d730c3c72d feat(config): support parsing json w/ comments
This commit switches out the serde_json crate with the
serde_json_lenient crate, forked by Google, which allows for JSON files
with comments to be parsed properly.

Users can set the format of komorebi.json to "jsonc" in their editors in
order to write // comments without being faced with lint errors.

The expected file extension remains the same (json). komorebi and
komorebic will not look for files with the "jsonc" file extension or any
other JSON-variant file extension.

resolve #693
2024-02-29 17:35:47 -08:00
LGUG2Z
4e98d7d36d fix(wm): restore drag-to-swap window functionality
This commit fixes a regression that was most likely introduced in #678
which changed a bunch of stuff related to window and border dimension
calculation.

While we could previously assume that the points resize.right and
resize.bottom would always be 0 if we were dealing with a move rather
than a resize, these two points now depend on the values of BORDER_WIDTH
and BORDER_OFFSET. The code has been updated to reflect this and
calculate this constant just-in-time.
2024-02-29 17:22:56 -08:00
eythaann
2bceff4edc feat(wm): add path variant to application identifiers
This commit add a new way to match applications
through its paths, allowing to match a bunch
of applications that share a parent folder.
2024-02-28 12:04:46 -08:00
dependabot[bot]
b32bce8713 chore(deps): bump miette from 5.10.0 to 7.1.0
Bumps [miette](https://github.com/zkat/miette) from 5.10.0 to 7.1.0.
- [Release notes](https://github.com/zkat/miette/releases)
- [Changelog](https://github.com/zkat/miette/blob/main/CHANGELOG.md)
- [Commits](https://github.com/zkat/miette/compare/miette-derive-v5.10.0...miette-derive-v7.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-27 22:51:28 -08:00
dependabot[bot]
47af40cf9e chore(deps): bump hotwatch from 0.4.6 to 0.5.0
Bumps [hotwatch](https://github.com/francesca64/hotwatch) from 0.4.6 to 0.5.0.
- [Release notes](https://github.com/francesca64/hotwatch/releases)
- [Changelog](https://github.com/francesca64/hotwatch/blob/main/CHANGELOG.md)
- [Commits](https://github.com/francesca64/hotwatch/compare/v0.4.6...v0.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-27 21:55:12 -08:00
LGUG2Z
2b9fbc2074 chore(deps): bump windows-rs from 0.52 to 0.54 2024-02-27 18:33:29 -08:00
LGUG2Z
1a8b6a7398 feat(client): introduce komorebi-client crate
This commit introduces the komorebi-client library crate for other Rust
applications to interact with a running instance of komorebi over Unix
Domain Sockets.

Currently the crate re-exports everything one might find in the
komorebi::State struct and everything that is publicly exposed in
komorebi-core.

Public types and methods are still lacking documentation, and this crate
should not be published on crates.io until this is no longer the case.
2024-02-26 18:18:40 -08:00
James Tucker
e5cf042ea9 fix(komorebi): fix unsound use of transmute
This was causing a crash in release mode when moving a window around by
titlebar.
2024-02-26 11:00:34 -08:00
James Tucker
c435f84afc fix(komorebi): remove some warnings that just snuck in 2024-02-25 22:31:39 -08:00
LGUG2Z
de0db4d014 docs(readme): contributing, uds subs + rust client
This commit adds some contribution guidelines and updates the "Window
Manager Event Subscriptions" section with information on using
subscribe-socket and komorebi-client.
2024-02-25 21:53:11 -08:00
James Tucker
0afcf6d86a fix(komorebi): don't scale for DPI, as we're not DPI aware
This fixes a regression from 344e6ad2fd
that assumed we were declared DPI aware.
2024-02-25 19:01:48 -08:00
LGUG2Z
e0e3afa5b9 feat(config): update border opts, add deprecations
This commit includes backwards-compatible renames of
active_window_border_offset and active_window_border_width to
border_offset and border_width respectively.

Since the invisible window border adjustments were removed in #678, the
invisible window borders set by the OS can now also be adjusted via
border_offset and border_width, which is the primary reason for the
rename.

invisible_borders has been marked as deprecated and the previously
deprecated alt_focus_hack option has been removed.
2024-02-25 17:41:49 -08:00
James Tucker
94d8f72904 fix(komorebi): don't raise the border window to top
This trades one issue for another, in order of importance:

- Pop-up windows such as a file upload dialog box for Firefox no longer
  have a window border drawn over the top - better.
- Opaquely bordered windows without DWM decorations, combined with a -1
  offset / single pixel border end up as invisible borders (e.g. EPIC
  Games Launcher).
2024-02-25 16:27:16 -08:00
James Tucker
9b9777feaf fix(komorebi): close the corner gap around rounded corners
The default window corner rounding is still slightly visible at offset
-1 until this corner radius that completely closes up the transparent
region, without needing to invasively draw over the target window.
2024-02-25 16:27:16 -08:00
James Tucker
0c2e37e127 fix(komorebi): raise windows and border to top, not topmost
topmost has a special meaning, in that it is a sticky raise, which is
not what we want - we don't want to be permanently above all other
windows, as this leads to bugs where for example the windows can end up
stuck above non-topmost windows in a different security context, such as
programs running with administrator priviliges.
2024-02-25 16:27:16 -08:00
James Tucker
10ae60f79b fix(config): set new default border offset and width
In the new border painting strategy, the 20 pixel border is huge. The
border is now offset -1 by default, so as to draw over the standard DWM
1px border (avoiding a "1 pixel see through gap"), and the default width
is 8px.
2024-02-25 16:27:16 -08:00
James Tucker
fbb34ba4b3 fix(komorebi): account for border decorations on resize
The SetWindowPos API will inset the provided dimensions by the amount of
space required for window decorations (shadows, etc). Compute the size
of the decorations and add them as padding to the provided size,
resulting in windows being set precisely to the target dimensions.

An active_window_border_width=1, active_window_border_offset=-1 will now
paint over the 1px window decoration consistently.

The border window is always made topmost on resize, so that it paints
over custom borders (e.g. EPIC Games Launcher) as those borders are
opaque and as such a 1px border configuration as above becomes invisible
in that condition.
2024-02-25 16:27:16 -08:00
James Tucker
5ee827ecaf fix(komorebi): account for border offset and width in layout
The layout should leave the space configured for the border, so that the
border always stays within the workspace bounds.

Border offset is cleaned up, as it is no longer a rect, but instead just
a fixed value.

The rect function for adjusting padding now takes a concrete value, as
the optional has no local meaning to the operation, being equivalent to
the default value.

A margin function is added to centralize the notion of increasing the
size of a rect by the given margin, the opposite of the padding
operation.
2024-02-25 16:27:16 -08:00
James Tucker
dc3ffb3bcb fix(komorebi): restore borders, no more DWM border on border window
This fixes a regression from an earlier commit that dropped the DWM
style borders without fixing corner rounding on Windows 11. This is now
fixed for Windows 11 again, while avoiding the extra system border
decorations.
2024-02-25 16:27:16 -08:00
James Tucker
4affefad88 fix(cfg,komorebi): remove all uses of invisible borders
This makes the borders pixel-perfect, and border_overflow can be
disabled on all applications.

Unfortunately this also means we lose the corner rounding, so that may
need to be done differently or the offsets refined in some way to
address that.
2024-02-25 16:27:16 -08:00
James Tucker
344e6ad2fd komorebi{,-core}: use window bounds without shadow
Switch to using the DWM API to get Window bounds so as to exclude the
outside of window decorations from the computation.

This is getting close to a precise window size, you can now set an
active border width of 1 and an offset of 1 and get a 1 pixel line
around most windows, except that there's some extra top padding I have
yet to find the cause of.

This implementation needs to be DPI aware, but I haven't yet tested if
the DPI scaling approach is entirely valid - we may instead need to get
the per-monitor DPI scale, identify the monitor the window is on, and
scale to that, rather than using the system wide scale.

Maybe fixes #574
Maybe updates #622
2024-02-25 16:27:16 -08:00
LGUG2Z
fd57d32bb5 refactor(clippy): apply various lint fixes and recs 2024-02-25 13:33:44 -08:00
LGUG2Z
0581950b21 feat(cli): add whkdrc config path command
This commit adds the "komorebic whkdrc" command to go along with the
"komorebic configuration" command introduced in
608ec03047, aimed it making it easier to
edit this file using a command line editor.

The "config" command has been renamed in the code to Configuration, with
an alias of "config". The Whkdrc command similarly comes with the "whkd"
alias.
2024-02-25 13:26:05 -08:00
LGUG2Z
a07bb4ac60 docs(mkdocs): update old videos in common workflows 2024-02-25 13:06:24 -08:00
Javier Portillo
eab7a64250 fix(grid): enables flip_layout and make it behave correctly 2024-02-25 11:12:34 -08:00
Javier Portillo
98244b9572 feat(wm): passes optional op_direction and count to <dir>_index functions 2024-02-25 11:12:34 -08:00
Javier Portillo
2c156e9a99 refactor(grid): use matches! for early returns 2024-02-25 11:12:34 -08:00
Javier Portillo
d33df04f38 fix(grid): prevents axis flips on grid layout 2024-02-25 11:12:34 -08:00
Javier Portillo
9c196b99c9 feat(grid): adds no-operations for Promote and PromoteFocus commands 2024-02-25 11:12:34 -08:00
Javier Portillo
9fcf4ec19f feat(wm): add grid layout
Based on the Grid layout on LeftWM

Co-authored-by: LGUG2Z <LGUG2Z@fastmail.com>
2024-02-25 11:12:34 -08:00
dependabot[bot]
c3e39311c1 chore(deps): bump which from 5.0.0 to 6.0.0
Bumps [which](https://github.com/harryfei/which-rs) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/harryfei/which-rs/releases)
- [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/harryfei/which-rs/compare/5.0.0...6.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-25 11:02:19 -08:00
LGUG2Z
e7d928a065 feat(config): allow colours in both rgb and hex
This commit introduces the ability for users to specify colours in the
static config file in either RGB or Hex format.

This is done by introducing a new enum, Colour, which provides variants
wrapping the internal Rgb type, and the HexColour type from the
hex_colour crate. HexColour itself is wrapped in a new struct, Hex, in
order to allow the implementation of the JsonSchema trait.

A number of From<T> implementations have been done in order to make
working with the Colour enum more ergonomic.

Ultimately, the core representation for colours in komorebi remains the
Rgb struct, any and Hex-specified colours will be converted to this Rgb
type before being converted to u32 to pass them on to various Win32 API
calls.
2024-02-25 10:37:00 -08:00
LGUG2Z
608ec03047 feat(cli): add config command
This commit adds the "komorebic config" command as a helper to print the
path to komorebi.json, while respecting the KOMOREBI_CONFIG_HOME
environment variable if it exists.

This is particularly useful for users who wish to edit this file on the
command line, as they can now run commands like:

"lvim $(komorebic config)"
2024-02-25 09:31:57 -08:00
LGUG2Z
92359ebaed fix(wm): improve floating ws window handling
This commit addresses and number of bugs and improves the experience of
working with floating workspaces (ie. Workspace.tile = false).

- When the user moves or resizes a window on a floating workspace,
  WindowManagerEvent::MoveResizeStart will no longer trigger, which
  prevents the mouse focus from going to the middle of the window rect
  after the resize or move action (if mouse_follows_focus = true)

- If active_window_border = true, it will no longer be shown on focused
  windows in floating workspaces

- When windows are moved using a komorebic command from a floating
  workspace to a tiling workspace and active_window_border = true, the
  active window border will be shown again
2024-02-25 08:37:00 -08:00
LGUG2Z
c19f64144a fix(cli): remove socket connection retry loop
This commit remove the socket connection retry loop in send_message
which is no longer required after @raggi's changes in
c8f6502b02.

@azinsharaf noticed that when trying to run komorebic commands while
komorebi was not accepting connections, multiple hanging komorebic
instances could be spawned, particularly if commands were retried.

@eythaann proposed an additive fix for this in PR684 but ultimately as
the previous race condition with the query/response commands has been
handed by @raggi we can remove the socket connection retry loop
completely.
2024-02-25 08:17:20 -08:00
LGUG2Z
8642ac0946 fix(wm): improve maximized window handling
This commit addresses a few bugs with regards to maximized window
handling.

- Correctly restoring and focusing when switching to a workspace
  containing a window previously maximized with the toggle-maximize
  command

- Unmaximizing a window during the initial window scan when the wm
  initializes so that windows that are maximized before running komorebi
  will no longer have the ugly white bar at the top

- When updating workspace layouts, windows that have been maximized
  without using the komorebic toggle-maximize command will be
  unmaximized to prevent the wm state drifting out of sync with what is
  happening on the screen
2024-02-24 19:30:38 -08:00
LGUG2Z
dee5842c9c chore(deps): cargo update 2024-02-24 17:36:43 -08:00
LGUG2Z
a6deeef717 fix(wm): cycle stack focus w/ mff disabled
This commit ensures that the focus changes to the appropriate window
when a container stack is being cycled through by a user who has
disabled the mouse_follows_focus feature.

fix #680
2024-02-24 13:01:45 -08:00
James Tucker
0160e8eeeb fix(wm): cleanup window event messaging
- Use a single thread to bind the hook, and then start dispatching.
- Use a blocking loop for message dispatching.
- Remove the locks around crossbeam channel, as it's already Send + Sync
2024-02-20 18:01:56 -08:00
LGUG2Z
f519cbaf1e refactor(wm): split komorebi into bin and lib
This commit splits the komorebi crate into a mixed binary and library
crate.

All types and logic related to window management have been moved under
lib.rs, and are imported from there for use in main.rs, which is now
only responsible for starting and running the window manager process.

In preparation for exposing a new komorebi-client crate in the future,
serde::Deserialize has been derived on Notification and any struct that
may appear in a notification receievd by a process that has subscribed
to event updates.

re #659
2024-02-18 15:14:59 -08:00
LGUG2Z
ef1ce4a389 feat(subscriptions): add uds subscription support
This commit adds support for subscriptions via Unix Domain Sockets which
are better suited for IPC between Rust processes compared to Named Pipes
which have issues that I don't want to spend time resolving.

The main motivation for this change is to provide an easy way for the
new zebar project to consume information about komorebi's state in the
Rust backend so that a bar module can be created for komorebi users.

The next step in this process will be to finally refactor the komorebi
crate into a mixed bin/lib crate, and expose all notification-related
structs and maybe some connection helper methods in a new
komorebi-client crate.

The previous "subscribe" and "unsubscribe" komorebic commands have had
the "-pipe" suffix added to them, with aliases in place for the previous
names in order to ensure backwards compat.
2024-02-17 18:14:14 -08:00
James Tucker
c8f6502b02 fix(cli,tcp): replies are sent on the requesting channel
Replace the client socket with replies sent on the other side of the
querying stream, for both UDS and TCP clients. This has two results:
unix socket clients such as komorebic no longer race on the socket bind,
fixing the out of order bind error, and the response mixup conditions
that could occur. Queries over TCP now receive replies over TCP, rather
than replies being sent to a future or in-flight command line client.
2024-02-17 11:03:42 -08:00
LGUG2Z
afd93c34a2 docs(readme): add v0.1.21+ quickstart video 2024-02-16 15:14:15 -08:00
LGUG2Z
d52715a8fa fix(cli): create local appdata dir w/ quickstart
This commit ensures that the $Env:LOCALAPPDATA/komorebi dir is created
by the quickstart command, as it cannot be assumed that this will always
exist, especially on new machines with recent versions of Windows 11.

fix #671
2024-02-16 13:15:44 -08:00
LGUG2Z
549500887f chore(dev): begin v0.1.22-dev 2024-02-16 13:04:51 -08:00
LGUG2Z
40947e39e8 docs(quickstart): ensure $env:localappdata\komorebi creation 2024-02-16 08:51:42 -08:00
LGUG2Z
17a45804b4 chore(release): v0.1.21 2024-02-15 17:56:06 -08:00
LGUG2Z
0e14f25130 fix(scoop): detect shims correctly w/ sysinfo 0.30
This commit is a fix that handles a subtle breaking change in
sysinfo::Process:root() which no longer can be used to see if a process
is a scoop shim.

Instead we can stringify the executable path and see if the absolute exe
path contains the substring "shims".

With this fix duplicate process detection is once again working
correctly.
2024-02-15 17:54:03 -08:00
LGUG2Z
380971edee chore(dev): begin v0.1.21-dev 2024-02-15 14:05:49 -08:00
LGUG2Z
52122c401d chore(release): v0.1.20 2024-02-15 12:55:01 -08:00
LGUG2Z
e5ebf55115 docs(readme): add references to docs website 2024-02-15 12:21:51 -08:00
LGUG2Z
0c75ec37d0 docs(mkdocs): add common workflows section 2024-02-15 12:21:51 -08:00
LGUG2Z
731a4465f1 feat(config): reduce noise in jsonschema output 2024-02-15 12:21:51 -08:00
LGUG2Z
596884e9fd docs(mkdocs): link to ext jsonschema docgen 2024-02-15 12:21:51 -08:00
LGUG2Z
5ef53c2b68 docs(mkdocs): add cli reference 2024-02-15 12:21:51 -08:00
LGUG2Z
a00a85e63f feat(cli): add docgen cmd for mkdocs pages 2024-02-15 12:21:51 -08:00
LGUG2Z
e0aa0ac843 docs(mkdocs): add index and getting started sections 2024-02-15 12:21:51 -08:00
LGUG2Z
3e6e586d5b docs(mkdocs): start building dedicated site 2024-02-15 12:21:51 -08:00
dependabot[bot]
57a3ba6d57 chore(deps): bump h2 from 0.3.22 to 0.3.24
Bumps [h2](https://github.com/hyperium/h2) from 0.3.22 to 0.3.24.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/v0.3.24/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.22...v0.3.24)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-14 20:02:46 -08:00
LGUG2Z
58f47e7440 docs(whkd): target older ps ver with whkdrc sample 2024-02-13 12:50:46 -08:00
dependabot[bot]
fe5bbc8431 chore(deps): bump strum from 0.25.0 to 0.26.1
Bumps [strum](https://github.com/Peternator7/strum) from 0.25.0 to 0.26.1.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits/v0.26.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 07:29:24 -08:00
dependabot[bot]
0ed1a52950 chore(deps): bump regex from 1.10.2 to 1.10.3
Bumps [regex](https://github.com/rust-lang/regex) from 1.10.2 to 1.10.3.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.2...1.10.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 07:29:05 -08:00
LGUG2Z
b64c0e127d feat(config): recognize komorebi_config_home for asc path
This commit ensures that the KOMOREBI_CONFIG_HOME environment variable is recognized by the
komorebic check command and the static config loader when used to specify the location of the
applications.yaml file.

resolve #660
2024-02-09 16:49:49 -08:00
LGUG2Z
5d812aa41d feat(cli): read whkd config dir env in check cmd
This commit ensures that komorebic's check command will respect
WHKD_CONFIG_HOME when looking for whkdrc if it has been set by the user.

resolve #649
2024-02-09 16:30:19 -08:00
dependabot[bot]
a682c2a53d chore(deps): bump actions/cache from 3 to 4
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-09 08:43:15 -08:00
dependabot[bot]
cb30099610 chore(deps): bump crossbeam-channel from 0.5.10 to 0.5.11
Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.10 to 0.5.11.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.10...crossbeam-channel-0.5.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-09 08:42:46 -08:00
dependabot[bot]
052eb39276 chore(deps): bump serde_yaml from 0.9.29 to 0.9.31
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.29 to 0.9.31.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.29...0.9.31)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-09 08:41:55 -08:00
dependabot[bot]
1033fe5e5e chore(deps): bump reqwest from 0.11.22 to 0.11.24
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.22 to 0.11.24.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.22...v0.11.24)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-09 08:41:43 -08:00
LGUG2Z
d4af033e8c fix(wm): store all logs in tempdir files 2024-01-19 15:54:14 -08:00
LGUG2Z
c8b8757594 fix(wm): add retries to socket connections 2024-01-19 15:53:45 -08:00
KamQb
21a5be0404 fix(component): fix ahk invocation by adding quotes around arguments
Fixes ahk launch uf user has spaces in arguments for ahk (ahk exe path or komorebi home directory)
2024-01-14 20:30:02 -08:00
LGUG2Z
7cb2965969 feat(cli): add asc path validation to check cmd 2024-01-14 15:41:07 -08:00
LGUG2Z
d6e83e1778 feat(cli): add last focused workspace cmd
This commit adds a new komorebic command, focus-last-workspace, which
switches to the last focused workspace on the focused monitor (if there
is one).
2024-01-11 18:51:41 -08:00
dependabot[bot]
8f30612220 chore(deps): bump sysinfo from 0.29.11 to 0.30.5
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.29.11 to 0.30.5.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 11:51:29 -08:00
LGUG2Z
f3e41490b2 fix(cli): typo in autostart generation 2024-01-08 11:09:17 -08:00
LGUG2Z
5a6dcef7ea fix(wm): update border colour on ws change
This commit ensures that the border colour is set appropriately for
monocle and stack containers after workspace switching operations.

fix #621
2024-01-08 10:22:13 -08:00
dependabot[bot]
0e96cd65b8 chore(deps): bump quote from 1.0.33 to 1.0.35
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.33 to 1.0.35.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.33...1.0.35)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-08 10:15:53 -08:00
LGUG2Z
025cb08b3e fix(wm): identify monitor dpi correctly
This commit uses a more reliable Win32 API call to determine the scaling
factor / DPI of user monitors, so that the scale of a window can be
correctly adjusted when moved between monitors with different DPI
settings.

fix #622
2024-01-06 14:30:11 -08:00
LGUG2Z
f9c69e51aa chore(funding): add kofi for paypal sponsors 2024-01-03 11:27:28 -08:00
dependabot[bot]
8a7c75b9a7 chore(deps): bump ctrlc from 3.4.1 to 3.4.2
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.4.1 to 3.4.2.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.4.1...3.4.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-03 09:25:24 -08:00
dependabot[bot]
ed3b053323 chore(deps): bump crossbeam-channel from 0.5.8 to 0.5.10
Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.8 to 0.5.10.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.8...crossbeam-channel-0.5.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-03 09:25:15 -08:00
LGUG2Z
a1a7e6c2bf docs(readme): add tech for palestine badge 2024-01-02 13:35:11 -08:00
LGUG2Z
b4ae043b9c feat(cli): add visible-windows cmd
This commit adds a new komorebic command, "visible-windows", to make
tracking down ghost windows easier. The returned JSON structure will try
to use the device id to identify a monitor if it is available, or fall
back to the monitor index. Thanks to raggi on Discord for suggesting
this command!
2024-01-02 10:37:22 -08:00
dependabot[bot]
d2a06a11ac chore(deps): bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-31 19:19:34 -08:00
dependabot[bot]
e6bf30b567 chore(deps): bump serde_yaml from 0.9.27 to 0.9.29
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.27 to 0.9.29.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.27...0.9.29)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-31 19:19:25 -08:00
dependabot[bot]
326d5bae42 chore(deps): bump proc-macro2 from 1.0.70 to 1.0.71
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.70 to 1.0.71.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.70...1.0.71)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-31 19:19:17 -08:00
dependabot[bot]
d23e3e7c51 chore(deps): bump crossbeam-utils from 0.8.17 to 0.8.18
Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) from 0.8.17 to 0.8.18.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.17...crossbeam-utils-0.8.18)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-31 19:19:10 -08:00
dependabot[bot]
0eeba6cd0e chore(deps): bump uds_windows from 1.0.2 to 1.1.0
Bumps [uds_windows](https://github.com/haraldh/rust_uds_windows) from 1.0.2 to 1.1.0.
- [Release notes](https://github.com/haraldh/rust_uds_windows/releases)
- [Changelog](https://github.com/haraldh/rust_uds_windows/blob/v1.1.0/CHANGELOG.md)
- [Commits](https://github.com/haraldh/rust_uds_windows/compare/v1.0.2...v1.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-24 15:00:20 -08:00
LGUG2Z
cf86b2cf98 refactor(windows-rs): use "wide" fns uniformly
This commit builds on @EBNull's comment shedding light on the uses of
the -A and -W functions in the Win32 API, and standardizes the calling
of the -W functions across the project.

Since UTF-16 String handling is a bit lacking in the Rust standard
library, I have pulled in the widestring crate to use the
from_slice_truncate fn to automagically remove all of the trailing null
chars when handling values returned from the various Win32 -W fns.

Comment ref: 657ac441ae (r135643553)
2023-12-23 16:46:30 -08:00
LGUG2Z
e221d96785 fix(wm): handle monitor index pref edge case
This commit handles an edge case where the first registered display
monitor has an index preference that is greater than the current length
of the Ring data structure storing the monitors.

re #612
2023-12-22 18:00:02 -08:00
LGUG2Z
d3bc78097c fix(wm): pass *const u8 to enum_display_devices
Thanks to @ids1024 for pointing out that the failing system calls were
likely due to optimizations being made with the release profile's
opt-level=3 and to @saethlin for pointing out that in the previous
commit I was returning a pointer to a temporary that was about to be
deallocated.

https://fosstodon.org/@ids1024/111627094548141620
https://hachyderm.io/@saethlin/111627135615930244

With this commit, the display ids are now successfully returned from
calls to EnumDisplayDevicesA on release builds.
2023-12-22 17:44:44 -08:00
LGUG2Z
657ac441ae feat(wm): use device id for monitor index pref
This commit begins to build on some of the knowledge shared by EBNull in
allowing users to specify monitor index preferences using physical
device identifiers. This does not presently go all the way to EDIDs, but
the display model and what I believe is a port identifier on the display
adapter(s) can be used to uniquely identify a display in most use cases.

However, I believe I may have unfortunately run into a bug in either
windows-rs or Rust itself, as when the code calling EnumDisplayDevices
is called, it always fails when running a release build, and always
succeeds when running a debug build. This needs to be investigated
further.

re #612
2023-12-22 17:01:59 -08:00
dependabot[bot]
0696a00bd3 chore(deps): bump unsafe-libyaml from 0.2.9 to 0.2.10
Bumps [unsafe-libyaml](https://github.com/dtolnay/unsafe-libyaml) from 0.2.9 to 0.2.10.
- [Release notes](https://github.com/dtolnay/unsafe-libyaml/releases)
- [Commits](https://github.com/dtolnay/unsafe-libyaml/compare/0.2.9...0.2.10)

---
updated-dependencies:
- dependency-name: unsafe-libyaml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-21 23:26:46 -05:00
dependabot[bot]
5111dbdfb9 chore(deps): bump crossbeam-utils from 0.8.16 to 0.8.17
Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) from 0.8.16 to 0.8.17.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.16...crossbeam-utils-0.8.17)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-21 23:26:34 -05:00
dependabot[bot]
dd12f0fc8a chore(deps): bump thiserror from 1.0.50 to 1.0.51
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.50 to 1.0.51.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.50...1.0.51)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-21 23:26:20 -05:00
dependabot[bot]
76a8695218 chore(deps): bump clap from 4.4.10 to 4.4.11
Bumps [clap](https://github.com/clap-rs/clap) from 4.4.10 to 4.4.11.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.4.10...v4.4.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-12 15:49:57 -08:00
LGUG2Z
ddfcf8b76f feat(config): add rudimentary config syntax checks
This commit attempts to introduce miette to provide users with quick
feedback when there may be syntax errors such as trailing commas in
their komorebi.json configuration file.

The lines and columns reported by serde_json don't actually line up with
the visualization of where we want to indicate a syntax error on the
miette Report. Some hackery has been done, but this should be improved
upon. Notably, this hackery does not accurately reflect the location of
a syntax error when the syntax error is a missing comma after a string
value.
2023-12-03 12:56:40 -08:00
LGUG2Z
d9eea34266 chore(just): update justfile 2023-12-03 09:06:35 -08:00
Amr Bashir
7078b065f4 feat(cli): make --config optional for enable-autostart (#596)
* feat(cli): make `--config` optional for `enable-autostart`

* actually make it optional

* remove unnecessary `action` attribute
2023-12-03 09:00:27 -08:00
Amr Bashir
900051a24b feat(cli): add --no-console to autostart without a console window (#598)
* feat(cli): autostart without a console window

This moves `komorebic` logic into a `lib.rs` file and calls it from `main.rs` (normal behavior) and then there is a second binary `komorebic-no-console` binary that uses `#![windows_subsystem = "windows"]` which tells the linker to not attach a console window to this binary.

* Revert "feat(cli): autostart without a console window"

This reverts commit 08494b46dd.

* feat(cli): autostart without a console window

This creates a second binary `komorebic-no-console` binary that uses `#![windows_subsystem = "windows"]` which tells the linker to not attach a console window to this binary and its only job is to run and pass its args to `komorebic`.

* add behind `--no-console` flag

* reference the new binary in wix

* remove no-console

* fix typo
2023-12-03 09:00:04 -08:00
LGUG2Z
1c589491a9 refactor(clippy): apply various lint fixes 2023-12-02 13:47:49 -08:00
LGUG2Z
5a99a688a6 feat(asc): add json schema cmd and output
This commit adds a command to output a JSON Schema for the
applications.yaml file maintained in the
komorebi-application-specific-configuration repo, and also adds an
up-to-date version of the JSON Schema as a file in the root of this
repository so that users can reference it as an autocompletion source.
2023-12-02 13:42:23 -08:00
LGUG2Z
8980e3b16e feat(config): make static config flag optional
This commit makes the --config flag on komorebi.exe optional, and
updates the configuration loading logic to try to find a komorebi.json
file in the HOME_DIR, which is either $Env:KOMOREBI_CONFIG_HOME or
$Env:PROFILE.

This unlocks the way for Amr's PR to make the --config flag optional on
the enable-autostart command.

re #596
2023-12-02 13:27:48 -08:00
LGUG2Z
ca9eccf247 chore(deps): cargo update 2023-12-02 09:17:37 -08:00
LGUG2Z
e04ba0e033 feat(win32): set foregroundlocktimeout explicitly
After another round of deep diving to find a workaround to all of the
mechanisms within Windows that prevent a process from changing the
focused window, I came across this gist which I saw setting
SPI_SETFOREGROUNDLOCKTIMEOUT to 0:
https://gist.github.com/EBNull/1419093

This tentatively seems like it works and it removes the need for the
alt_focus_hack setting.

However, according to this StackOverflow discussion, it seems like on
Win10+ changes to ForegroundLockTimeout in the registry are no longer
respected and changes made via SPI_SETFOREGROUNDLOCKTIMEOUT are not
persisted:
https://stackoverflow.com/questions/73735129/setforegroundwindow-relationship-between-the-foregroundlocktimeout-registry-val

Therefore on starting, komorebi will now check the value with
SPI_GETFOREGROUNDLOCKTIMEOUT and if it is not 0, it will be set to 0.

Logging has been added to inform the user of the changes that are
happening.
2023-12-01 16:21:34 -08:00
LGUG2Z
8afad7246f fix(config): make win32 calls for windows ffm
This commit ensures that the required calls are made to the system to
enable and disable the Windows focus-follows-mouse implementation when
users make changes to the focus_follows_mouse option in the static
config file.

fix #603
2023-11-29 21:44:44 -08:00
dependabot[bot]
8e9d63cd36 chore(deps): bump proc-macro2 from 1.0.69 to 1.0.70
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.69 to 1.0.70.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.69...1.0.70)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 17:59:04 -08:00
dependabot[bot]
a673c69744 chore(deps): bump sysinfo from 0.29.10 to 0.29.11
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.29.10 to 0.29.11.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 17:58:55 -08:00
dependabot[bot]
c0b65677a2 chore(deps): bump serde from 1.0.192 to 1.0.193
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.192 to 1.0.193.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.192...v1.0.193)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 17:58:45 -08:00
dependabot[bot]
0cf7147e39 chore(deps): bump openssl from 0.10.59 to 0.10.60
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.59 to 0.10.60.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.59...openssl-v0.10.60)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 17:31:19 -08:00
amrbashir
b39e65642b refactor(rust): cleanup path handling
- Avoids unnecessary string allocation when tracing paths
- Replaces `mut path & path.push()` with `path.join()`
- Avoids unncessary cloning of paths where applicable
- Use `dunce` crate to remove `UNC` prefix
- Improve performance of resolving `~` by avoiding unnecessary string allocations
- Resolve `~`, `$Env:USERPROFILE` and `$HOME` consistenly between different code paths
- Use `PathBuf` instead of `String` for paths in CLI args

I may have missed a couple of places but I think I covered 90% of path handling in the codebase
2023-11-26 15:25:43 -08:00
LGUG2Z
a68f3843b7 feat(cli): add ffm flag to enable-autostart
The user dumbhighrank mentioned on Discord that it was not possible to
call enable-autostart with the --ffm flag, as one might expect to be
able to do, given that it is accepted by the start command. This commit
introduces the --ffm flag for the enable-autostart command.
2023-11-24 14:40:51 -08:00
dependabot[bot]
b3e989c6c7 chore(deps): bump winreg from 0.51.0 to 0.52.0
Bumps [winreg](https://github.com/gentoo90/winreg-rs) from 0.51.0 to 0.52.0.
- [Release notes](https://github.com/gentoo90/winreg-rs/releases)
- [Changelog](https://github.com/gentoo90/winreg-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gentoo90/winreg-rs/compare/v0.51.0...v0.52.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-22 21:39:52 -08:00
dependabot[bot]
4534a1511e chore(deps): bump tracing-appender from 0.2.2 to 0.2.3
Bumps [tracing-appender](https://github.com/tokio-rs/tracing) from 0.2.2 to 0.2.3.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-appender-0.2.2...tracing-appender-0.2.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-22 21:39:44 -08:00
dependabot[bot]
1f87e3acd2 chore(deps): bump tracing-subscriber from 0.3.17 to 0.3.18
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.3.17 to 0.3.18.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.17...tracing-subscriber-0.3.18)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-22 21:39:34 -08:00
LGUG2Z
f67d0c7b9b docs(readme): update donations with link to pcrf 2023-11-22 21:36:49 -08:00
LGUG2Z
aa0277d58c feat(cli): add quickstart cmd
This commit adds a new komorebic quickstart command to handle the
downloading of example configuration files, which is currently done
manually by the user if they are following the quickstart guide on the
README.

re #585
2023-11-19 17:40:51 -08:00
LGUG2Z
42ac13e0bd feat(config): autopopulate matcher for exes
This commit updates the fmt-asc command to automatically populate unset
matching strategies for Exe matching rules to be "Equals"
2023-11-17 17:56:28 -08:00
LGUG2Z
2a1d87d41b fix(cli): pick up static cfg in check cmd 2023-11-16 15:12:08 -08:00
LGUG2Z
0d1595e543 feat(cli): add focused ws padding cmds
This commit adds dedicated komorebic commands for setting the padding
values of the focused workspace and containers.

re #570
2023-11-16 15:05:14 -08:00
LGUG2Z
4283dfb0ba chore(deps): bump windows crates from 0.51 to 0.52 2023-11-16 14:40:27 -08:00
dependabot[bot]
2a6aa09b07 chore(deps): bump schemars from 0.8.15 to 0.8.16
Bumps [schemars](https://github.com/GREsau/schemars) from 0.8.15 to 0.8.16.
- [Release notes](https://github.com/GREsau/schemars/releases)
- [Changelog](https://github.com/GREsau/schemars/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GREsau/schemars/compare/v0.8.15...v0.8.16)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-13 08:15:48 -08:00
LGUG2Z
8c6bd13511 fix(ahk): override derive-ahk output for stop cmd
This commit adds a last-second override the string output of the
derive-ahk proc macro for the stop command, which unfortunately ends up
in a broken state in komorebic.lib.ahk with the addition of a 'whkd'
flag in v0.1.19.

fix #578
2023-11-12 18:20:12 -08:00
LGUG2Z
ef61239580 chore(release): v0.1.19 2023-11-10 16:23:53 -08:00
LGUG2Z
96bf37b98d fix(config): disable tiling for ws without layouts
This commit ensures that when a layout or a custom layout is not defined
for a workspace in the static configuration file, Workspace.tile will be
set to false. Thanks to M. Kichel on Discord for pointing out the need
for this!
2023-11-10 12:47:21 -08:00
LGUG2Z
5fd90d222d fix(docs): quote $env:userprofile in quickstart to handle spaces 2023-11-08 07:58:25 -08:00
dependabot[bot]
6ffdc1e90e chore(deps): bump which from 4.4.2 to 5.0.0
Bumps [which](https://github.com/harryfei/which-rs) from 4.4.2 to 5.0.0.
- [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/harryfei/which-rs/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 11:11:35 -08:00
LGUG2Z
2595fa601f fix(config): typo in layered app id loading 2023-11-04 12:08:36 -07:00
LGUG2Z
41cd5ec222 chore(deps): cargo update 2023-11-03 09:46:37 -07:00
dependabot[bot]
e75ab17602 chore(deps): bump serde from 1.0.188 to 1.0.190
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.188 to 1.0.190.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.188...v1.0.190)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-03 09:29:18 -07:00
dependabot[bot]
79dfa45ec4 chore(deps): bump clap from 4.4.6 to 4.4.7
Bumps [clap](https://github.com/clap-rs/clap) from 4.4.6 to 4.4.7.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.4.6...v4.4.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-03 09:29:09 -07:00
dependabot[bot]
8771aab3f3 chore(deps): bump quote from 1.0.30 to 1.0.33 (#573)
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.30 to 1.0.33.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.30...1.0.33)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-03 09:28:47 -07:00
LGUG2Z
f659deb5e3 fix(wm): correct border overflow handling logic
This commit fixes a regression introduced in the regex rule matching
refactor.

Invisible borders should be removed from applications that are not
identified as border overflow applications, not vice versa.

This is because applications that are overflowing their borders
effectively erase the invisible borders, while applications that are not
overflowing their borders leave the system's invisible borders
visibility intact.

It is this latter group that we should be targeting with the
should_remove_border variable.
2023-11-03 09:24:43 -07:00
Kushashwa Ravi Shrimali
e9fb9297e9 feat(cli): add cycle-layout command (#556)
* Command to ToggleLayout

* Just improve logic of figuring out next layout

* Addr review: rename to "Cycle" instead of toggle, and add a small comment

* As per review comments, implement cycle method on DefaultLayout

* I forgot to remove this, my bad

* feat(cli): fixups for cycle-layout cmd

* Update komorebic/src/main.rs

Co-authored-by: Kushashwa Ravi Shrimali <kushashwaravishrimali@gmail.com>

---------

Co-authored-by: LGUG2Z <jadeiqbal@fastmail.com>
Co-authored-by: جاد <LGUG2Z@users.noreply.github.com>
2023-10-26 21:19:24 -07:00
جاد
557d1962a7 Merge pull request #565 from LGUG2Z/dependabot/cargo/proc-macro2-1.0.69
chore(deps): bump proc-macro2 from 1.0.64 to 1.0.69
2023-10-26 16:00:56 -07:00
جاد
d7991d2087 Merge pull request #566 from LGUG2Z/dependabot/cargo/serde_json-1.0.107
chore(deps): bump serde_json from 1.0.103 to 1.0.107
2023-10-26 15:58:33 -07:00
جاد
5606f1c5c4 Merge pull request #567 from LGUG2Z/dependabot/cargo/ctrlc-3.4.1
chore(deps): bump ctrlc from 3.4.0 to 3.4.1
2023-10-26 15:58:17 -07:00
dependabot[bot]
41a627e7dd chore(deps): bump ctrlc from 3.4.0 to 3.4.1
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.4.0...3.4.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 14:25:46 +00:00
dependabot[bot]
2b49ade205 chore(deps): bump serde_json from 1.0.103 to 1.0.107
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.103 to 1.0.107.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.103...v1.0.107)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 14:25:38 +00:00
dependabot[bot]
a0bebc7be8 chore(deps): bump proc-macro2 from 1.0.64 to 1.0.69
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.64 to 1.0.69.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.64...1.0.69)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 14:25:29 +00:00
جاد
038256de6b fix(docs): typo whkrc -> whkdrc 2023-10-22 17:34:56 -07:00
sitiom
8c30b894fe ci(winget): change Winget Releaser job to ubuntu-latest (#518) 2023-10-22 10:58:33 -07:00
LGUG2Z
fce86397a5 feat(cli): add autostart commands
This commit introduce two new commands, enable-autostart and
disable-autostart, to help create shortcuts for users in shell:startup
to automatically start komorebi after logging in.
2023-10-22 10:57:05 -07:00
dependabot[bot]
f55b10caa0 chore(deps): bump sysinfo from 0.29.9 to 0.29.10 (#561)
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.29.9 to 0.29.10.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-20 08:24:45 -07:00
dependabot[bot]
ce9d23e72e chore(deps): bump tracing from 0.1.37 to 0.1.39 (#562)
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.37 to 0.1.39.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.37...tracing-0.1.39)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-20 08:24:33 -07:00
dependabot[bot]
d79e54fad8 chore(deps): bump rustix from 0.37.23 to 0.37.25 (#563)
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.37.23 to 0.37.25.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.37.23...v0.37.25)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-20 08:10:44 -07:00
dependabot[bot]
a15c769bfc chore(deps): bump reqwest from 0.11.18 to 0.11.22 (#559)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.18 to 0.11.22.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.18...v0.11.22)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 08:58:59 -07:00
dependabot[bot]
89aa0387d7 chore(deps): bump winreg from 0.50.0 to 0.51.0 (#558)
Bumps [winreg](https://github.com/gentoo90/winreg-rs) from 0.50.0 to 0.51.0.
- [Release notes](https://github.com/gentoo90/winreg-rs/releases)
- [Changelog](https://github.com/gentoo90/winreg-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gentoo90/winreg-rs/compare/v0.50.0...v0.51.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 08:20:04 -07:00
LGUG2Z
1e23a11b94 docs(readme): update badges 2023-10-08 11:11:03 -07:00
Artemiy
e5a8146927 feat(wm): ultrawide layout resizing (#545)
* Allow different resize constraints for layouts

Change Workspace::enforce_resize_constraints to enforce constraints differently for different layouts
Add enforce_no_resize method for all but bsp layout resize_dimensions

* Add resize constraints for UltrawideVerticalStack layout

Add Workspace::enforce_resize_for_ultrawide method to apply resize
constraints for ultrawide vertical stack layout.

* feat(wm): Use resize_dimensions in calculate for ultrawide layout

Add function calculate_ultrawide_adjustment to calculate adjustments for
individual containers in ultrawide vertical stack layout
Refactor ultrawide layout generation in separate function and use
calculated adjustments

* feat(wm): Enable ultrawide layout in DefaultLayout::resize

* feat(wm): refactor ultrawide resize calculation

Add some helper function and descriptive variable names in calculate_ultrawide_adjustment
Apply clippy lints
2023-10-06 17:33:37 -07:00
LGUG2Z
b048e7c3aa feat(rules): implement all matching strategies
This commit ensures that matching strategies can be used wherever
IdWithIdentifier is used, and that they are respected for users opting
to use the static configuration file format.

Some thought and planning needs to go into how this can be backported to
dynamic configurations via the CLI without breaking existing user
configurations.

re #60
2023-10-06 12:14:58 -07:00
dependabot[bot]
3ff3961381 chore(deps): bump clap from 4.4.2 to 4.4.6
Bumps [clap](https://github.com/clap-rs/clap) from 4.4.2 to 4.4.6.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.4.2...v4.4.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 08:10:15 -07:00
LGUG2Z
0797316ee6 feat(rules): add explicit matching strategies
This commit is the first in a series of commits which will pave the way
for regex rule matching support in komorebi.

For now, in order to maintain backwards compat and not break anything,
all rules without a matching strategy will get assigned as using the
"Legacy" strategy.

This and the "Equals" strategy are the only two which have been
implemented so far.

There should not be any breaking changes in this commit, not any
functionality lost for users with pre-existing configurations.

re #60
2023-09-22 15:05:20 -07:00
LGUG2Z
57cc02f083 fix(config): align border opts in st/dyn configs
This commit aligns the border option naming and arguments between the
dynamic and static configuration approaches.

The previously named border_width and border_offset options in the
static config will be replaced by active_window_border_width and
active_window_border_offset in v0.1.19.

Similarly the option for the offset will now take a single signed
integer, as it does when using the komorebic command.

re #526
2023-09-21 12:32:30 -07:00
LGUG2Z
45912745d6 chore(deps): bump windows crates from 0.48 to 0.51 2023-09-12 09:55:09 -07:00
dependabot[bot]
0088ca8cdb chore(deps): bump serde from 1.0.185 to 1.0.188
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.185 to 1.0.188.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.185...v1.0.188)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 16:36:59 -07:00
dependabot[bot]
6c912b660e chore(deps): bump clap from 4.3.19 to 4.4.2
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.19 to 4.4.2.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.3.19...v4.4.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 16:36:50 -07:00
dependabot[bot]
f02b7229fd chore(deps): bump serde_yaml from 0.9.23 to 0.9.25
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.23 to 0.9.25.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.23...0.9.25)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 16:36:41 -07:00
LGUG2Z
ffaab771f3 fix(cli): remedy regression in start cmd
This commit remedies a regression noticed by user @notkvwu in #493,
which results in 'komorebic start' failing, due to an empty ArgumentList
being passed to the PS Start-Process command.

This has been fixed by ensuring that the ArgumentList is only passed
when the user has specified flags on the start command.

fix #493
2023-09-11 13:33:11 -07:00
LGUG2Z
710a8d76ea feat(cli): add ahk flag to static config start cmd
This commit introduces a new --ahk flag to the start command, which
works similarly to the --whkd, and attempts to load an ahk key binding
configuration script on startup.

The attempt is made from within the komorebic process, rather than the
komorebi process.

resolve #529
2023-09-11 11:26:35 -07:00
dependabot[bot]
09792a7924 chore(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-10 15:13:05 -07:00
dependabot[bot]
c1061dd3be chore(deps): bump serde from 1.0.179 to 1.0.185
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.179 to 1.0.185.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.179...v1.0.185)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-10 15:09:46 -07:00
dependabot[bot]
f8a096090f chore(deps): bump quote from 1.0.29 to 1.0.30
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.29 to 1.0.30.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.29...1.0.30)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-10 15:09:39 -07:00
dependabot[bot]
e4ccd45176 chore(deps): bump sysinfo from 0.29.7 to 0.29.9
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.29.7 to 0.29.9.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-10 15:09:31 -07:00
LGUG2Z
f4e0fb9469 feat(cli): add opt to stop whkd alongside wm
This commit adds a '--whkd' flag to the 'komorebic stop' command, which
will also stop any running instance of whkd when stopping the window
manager.

This flag defaults to false, and should not change the existing
behaviour that users are used to.
2023-09-09 22:02:44 -07:00
LGUG2Z
d8892f3ff2 feat(config): add monitor index prefs to static
This commit adds an "monitor_index_preferences" key to the static config
schema, which was missed during the initial rollout of the static
configuration files. To help with testing, these indexes have also been
exposed on the State struct.

resolve #522
2023-09-01 08:59:22 -07:00
dependabot[bot]
fec56b1971 chore(deps): bump clap from 4.3.12 to 4.3.19
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.12 to 4.3.19.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.3.12...v4.3.19)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-10 10:54:43 -07:00
dependabot[bot]
15aedf1ead chore(deps): bump serde from 1.0.171 to 1.0.179
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.171 to 1.0.179.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.171...v1.0.179)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-10 10:54:31 -07:00
dependabot[bot]
86ed7e1297 chore(deps): bump sysinfo from 0.29.4 to 0.29.7
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.29.4 to 0.29.7.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-10 10:54:17 -07:00
p1scescom
c132665ac7 fix 2023-08-02 18:22:37 +09:00
Matt Blacker
cfe4062369 fix(config): gen border colours only if set 2023-07-19 08:10:42 -07:00
Matt Blacker
acf201d9bc feat(config): border colours in static config gen 2023-07-19 08:09:16 -07:00
dependabot[bot]
fa4d14799e chore(deps): bump paste from 1.0.13 to 1.0.14
Bumps [paste](https://github.com/dtolnay/paste) from 1.0.13 to 1.0.14.
- [Release notes](https://github.com/dtolnay/paste/releases)
- [Commits](https://github.com/dtolnay/paste/compare/1.0.13...1.0.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 18:10:16 -07:00
dependabot[bot]
6979f4e699 chore(deps): bump serde_json from 1.0.102 to 1.0.103
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.102 to 1.0.103.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.102...v1.0.103)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 18:10:07 -07:00
dependabot[bot]
d3585ad720 chore(deps): bump serde_yaml from 0.9.22 to 0.9.23
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.22 to 0.9.23.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.22...0.9.23)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 18:09:58 -07:00
LGUG2Z
e240bc7706 docs(readme): add static conf migration tutorial video 2023-07-15 16:19:45 -07:00
LGUG2Z
0ed732d085 chore(release): v0.1.18 2023-07-14 14:58:58 -07:00
Johnny Nguyen
fa11594103 fix(cli): support for spaces in config path 2023-07-14 14:57:29 -07:00
LGUG2Z
88aaf1f368 docs(readme): add new quickstart video 2023-07-14 11:27:32 -07:00
LGUG2Z
c5bf62fac0 docs(readme): add note on enabling long paths 2023-07-14 11:04:53 -07:00
LGUG2Z
528a0bf9ff docs(readme): fix typo in quickstart 2023-07-14 09:06:58 -07:00
LGUG2Z
f73d1bf0da chore(release): v0.1.17 2023-07-13 08:58:38 -07:00
LGUG2Z
4510cccc3e feat(config): add static json loader and whkd flag
This commit is an implementation of a static JSON configuration loader.

An example komorebi.json configuration file has been added.

The application-specific configurations can be loaded directly from a
file, and workspace configuration can be defined declaratively in the
JSON. Individual rules etc. can also be added directly in the static
configuration as one-offs.

A JSONSchema can be generated using komorebic's static-config-schema
command. This should be added to something like SchemaStore later.

Loading from static configuration is significantly faster on startup, as
the lock does not have to be reacquired for every command that is sent
over the socket.

When loading configuration from a static JSON file, a hotwatch instance
will automatically be created to listen to file changes and apply any
updates to both the global and window manager configuration state.

A new --whkd flag has been added to the komorebic start command to
optionally start whkd in a background process.

A new komorebic command 'generate-static-config' has been added to help
existing users migrate to a static JSON config file. Currently, custom
layout file path information can not be automatically populated in the
output of this command and must be added manually by the user if
required.

A new komorebic command 'fetch-asc' has been added to help users update
to the latest version of the application-specific configurations
in-place.

resolve #427
2023-07-13 08:12:43 -07:00
dependabot[bot]
b5035fbb5d chore(deps): bump sysinfo from 0.29.2 to 0.29.4
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.29.2 to 0.29.4.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-11 08:57:24 -07:00
dependabot[bot]
1a703690c9 chore(deps): bump serde_yaml from 0.9.21 to 0.9.22
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.21 to 0.9.22.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.21...0.9.22)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-11 08:57:14 -07:00
dependabot[bot]
039f69b70b chore(deps): bump clap from 4.3.8 to 4.3.11
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.8 to 4.3.11.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.3.8...v4.3.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-11 08:57:02 -07:00
LGUG2Z
f7dccfe0f5 fix(wm): lars' secret sauce for min-width apps
This commit applies a technique shared by Lars from GlazeWM and first
noticed by J.SH on Discord to add the SWP_NOSENDCHANGING flag when
positioning windows to overcome any hard-coded minimum width
restrictions an application might have.
2023-07-09 19:44:44 -07:00
dependabot[bot]
fc7198823b chore(deps): bump quote from 1.0.28 to 1.0.29
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.28 to 1.0.29.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.28...1.0.29)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-06 18:14:41 -07:00
dependabot[bot]
c3637665e9 chore(deps): bump serde from 1.0.164 to 1.0.165
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.164 to 1.0.165.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.164...v1.0.165)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-06 18:14:30 -07:00
dependabot[bot]
45046a0e1e chore(deps): bump net2 from 0.2.38 to 0.2.39
Bumps [net2](https://github.com/deprecrated/net2-rs) from 0.2.38 to 0.2.39.
- [Commits](https://github.com/deprecrated/net2-rs/compare/0.2.38...0.2.39)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-06 18:14:20 -07:00
Mitsuhiro Tanda
63dee21257 fix(wm): refer AHK_EXE 2023-07-06 18:14:02 -07:00
LGUG2Z
2675f747bb fix(wm): apply custom layouts when containers >= columns
Thanks to @thesobercoder and @olivoil for opening my eyes on this one.

This commit reduces the number of containers required before a custom
layout can be triggered. Please see the closed issue for more discussion
and rationale behind this change.

fix #390
2023-07-01 11:32:52 -07:00
dependabot[bot]
5b9730823e chore(deps): bump strum from 0.24.1 to 0.25.0
Bumps [strum](https://github.com/Peternator7/strum) from 0.24.1 to 0.25.0.
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 11:39:42 -07:00
dependabot[bot]
84da706d64 chore(deps): bump proc-macro2 from 1.0.59 to 1.0.63
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.59 to 1.0.63.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.59...1.0.63)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 11:39:16 -07:00
dependabot[bot]
cf7a01695e chore(deps): bump clap from 4.3.4 to 4.3.8
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.4 to 4.3.8.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.3.4...v4.3.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 11:39:03 -07:00
Yusuf007R
510650cb94 refactor(wm): renaming SwapWorkspacesToMonitor to SwapWorkspacesWithMonitor 2023-06-24 07:04:07 -07:00
Yusuf007R
6fe2290d74 feat(swap-workspaces-monitor): command to swap focused monitor workspaces with another monitor
Basically this commit adds a command that allows you to swap two monitors, well it actually swaps
the workspaces between the monitors.
2023-06-24 07:04:07 -07:00
dependabot[bot]
647f5b7ded chore(deps): bump sysinfo from 0.29.0 to 0.29.2
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.29.0 to 0.29.2.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-22 08:51:22 -07:00
dependabot[bot]
933122b073 chore(deps): bump serde from 1.0.163 to 1.0.164
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.163 to 1.0.164.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.163...v1.0.164)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-22 08:51:09 -07:00
dependabot[bot]
9b62d5408d chore(deps): bump clap from 4.3.1 to 4.3.4
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.1 to 4.3.4.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.3.1...v4.3.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-22 08:50:58 -07:00
LGUG2Z
087b08612d feat(wm): allow f32 width % for custom layouts
This commit allows users to provide an f32 value for the WidthPercentage
on the primary column of a custom layout.
2023-06-22 08:49:47 -07:00
LGUG2Z
c4be0636f7 fix(wm): update border on cycle-move
This commit ensures that the active window border is updated when the
cycle-move command is called.

fix #467
2023-06-14 07:49:47 -07:00
LGUG2Z
6df91d7d40 fix(wm): manually close process handles
ZiN on Discord noted that handles returned by OpenProcess must be closed
manually (this is not implemented in the Drop trait for handle, it
seems)

https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-openprocess#remarks
2023-06-12 16:47:12 -07:00
dependabot[bot]
b0737ff603 chore(deps): bump quote from 1.0.27 to 1.0.28
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.27 to 1.0.28.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.27...1.0.28)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-08 08:39:50 -07:00
dependabot[bot]
8ff0963203 chore(deps): bump clap from 4.3.0 to 4.3.1
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.3.0...clap_complete-v4.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-08 08:39:42 -07:00
dependabot[bot]
ce326f31bc chore(deps): bump ctrlc from 3.3.1 to 3.4.0
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.3.1...3.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-08 08:39:15 -07:00
LGUG2Z
2050d9a3fa fix(wm): add permaignore_classes for electron jank 2023-06-05 09:58:37 -07:00
LGUG2Z
8e47bfdba6 fix(wm): allow any id to override a float rule 2023-06-05 08:45:55 -07:00
LGUG2Z
9103ce2b2b feat(wm): add focus-workspaces cmd
This commit adds a new command, focus-workspaces, to allow the user to
change workspaces across all monitors at the same time. I'm not
convinced of the stability of this command and I would strongly
discourage using komorebi in this manner.

resolve #426
2023-06-03 17:30:43 -07:00
dependabot[bot]
7ba7067c96 chore(deps): bump proc-macro2 from 1.0.57 to 1.0.59
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.57 to 1.0.59.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.57...1.0.59)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 07:00:19 -07:00
dependabot[bot]
a51f2387aa chore(deps): bump bitflags from 2.2.1 to 2.3.1
Bumps [bitflags](https://github.com/bitflags/bitflags) from 2.2.1 to 2.3.1.
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/2.2.1...2.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 07:00:07 -07:00
dependabot[bot]
e4189c19ce chore(deps): bump clap from 4.2.7 to 4.3.0
Bumps [clap](https://github.com/clap-rs/clap) from 4.2.7 to 4.3.0.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.2.7...clap_complete-v4.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 06:59:56 -07:00
dependabot[bot]
1a2be3bc02 chore(deps): bump ctrlc from 3.2.5 to 3.3.1
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.2.5 to 3.3.1.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.2.5...3.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-29 08:14:43 -07:00
LGUG2Z
c37ba42825 feat(wm): reintroduce remove-title-bar cmds
This commit reintroduces some old code from the feature/remove-titlebars
branch. This feature is very unstable and it is strongly advised that
nobody actually uses it. Wherever possible, please use the "remove
titlebar" functionality provided directly within an application.
2023-05-15 13:49:45 -07:00
dependabot[bot]
d0c081feae chore(deps): bump proc-macro2 from 1.0.56 to 1.0.57
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.56 to 1.0.57.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.56...1.0.57)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-15 08:54:00 -07:00
dependabot[bot]
0027c7d1de chore(deps): bump serde from 1.0.162 to 1.0.163
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.162 to 1.0.163.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.162...v1.0.163)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-15 08:53:43 -07:00
LGUG2Z
096729c2bd chore(release): v0.1.16 2023-05-08 08:58:16 -07:00
LGUG2Z
de5efd9b35 docs(asc): update generated rules 2023-05-08 08:56:39 -07:00
dependabot[bot]
294c14e6a6 chore(deps): bump sysinfo from 0.28.4 to 0.29.0
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.28.4 to 0.29.0.
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-08 08:48:24 -07:00
dependabot[bot]
4d26cdee32 chore(deps): bump serde from 1.0.160 to 1.0.162
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.160 to 1.0.162.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.160...1.0.162)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-08 08:48:10 -07:00
dependabot[bot]
6748d7e4a9 chore(deps): bump clap from 4.2.5 to 4.2.7
Bumps [clap](https://github.com/clap-rs/clap) from 4.2.5 to 4.2.7.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.2.5...v4.2.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-08 08:47:58 -07:00
dependabot[bot]
7f350341bb chore(deps): bump clap from 4.2.4 to 4.2.5
Bumps [clap](https://github.com/clap-rs/clap) from 4.2.4 to 4.2.5.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.2.4...v4.2.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 10:31:56 -07:00
dependabot[bot]
33dcadfce3 chore(deps): bump dirs from 5.0.0 to 5.0.1
Bumps [dirs](https://github.com/soc/dirs-rs) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/soc/dirs-rs/releases)
- [Commits](https://github.com/soc/dirs-rs/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 10:31:42 -07:00
dependabot[bot]
52236679a5 chore(deps): bump bitflags from 1.3.2 to 2.2.1
Bumps [bitflags](https://github.com/bitflags/bitflags) from 1.3.2 to 2.2.1.
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/1.3.2...2.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 06:08:39 -07:00
LGUG2Z
9431bac4ad docs(readme): add section on using ahk 2023-04-30 13:06:45 -07:00
LGUG2Z
e4a9719f4f feat(ahk): add sample v2 configuration file 2023-04-30 13:06:45 -07:00
LGUG2Z
e044a5a16f fix(ahk): implement syntax corrections by @sitiom
This commit implements the suggestions made by @sitiom on Discord:
https://discord.com/channels/898554690126630914/898554690608967786/1097403455267667968

re #324
2023-04-30 13:06:45 -07:00
LGUG2Z
60d3ecd8aa feat(ahk): update cfgen, reintroduce ahk files
This commit updates the config generator used by the ahk-asc command to
emit AHKv2 syntax.

An AHKv2 syntax-compatible komorebic.lib.ahk has been (re)introduced to
the repo root as a file to be distributed. This file is created by
taking the AHKv1 syntax output of ahk-library and automatically
converting it to AHKv2 using the automatic script converter by @mmikeww
available on GitHub.

Given that ahk-library is still being used to emit AHKv1 syntax in this
pipeline, it will remain in the repo.

The justfile has been updated to automate as much of this as possible
(the converter still needs to be run manually).

re #324
2023-04-30 13:06:45 -07:00
Alvin Truong
27e0758089 feat(workspace-rules): add InitialWorkspaceRule and InitialNamedWorkspaceRule command
- Added the two new commands to prevent breaking changes due to AHK
  users.
2023-04-30 12:40:01 -07:00
Alvin Truong
7d1aef8203 refactor(workspace_rules): reduce code duplication 2023-04-30 12:40:01 -07:00
Alvin Truong
b273617f44 style: cargo +nightly fmt --all 2023-04-30 12:40:01 -07:00
Alvin Truong
4306a7bafe feat(workspace-rule): add ability to only apply workspace rule on first
show of app
2023-04-30 12:40:01 -07:00
LGUG2Z
b647fdf01a feat(cli): add check command for useful info
This commit adds a new komorebic command, check, to output useful
information that will aid in understanding unexpected behaviour reported
by users.
2023-04-28 17:43:27 -07:00
LGUG2Z
9f16cb91a9 docs(readme): embed more tutorial videos 2023-04-26 11:53:22 -07:00
LGUG2Z
2520c4abe1 feat(wm): add border colour for monocle
This commit adds a new WindowKind to allow the user to set a unique
colour to identify when a window container in monocle mode is active.

resolve #404
2023-04-24 13:08:29 -07:00
dependabot[bot]
d32661ec2d chore(deps): bump tracing-subscriber from 0.3.16 to 0.3.17
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.3.16 to 0.3.17.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.16...tracing-subscriber-0.3.17)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-24 08:20:03 -07:00
dependabot[bot]
9df99f28cf chore(deps): bump clap from 4.2.2 to 4.2.4
Bumps [clap](https://github.com/clap-rs/clap) from 4.2.2 to 4.2.4.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.2.2...v4.2.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-24 08:19:44 -07:00
جاد
7327bb9a70 docs(readme): add link to quickstart video on youtube 2023-04-20 12:28:28 -07:00
dependabot[bot]
b9a9d20c66 chore(deps): bump dirs from 4.0.0 to 5.0.0
Bumps [dirs](https://github.com/soc/dirs-rs) from 4.0.0 to 5.0.0.
- [Release notes](https://github.com/soc/dirs-rs/releases)
- [Commits](https://github.com/soc/dirs-rs/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-17 08:44:42 -07:00
Alex Rumak
f89224c5d4 Fix default whkd configuration file
The whkd process does not start with an s - unless something is wrong or buggy on my computer, it is just "whkd.exe" and so it should be that in this file as well.
2023-04-16 13:19:24 -07:00
LGUG2Z
e68cf6fa91 chore(deps): bump windows crates from 0.44 to 0.48 2023-04-15 21:47:37 -07:00
LGUG2Z
b50326ed27 chore(deps): cargo update 2023-04-15 21:28:06 -07:00
LGUG2Z
66f2395840 fix(wm): update border correctly on (un)stack
This commit ensures that when active, the border is drawn correctly
after the stack and unstack commands.

fix #396
2023-04-15 21:26:38 -07:00
Alvin Truong
7828c403ba fix(komorebic): global-work-area-offset duplicate command and alias runtime error 2023-04-15 19:54:18 -07:00
dependabot[bot]
366cd4ff91 chore(deps): bump winreg from 0.11.0 to 0.50.0
Bumps [winreg](https://github.com/gentoo90/winreg-rs) from 0.11.0 to 0.50.0.
- [Release notes](https://github.com/gentoo90/winreg-rs/releases)
- [Changelog](https://github.com/gentoo90/winreg-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gentoo90/winreg-rs/compare/v0.11.0...v0.50.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-10 14:00:00 -07:00
dependabot[bot]
a3ee513003 chore(deps): bump os_info from 3.6.0 to 3.7.0
Bumps [os_info](https://github.com/stanislav-tkach/os_info) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/stanislav-tkach/os_info/releases)
- [Changelog](https://github.com/stanislav-tkach/os_info/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stanislav-tkach/os_info/compare/v3.6.0...v3.7.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-10 13:59:17 -07:00
dependabot[bot]
0de3fa62f0 chore(deps): bump proc-macro2 from 1.0.54 to 1.0.56
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.54 to 1.0.56.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.54...1.0.56)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-04 08:58:44 -07:00
dependabot[bot]
aadf80f3be chore(deps): bump clap from 4.1.13 to 4.2.1
Bumps [clap](https://github.com/clap-rs/clap) from 4.1.13 to 4.2.1.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.1.13...v4.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-04 08:58:27 -07:00
dependabot[bot]
0a3f27d5ad chore(deps): bump sysinfo from 0.28.1 to 0.28.4
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.28.1 to 0.28.4.
- [Release notes](https://github.com/GuillaumeGomez/sysinfo/releases)
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-04 08:57:59 -07:00
dependabot[bot]
9c5b380412 chore(deps): bump serde_json from 1.0.93 to 1.0.94
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.93 to 1.0.94.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.93...v1.0.94)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-28 12:18:53 -07:00
dependabot[bot]
587c5a2636 chore(deps): bump serde_yaml from 0.9.17 to 0.9.19
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.17 to 0.9.19.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.17...0.9.19)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-28 12:18:42 -07:00
dependabot[bot]
b5ca0bfd45 chore(deps): bump paste from 1.0.11 to 1.0.12
Bumps [paste](https://github.com/dtolnay/paste) from 1.0.11 to 1.0.12.
- [Release notes](https://github.com/dtolnay/paste/releases)
- [Commits](https://github.com/dtolnay/paste/compare/1.0.11...1.0.12)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-28 12:18:28 -07:00
dependabot[bot]
30fc1ef538 chore(deps): bump crossbeam-utils from 0.8.14 to 0.8.15
Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) from 0.8.14 to 0.8.15.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.14...crossbeam-utils-0.8.15)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-27 16:47:05 -07:00
dependabot[bot]
76d0a38165 chore(deps): bump clap from 4.1.6 to 4.1.13
Bumps [clap](https://github.com/clap-rs/clap) from 4.1.6 to 4.1.13.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.1.6...v4.1.13)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-27 16:46:47 -07:00
dependabot[bot]
34d65dddba chore(deps): bump syn from 1.0.107 to 1.0.109
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.107 to 1.0.109.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.107...1.0.109)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 13:26:53 -08:00
dependabot[bot]
a8e7f02b0a chore(deps): bump sysinfo from 0.28.0 to 0.28.1
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.28.0 to 0.28.1.
- [Release notes](https://github.com/GuillaumeGomez/sysinfo/releases)
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 13:26:33 -08:00
dependabot[bot]
1a59b3a2e3 chore(deps): bump schemars from 0.8.11 to 0.8.12
Bumps [schemars](https://github.com/GREsau/schemars) from 0.8.11 to 0.8.12.
- [Release notes](https://github.com/GREsau/schemars/releases)
- [Changelog](https://github.com/GREsau/schemars/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GREsau/schemars/compare/v0.8.11...v0.8.12)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 13:26:12 -08:00
LGUG2Z
cd7606540a docs(whkd): set powershell as default in whkdrc
A number of people have been tripped up by not having the latest version
of PowerShell installed, which is referenced by the binary "pwsh", so
this commit sets the default .shell in whkdrc.sample to "powershell"
which _should_ come installed with every version of Windows since
Windows 10.

resolve #365
2023-02-27 13:24:49 -08:00
LGUG2Z
f41e8c151e feat(wm): add cycle move/send to monitor cmds
This commit introduces cyclical commands for moving (with focus) or
sending (without focus) windows between adjacent monitors.

resolve #363
2023-02-24 16:59:16 -08:00
dependabot[bot]
8ce49f5868 chore(deps): bump winreg from 0.10.1 to 0.11.0
Bumps [winreg](https://github.com/gentoo90/winreg-rs) from 0.10.1 to 0.11.0.
- [Release notes](https://github.com/gentoo90/winreg-rs/releases)
- [Changelog](https://github.com/gentoo90/winreg-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gentoo90/winreg-rs/compare/v0.10.1...v0.11.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-20 08:29:38 -08:00
dependabot[bot]
72d20d5745 chore(deps): bump sysinfo from 0.27.7 to 0.28.0
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.27.7 to 0.28.0.
- [Release notes](https://github.com/GuillaumeGomez/sysinfo/releases)
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-20 08:29:10 -08:00
dependabot[bot]
38686a1167 chore(deps): bump clap from 4.1.4 to 4.1.6
Bumps [clap](https://github.com/clap-rs/clap) from 4.1.4 to 4.1.6.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.1.4...v4.1.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-20 08:28:25 -08:00
LGUG2Z
d9648ddd0c fix(readme): correct whkdrc locations in quickstart 2023-02-19 09:05:15 -08:00
LGUG2Z
6d01e53ef3 chore(release): v0.1.15 2023-02-19 07:57:31 -08:00
LGUG2Z
f87d4d520b refactor(ahk): merge ahk v1/v2 exe env vars 2023-02-19 07:53:43 -08:00
LGUG2Z
0c8eceb0c4 docs(readme): general update + quickstart w/ whkd 2023-02-19 07:53:43 -08:00
LGUG2Z
afde7a3fb5 feat(config): add pwsh cfgen + ps1 file watcher
This commit adds a command to generate application-specific
configuration in the format of a PowerShell ps1 file, as well as the
ability to automatically launch a komorebi.ps1 configuration file on
startup.

If a komorebi.ps1 file is found and launched at startup, the
watch-configuration command will watch and hot reload this file when any
changes are made.

A sample komorebi.ps1 file has been added to the root of the repository,
along with a sample whkdrc file, showing how the two can be used
together to replace AHK.

re #339
2023-02-19 07:53:43 -08:00
LGUG2Z
b89e5eafd2 feat(wm): add internal transparent/opaque window fns 2023-02-16 14:37:08 -08:00
LGUG2Z
8adff69b81 feat(wm): add more named-workspace cmd variants 2023-02-16 12:24:42 -08:00
LGUG2Z
a23019eccf fix(wm): handle regression switching from empty ws 2023-02-14 18:54:16 -08:00
dependabot[bot]
7bd2ff4087 chore(deps): bump vedantmgoyal2009/winget-releaser from 1 to 2
Bumps [vedantmgoyal2009/winget-releaser](https://github.com/vedantmgoyal2009/winget-releaser) from 1 to 2.
- [Release notes](https://github.com/vedantmgoyal2009/winget-releaser/releases)
- [Commits](https://github.com/vedantmgoyal2009/winget-releaser/compare/v1...v2)

---
updated-dependencies:
- dependency-name: vedantmgoyal2009/winget-releaser
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 08:28:02 -08:00
dependabot[bot]
3cc0e5d4c4 chore(deps): bump ctrlc from 3.2.4 to 3.2.5
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.2.4 to 3.2.5.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/commits/3.2.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 07:52:11 -08:00
dependabot[bot]
4c35f47bc4 chore(deps): bump serde_json from 1.0.92 to 1.0.93
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.92 to 1.0.93.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.92...v1.0.93)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 07:35:31 -08:00
LGUG2Z
6b918dae7f feat(wm): add named workspace commands
This commit introduces three new commands, ensure-named-workspaces,
named-workspace-rule, and focus-named-workspace, which email to reduce
the configuration complexity by allowing users to refer to workspace
names instead of monitor and workspace indices.
2023-02-12 15:18:16 -08:00
LGUG2Z
bda6054044 perf(border): reduce redraws on workspace change 2023-02-11 16:07:53 -08:00
LGUG2Z
80c98596dd feat(wm): add "cloak" window-hiding-behaviour
This commit adds cloaking as a window-hiding-behaviour option.

https://devblogs.microsoft.com/oldnewthing/20200302-00/?p=103507 for
more information on cloaking.

Cloaking is the same mechanism used by the native Virtual Desktops
feature by the Windows team, however it is deliberately hidden from the
public Windows API.

GitHub user Ciantic's VirtualDesktopAccessor crate documents the private
IApplicationView COM interface which contains the hidden and
undocumented SetCloak method, which can be used to cloak and uncloak
application windows by their HWNDs.

With some help from Ciantic and manual exploration to determine the
correct flags values to use, komorebi is now able to use the cloaking
mechanism when switching workspaces, which results in significantly
higher reliability and significantly less jank on workspace transitions.
komorebi's use of this cloaking mechanism also retains the flexibility
of per-monitor workspaces that users have come to know and enjoy.

This has only been tested on Windows 11, it is not yet known if calling
the SetCloak function in IApplicationWindow will cause crashes on
Windows 10.
2023-02-11 15:14:20 -08:00
dependabot[bot]
89d1924736 chore(deps): bump clap from 4.1.1 to 4.1.4
Bumps [clap](https://github.com/clap-rs/clap) from 4.1.1 to 4.1.4.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.1.1...v4.1.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-06 08:21:26 -08:00
dependabot[bot]
5d6bc49ca9 chore(deps): bump heck from 0.4.0 to 0.4.1
Bumps [heck](https://github.com/withoutboats/heck) from 0.4.0 to 0.4.1.
- [Release notes](https://github.com/withoutboats/heck/releases)
- [Changelog](https://github.com/withoutboats/heck/blob/master/CHANGELOG.md)
- [Commits](https://github.com/withoutboats/heck/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-06 08:19:50 -08:00
dependabot[bot]
c299326a27 chore(deps): bump proc-macro2 from 1.0.50 to 1.0.51
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.50 to 1.0.51.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.50...1.0.51)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-06 07:29:53 -08:00
dependabot[bot]
ec63b3e8bc chore(deps): bump os_info from 3.5.1 to 3.6.0
Bumps [os_info](https://github.com/stanislav-tkach/os_info) from 3.5.1 to 3.6.0.
- [Release notes](https://github.com/stanislav-tkach/os_info/releases)
- [Changelog](https://github.com/stanislav-tkach/os_info/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stanislav-tkach/os_info/compare/v3.5.1...v3.6.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-06 07:05:42 -08:00
dependabot[bot]
d592889dbf chore(deps): bump serde_json from 1.0.91 to 1.0.92
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.91 to 1.0.92.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.91...v1.0.92)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-06 07:05:18 -08:00
dependabot[bot]
04a5b3e669 chore(deps): bump sysinfo from 0.27.6 to 0.27.7
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.27.6 to 0.27.7.
- [Release notes](https://github.com/GuillaumeGomez/sysinfo/releases)
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-23 06:27:42 -08:00
dependabot[bot]
49dcdf806a chore(deps): bump proc-macro2 from 1.0.49 to 1.0.50
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.49 to 1.0.50.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.49...1.0.50)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-23 06:26:49 -08:00
dependabot[bot]
0463a28d3d chore(deps): bump which from 4.3.0 to 4.4.0
Bumps [which](https://github.com/harryfei/which-rs) from 4.3.0 to 4.4.0.
- [Release notes](https://github.com/harryfei/which-rs/releases)
- [Commits](https://github.com/harryfei/which-rs/compare/4.3.0...4.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-23 06:26:35 -08:00
dependabot[bot]
dc31ce227a chore(deps): bump serde_yaml from 0.9.16 to 0.9.17
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.16 to 0.9.17.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.16...0.9.17)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-23 06:26:07 -08:00
LGUG2Z
51f1aa7ede fix(wm): ensure all monitors are tiled on startup 2023-01-22 08:47:07 -08:00
LGUG2Z
86b4d239e7 fix(wm): allow focusing monitor with empty ws
This commit ensures that when the focus is changed to a monitor with an
empty workspace with the focus-monitor or cycle-monitor commands,
subsequent commands such as focus-workspace will operate successfully on
the chosen monitor.

fix #148
2023-01-21 18:34:30 -08:00
LGUG2Z
925f3bd87b feat(wm): add optional alt focus hack
This commit adds an optional focusing hack using simulated ALT key
presses to ensure that focus changes always succeed. As noted in the
documentation for LockSetForegroundWindow, the system automatically
enables calls to SetForegroundWindow if the user presses the ALT key.
2023-01-21 13:29:10 -08:00
LGUG2Z
f8120f6b11 fix(wm): correct logic for foreground access retry 2023-01-21 08:01:03 -08:00
LGUG2Z
67e0914e1e docs(readme): update workflow status badge 2023-01-20 17:14:14 -08:00
dependabot[bot]
a6e0fa2ca9 chore(deps): bump windows from 0.43.0 to 0.44.0
Bumps [windows](https://github.com/microsoft/windows-rs) from 0.43.0 to 0.44.0.
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/compare/0.43.0...0.44.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-19 08:32:22 -08:00
dependabot[bot]
03fb786183 chore(deps): bump clap from 4.0.32 to 4.1.1
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.32 to 4.1.1.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.32...v4.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-16 06:19:39 -08:00
dependabot[bot]
0aab892269 chore(deps): bump sysinfo from 0.27.3 to 0.27.6
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.27.3 to 0.27.6.
- [Release notes](https://github.com/GuillaumeGomez/sysinfo/releases)
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-16 06:18:51 -08:00
dependabot[bot]
9561c0fba0 chore(deps): bump sysinfo from 0.27.2 to 0.27.3
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.27.2 to 0.27.3.
- [Release notes](https://github.com/GuillaumeGomez/sysinfo/releases)
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-16 04:17:02 -08:00
LGUG2Z
acc119a529 docs(readme): specify ahk1.1 requirement for sample cfg 2023-01-16 04:15:59 -08:00
LGUG2Z
fd351b6a01 fix(wm): add bounds checks on max window creation
This commit ensures that the bounds of the resize_dimensions member on a
workspace are checked before attempting removal when maximizing a window
using the toggle-maximize command or cycle-focus commands.

fix #331
2023-01-04 07:19:09 -08:00
dependabot[bot]
499a960f4c chore(deps): bump serde from 1.0.151 to 1.0.152
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.151 to 1.0.152.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.151...v1.0.152)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-02 07:20:27 -08:00
dependabot[bot]
6957af3196 chore(deps): bump sysinfo from 0.27.0 to 0.27.2
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.27.0 to 0.27.2.
- [Release notes](https://github.com/GuillaumeGomez/sysinfo/releases)
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-02 07:20:11 -08:00
dependabot[bot]
3f1348e5b9 chore(deps): bump clap from 4.0.29 to 4.0.32
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.29 to 4.0.32.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.29...v4.0.32)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-02 07:19:56 -08:00
dependabot[bot]
54b4b37836 chore(deps): bump syn from 1.0.105 to 1.0.107
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.105 to 1.0.107.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.105...1.0.107)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-02 07:19:40 -08:00
dependabot[bot]
93223d2d92 chore(deps): bump quote from 1.0.21 to 1.0.23
Bumps [quote](https://github.com/dtolnay/quote) from 1.0.21 to 1.0.23.
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.21...1.0.23)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-02 07:19:22 -08:00
LGUG2Z
99af0f8f7b fix(wm): make force-focus command read wm state
This commit ensures that the force-focus command reads the window
manager state to get the coordinates of the window that should be
currently focused, places the cursor in the middle of that rect, and
then simulates a left-click.
2022-12-21 15:36:55 -08:00
LGUG2Z
4ee4d199a0 feat(wm): add new cmd to set active border offset
This commit introduces a new command, active-window-border-offset, which
allows the user to offset the starting position of the active window
border, thereby allowing for thicker or thinner active window borders,
when used in conjunction with the active-window-border-width command.

resolve #232
2022-12-19 19:01:46 -08:00
dependabot[bot]
00477e2696 chore(deps): bump serde from 1.0.150 to 1.0.151
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.150 to 1.0.151.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.150...v1.0.151)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-19 09:07:26 -08:00
dependabot[bot]
fbb7f70b15 chore(deps): bump proc-macro2 from 1.0.47 to 1.0.49
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.47 to 1.0.49.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.47...1.0.49)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-19 09:06:39 -08:00
dependabot[bot]
71b6a0eeea chore(deps): bump serde_yaml from 0.9.14 to 0.9.16
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.14 to 0.9.16.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.14...0.9.16)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-19 09:05:51 -08:00
dependabot[bot]
5e5323e696 chore(deps): bump serde_json from 1.0.89 to 1.0.91
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.89 to 1.0.91.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.89...v1.0.91)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-19 09:05:12 -08:00
dependabot[bot]
13bf9e64da chore(deps): bump paste from 1.0.9 to 1.0.11
Bumps [paste](https://github.com/dtolnay/paste) from 1.0.9 to 1.0.11.
- [Release notes](https://github.com/dtolnay/paste/releases)
- [Commits](https://github.com/dtolnay/paste/compare/1.0.9...1.0.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-19 08:59:40 -08:00
LGUG2Z
613d69a737 feat(wm): add force-focus command
On rare occasions and usually with Firefox, the desired application will
fail to be focused with the regular focus commands. This commit
introduces a new command, force-focus, which can be used to simulate a
left-click on a window that has failed to take focus, since this is what
I have to do to work around the issue anyway.
2022-12-15 17:08:25 -08:00
dependabot[bot]
ca09b9b300 chore(deps): bump serde from 1.0.149 to 1.0.150
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.149 to 1.0.150.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.149...v1.0.150)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-12 08:03:06 -08:00
dependabot[bot]
fa87a8ca88 chore(deps): bump sysinfo from 0.26.8 to 0.27.0
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.26.8 to 0.27.0.
- [Release notes](https://github.com/GuillaumeGomez/sysinfo/releases)
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-12 08:02:52 -08:00
dependabot[bot]
7c25f2c2e4 chore(deps): bump ctrlc from 3.2.3 to 3.2.4
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-12 08:01:31 -08:00
LGUG2Z
e764dad7a4 feat(wm): make active border with configurable
This commit introduces a new command which lets the user set a custom
width value for the active window border when it is enabled.

Unfortunately a little more width is required when working with rounded
windows on Windows 11 to fill the gap left by the rounding. The default
width remains set at 20.

re #232
2022-12-09 18:58:02 -08:00
LGUG2Z
a2bd277620 docs(readme): add section for example config 2022-12-06 19:02:30 -08:00
LGUG2Z
97423fc8e9 feat(wm): move/send container to ws by direction
This commit introduces two new commands which will allow the user to
move or send the currently focused window to either the next or previous
workspace depending on the cycle direction.

re #297
2022-12-06 18:54:49 -08:00
LGUG2Z
3b0830e511 fix(wm): allow cross-monitor focus w/ monocle+max
This commit removes the focused window monocle/maximized check when
trying to focus a container in a direction that requires the focus to
cross a monitor boundary.

Unfortunately, trying to remove the same check from the move command
results in undesired behaviour  (the wrong window gets moved, the state
gets funny on both the origin and the destination monitor)
2022-12-06 18:29:31 -08:00
dependabot[bot]
f5c9008287 chore(deps): bump serde from 1.0.148 to 1.0.149
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.148 to 1.0.149.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.148...v1.0.149)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-05 11:26:34 -08:00
dependabot[bot]
0f7d164550 chore(deps): bump clap from 4.0.27 to 4.0.29
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.27 to 4.0.29.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.27...v4.0.29)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-05 11:26:28 -08:00
dependabot[bot]
22b8029fb4 chore(deps): bump syn from 1.0.104 to 1.0.105
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.104 to 1.0.105.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.104...1.0.105)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-05 11:26:20 -08:00
Anurag Rao
46f2aad674 Fixed remove gaps command 2022-11-29 05:22:48 -08:00
dependabot[bot]
6d9f51e645 chore(deps): bump serde from 1.0.147 to 1.0.148
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.147 to 1.0.148.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.147...v1.0.148)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-28 09:32:39 -08:00
dependabot[bot]
ec0dea588d chore(deps): bump sysinfo from 0.26.7 to 0.26.8
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.26.7 to 0.26.8.
- [Release notes](https://github.com/GuillaumeGomez/sysinfo/releases)
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-28 09:32:28 -08:00
dependabot[bot]
24f838e83e chore(deps): bump clap from 4.0.23 to 4.0.27
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.23 to 4.0.27.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.23...v4.0.27)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-28 09:32:09 -08:00
dependabot[bot]
13114724b7 chore(deps): bump serde_json from 1.0.87 to 1.0.89
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.87 to 1.0.89.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.87...v1.0.89)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-28 09:31:54 -08:00
dependabot[bot]
267c24bc75 chore(deps): bump crossbeam-utils from 0.8.12 to 0.8.14
Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) from 0.8.12 to 0.8.14.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.12...crossbeam-utils-0.8.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-28 09:31:44 -08:00
dependabot[bot]
57b1bc1414 chore(deps): bump miow from 0.4.0 to 0.5.0
Bumps [miow](https://github.com/yoshuawuyts/miow) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/yoshuawuyts/miow/releases)
- [Changelog](https://github.com/yoshuawuyts/miow/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yoshuawuyts/miow/compare/v0.4.0...v0.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-14 08:10:46 -08:00
dependabot[bot]
22dcf15129 chore(deps): bump clap from 4.0.22 to 4.0.23
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.22 to 4.0.23.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.22...v4.0.23)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-14 08:09:57 -08:00
LGUG2Z
e1634d2a32 docs(readme): add section on youtube livestreams 2022-11-13 20:31:29 -08:00
LGUG2Z
37edbcfebc refactor(clippy): apply various lint fixes 2022-11-13 15:31:19 -08:00
LGUG2Z
b010215318 feat(wm): add per-monitor work area offsets
This commit introduces per-monitor work area offsets which will always
take precedence over global work area offsets.
2022-11-12 18:23:24 -08:00
LGUG2Z
a48715f15a refactor(core): make cfgen struct members public 2022-11-10 17:16:32 -08:00
LGUG2Z
6308414129 chore(release): v0.1.14 2022-11-09 13:38:57 -08:00
LGUG2Z
035e77bd25 fix(wm): don't reconcile monitors during drag
This commit ensures that monitor reconciliation doesn't get triggered
eagerly when a cross-monitor mouse drag/move of a window is taking
place.
2022-11-09 06:25:21 -08:00
dependabot[bot]
7b98b563eb chore(deps): bump clap from 4.0.18 to 4.0.20
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.18 to 4.0.20.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.18...v4.0.20)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-07 09:51:04 -08:00
LGUG2Z
5fda4a39b8 docs(readme): convert badges to html 2022-11-03 09:34:25 -07:00
LGUG2Z
3ad0ae6aca feat(wm): introduce lazy monitor cache
This commit introduces a lazy monitor cache that only gets populated
with a monitor has been disconnected, before the monitor is removed from
the state. If and when the same monitor is reconnected and identified by
its size on the virtual screen, the cached monitor state will be used to
repopulate layout options, avoiding a potentially expensive full
configuration reload.

re #275
2022-10-31 12:38:59 -07:00
LGUG2Z
2575ca2da4 feat(wm): add monitor index preference cmd
This commit adds a new komorebic command, monitor-index-preference,
which allows the user to set the index preference within the VecDeque of
monitors based on the "size" of a display.

This works as the size Rect identifies a unique display on the greater
virtual screen and persists across display connections and
disconnections unless the user deliberately changes the positioning of
the display monitor on the virtual screen.

When a new monitor is added to the state, the monitor preferences will
be checked, and if a preference exists, the new monitor will be inserted
at that index, otherwise, it will be pushed to the back of the VecDeque.

resolve #275
2022-10-31 12:38:59 -07:00
LGUG2Z
37f1a163cc fix(wm): match display name / avoid id volatility
This commit replaces all usages of MONITORINFO with MONITORINFOEX in
order to retrieve a name for each connected display device.

This display device name makes for easier deduping during monitor
reconciliation, so that matching display monitor names can simply have
their hmonitor id updated instead of trying to figure out which id
corresponds to which monitor by looking at the windows currently visible
on each.

fix #267
2022-10-31 12:38:59 -07:00
LGUG2Z
91c532d9b1 fix(wm): listen to settingchange + devicechange
This commit adds listeners on two more events, WM_SETTINGCHANGE and
WM_DEVICECHANGE, in the hope of more reliably catching monitor
attachments and detachments based on info in an SO answer.

fix #267
2022-10-31 12:38:59 -07:00
LGUG2Z
75d72522a2 fix(wm): listen to displaychange w/ hidden hwnd
This commit removes the previous polling strategy on ObjectCreate events
and uses a hidden window to listen to WM_DISPLAYCHANGE.

Unfortunately, as all monitors change HMONITOR values on monitor
attach/detach, even if the monitor remains attached, the only real
choice we have when a monitor which previously held windows is detached
is to read the entire monitor and workspace state again, as we do when
we initialise the window manager for the first time.

Since it's possible that the "wrong" monitor in the state has its
HMONITOR value updated, we also have to load the configuration again.

This commit deprecates WindowManagerEvent::MonitorPoll.

fix #267
2022-10-31 12:38:59 -07:00
dependabot[bot]
438bfc86ff chore(deps): bump windows from 0.42.0 to 0.43.0
Bumps [windows](https://github.com/microsoft/windows-rs) from 0.42.0 to 0.43.0.
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/compare/0.42.0...0.43.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-31 09:23:01 -07:00
dependabot[bot]
ca86418e3c chore(deps): bump sysinfo from 0.26.4 to 0.26.7
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.26.4 to 0.26.7.
- [Release notes](https://github.com/GuillaumeGomez/sysinfo/releases)
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-31 09:01:45 -07:00
dependabot[bot]
d8c76b97a9 chore(deps): bump serde from 1.0.145 to 1.0.147
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.145 to 1.0.147.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.145...v1.0.147)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-31 09:01:19 -07:00
dependabot[bot]
a4be1b95e0 chore(deps): bump net2 from 0.2.37 to 0.2.38
Bumps [net2](https://github.com/deprecrated/net2-rs) from 0.2.37 to 0.2.38.
- [Release notes](https://github.com/deprecrated/net2-rs/releases)
- [Commits](https://github.com/deprecrated/net2-rs/compare/0.2.37...0.2.38)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 08:38:58 -07:00
dependabot[bot]
6e666bc4d8 chore(deps): bump serde_json from 1.0.86 to 1.0.87
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.86 to 1.0.87.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.86...v1.0.87)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 08:38:48 -07:00
dependabot[bot]
857b3c9ccf chore(deps): bump syn from 1.0.102 to 1.0.103
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.102 to 1.0.103.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.102...1.0.103)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 08:38:36 -07:00
dependabot[bot]
9b916c0c21 chore(deps): bump clap from 4.0.15 to 4.0.18
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.15 to 4.0.18.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.15...v4.0.18)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 08:38:22 -07:00
dependabot[bot]
b642eddb96 chore(deps): bump serde_yaml from 0.9.13 to 0.9.14
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.13 to 0.9.14.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.13...0.9.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 08:37:55 -07:00
LGUG2Z
1229c65580 fix(ahk): prefer runwait for ahk lib wrappers
This commit ensures that the generated AHK library for komorebic uses
RunWait instead of Run, as the latter is asynchronous and can result in
an unexpected order of calls when used in a komorebi.ahk configuration
file.

re #269
2022-10-21 15:24:31 -07:00
LGUG2Z
b25cc1c8bf fix(wm): reset foreground access when calls fail 2022-10-21 14:10:12 -07:00
LGUG2Z
e02ddd47cc fix(wm): eagerly set new active border position
This commit adds SocketMessage::FocusWindow as a target to update the
border position on at the end of the command handler. There are some
occasions where the EVENT_SYSTEM_FOREGROUND notification isn't being
sent (on newer versions of Win11, I think), so we can't count on the
border being updated when that event is received by the event handler.
2022-10-21 12:13:06 -07:00
LGUG2Z
e20b4aabc3 fix(clap): address deprecations 2022-10-20 14:21:27 -07:00
dependabot[bot]
acaee5595d chore(deps): bump clap from 3.2.22 to 4.0.15
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.22 to 4.0.15.
- [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/v3.2.22...v4.0.15)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-20 14:21:27 -07:00
dependabot[bot]
083a142597 chore(deps): bump proc-macro2 from 1.0.46 to 1.0.47
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.46 to 1.0.47.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.46...1.0.47)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-17 09:17:02 -07:00
Max Bane
1633a5ebc2 fix(config): call ActiveWindowBorderColour correctly
The sample config only provided three of the four required arguments in
the example call to ActiveWindowBorderColour. Uncommenting the line as
it was would raise an error from AuthoHotKey.
2022-10-14 11:40:17 -07:00
Yusuf007R
352c010021 feat(wm): manage return bool of PostMessage + update ahk library
this commit makes a small refactor to the way PostMessageW is used so now be able to handle the
returned bool, as well as adding a custom error message to WindowsApi::close_window and updating the
ahk generated library

#259
2022-10-13 01:08:35 -07:00
Yusuf007R
33965f92ad feat(wm): add close and minimize cmd
this commit adds the ability to close and minimize the current focused window via SocketMessages and
komorebic commands

resolve #189
2022-10-13 01:08:35 -07:00
Yusuf007R
635272fc10 feat(wm): add max number of attempts to set foreground
this commits adds a max number of attempts (5) to the call of set_foreground_window inside
Window:Focus
2022-10-13 01:06:58 -07:00
dependabot[bot]
5354e9c7a4 chore(deps): bump tracing-subscriber from 0.3.15 to 0.3.16
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.3.15 to 0.3.16.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.15...tracing-subscriber-0.3.16)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 08:27:26 -07:00
dependabot[bot]
e35164f106 chore(deps): bump tracing from 0.1.36 to 0.1.37
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.36 to 0.1.37.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.36...tracing-0.1.37)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 08:27:16 -07:00
dependabot[bot]
a637eefd82 chore(deps): bump syn from 1.0.101 to 1.0.102
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.101 to 1.0.102.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.101...1.0.102)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 08:27:01 -07:00
dependabot[bot]
db361f36db chore(deps): bump serde_json from 1.0.85 to 1.0.86
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.85 to 1.0.86.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.85...v1.0.86)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 08:26:43 -07:00
LGUG2Z
577fa0a97f fix(wm): retry foreground calls on focus change
For the past few weeks since upgrading the windows-rs crate I've seen
sporadic failures when calling SetForegroundWindow which require a full
restart to get the wm working as expected again. Adding in a retry loop
here seems to help when the issue comes up for me on Windows 11.
2022-10-07 06:57:37 -07:00
dependabot[bot]
f8ada73739 chore(deps): bump proc-macro2 from 1.0.44 to 1.0.46
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2) from 1.0.44 to 1.0.46.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.44...1.0.46)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-03 07:58:29 -07:00
dependabot[bot]
ffcc2f71d1 chore(deps): bump crossbeam-utils from 0.8.11 to 0.8.12
Bumps [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) from 0.8.11 to 0.8.12.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.8.11...crossbeam-utils-0.8.12)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-03 07:58:10 -07:00
dependabot[bot]
ed79793002 chore(deps): bump schemars from 0.8.10 to 0.8.11
Bumps [schemars](https://github.com/GREsau/schemars) from 0.8.10 to 0.8.11.
- [Release notes](https://github.com/GREsau/schemars/releases)
- [Changelog](https://github.com/GREsau/schemars/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GREsau/schemars/compare/v0.8.10...v0.8.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-03 07:57:52 -07:00
sitiom
afb819a383 ci(winget): update workflow 2022-09-29 08:16:10 -07:00
LGUG2Z
3438818999 chore(deps): cargo update 2022-09-27 09:54:34 -07:00
LGUG2Z
611e4cc4a8 chore(deps): bump windows from 0.40 to 0.42 2022-09-27 09:53:43 -07:00
dependabot[bot]
27490de0d1 chore(deps): bump windows from 0.39.0 to 0.40.0
Bumps [windows](https://github.com/microsoft/windows-rs) from 0.39.0 to 0.40.0.
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/compare/0.39.0...0.40.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-20 08:28:02 -07:00
dependabot[bot]
5112a8f39d chore(deps): bump syn from 1.0.99 to 1.0.100
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.99 to 1.0.100.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.99...1.0.100)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-19 07:37:14 -07:00
LGUG2Z
c3f77ef4f8 chore(deps): cargo update 2022-09-18 08:37:24 -07:00
LGUG2Z
33520a46b5 fix(cli): open resp sock before sending query
This commit ensures that a response socket is opened before sending a
query request from komorebic to komorebi. Additionally, I have taken
this opportunity to ensure that all socket files are created in
DATA_DIR.

fix #218
2022-09-18 08:30:09 -07:00
LGUG2Z
0903be7931 fix(cli): pass correct tcp flag to start cmd 2022-09-13 15:53:57 -07:00
dependabot[bot]
e78e6b1382 chore(deps): bump paste from 1.0.8 to 1.0.9
Bumps [paste](https://github.com/dtolnay/paste) from 1.0.8 to 1.0.9.
- [Release notes](https://github.com/dtolnay/paste/releases)
- [Commits](https://github.com/dtolnay/paste/compare/1.0.8...1.0.9)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-05 13:13:24 -07:00
dependabot[bot]
adafa32488 chore(deps): bump sysinfo from 0.26.0 to 0.26.2
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.26.0 to 0.26.2.
- [Release notes](https://github.com/GuillaumeGomez/sysinfo/releases)
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-05 13:13:14 -07:00
dependabot[bot]
329b3052a4 chore(deps): bump clap from 3.2.17 to 3.2.20
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.17 to 3.2.20.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.20/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.17...v3.2.20)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-05 13:12:54 -07:00
dependabot[bot]
b25662fea2 chore(deps): bump which from 4.2.5 to 4.3.0
Bumps [which](https://github.com/harryfei/which-rs) from 4.2.5 to 4.3.0.
- [Release notes](https://github.com/harryfei/which-rs/releases)
- [Commits](https://github.com/harryfei/which-rs/compare/4.2.5...4.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-05 13:12:34 -07:00
dependabot[bot]
edc9b0cd3d chore(deps): bump serde_yaml from 0.9.10 to 0.9.11
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.10 to 0.9.11.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.10...0.9.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-05 13:12:01 -07:00
sitiom
a43eb8fbf5 docs(readme): add winget installation reference 2022-09-05 07:47:58 -07:00
Ryan Caezar Itang
8b0f1d007f ci(windows): add winget releaser workflow 2022-08-30 12:46:06 -07:00
dependabot[bot]
83a502f199 chore(deps): bump sysinfo from 0.25.3 to 0.26.0
Bumps [sysinfo](https://github.com/GuillaumeGomez/sysinfo) from 0.25.3 to 0.26.0.
- [Release notes](https://github.com/GuillaumeGomez/sysinfo/releases)
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-29 07:50:20 -07:00
LGUG2Z
5006aa9009 fix(wm): give focus priority to monocle containers
This commit ensures that monocle containers are given priority when
handling WindowManagerEvent::FocusChange.

This is especially important when switching workspaces to ensure that
the keyboard input focus stays with the monocle container's focused
window when returning to a workspace with a monocle container activated.

fix #219
2022-08-28 08:09:10 -07:00
LGUG2Z
e4a8117a94 docs(readme): add link to blog by omochice 2022-08-27 19:08:12 -07:00
233 changed files with 21395 additions and 4229 deletions

3
.czrc Normal file
View File

@@ -0,0 +1,3 @@
{
"path": "cz-conventional-changelog"
}

1
.github/FUNDING.yml vendored
View File

@@ -1 +1,2 @@
github: LGUG2Z
ko_fi: lgug2z

View File

@@ -32,6 +32,20 @@ OS Name: Microsoft Windows 11 Pro
OS Version: 10.0.22000 N/A Build 22000
```
**`komorebic check` Output**
Provide the output of `komorebic check`
For example:
```
No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\LGUG2Z
Looking for configuration files in C:\Users\LGUG2Z
No komorebi configuration found in C:\Users\LGUG2Z
If running 'komorebic start --await-configuration', you will manually have to call the following command to begin tiling: komorebic complete-configuration
```
**Additional context**
Add any other context about the problem here.

View File

@@ -28,7 +28,7 @@ jobs:
target:
- x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Prep cargo dirs
@@ -42,7 +42,7 @@ jobs:
echo "TARGET=${{ matrix.target }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
echo "SKIP_TESTS=" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Cache cargo registry, git trees and binaries
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
@@ -55,7 +55,7 @@ jobs:
echo "::set-output name=rust_hash::$(rustc -Vv | grep commit-hash | awk '{print $2}')"
shell: bash
- name: Cache cargo build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: target
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
@@ -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 }}
@@ -81,33 +86,55 @@ jobs:
cargo install cargo-wix
cargo wix -p komorebi --nocapture -I .\wix\main.wxs --target x86_64-pc-windows-msvc
- name: Upload the built artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: komorebi-${{ matrix.target }}
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-gui.exe
target/${{ matrix.target }}/release/komorebi.pdb
target/${{ matrix.target }}/release/komorebic.pdb
target/${{ matrix.target }}/release/komorebi-gui.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
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/v')
shell: bash
run: |
if ! type kokai >/dev/null; then cargo install --locked kokai --force; fi
kokai release --no-emoji --add-links github:commits,issues --ref "$(git tag --points-at HEAD)" >"CHANGELOG.md"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/v')
with:
version: latest
args: release --skip-validate --rm-dist --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
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/v')
with:
files: "target/wix/komorebi-*.msi"
winget:
name: Publish to WinGet
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: vedantmgoyal2009/winget-releaser@v2
with:
identifier: LGUG2Z.komorebi
token: ${{ secrets.WINGET_TOKEN }}

3
.gitignore vendored
View File

@@ -3,4 +3,5 @@
/target
CHANGELOG.md
dummy.go
komorebi.ahk
komorebi.ahk
komorebic/applications.yaml

View File

@@ -10,8 +10,8 @@ before:
builds:
- id: komorebi
main: dummy.go
goos: ["windows"]
goarch: ["amd64"]
goos: [ "windows" ]
goarch: [ "amd64" ]
binary: komorebi
hooks:
post:
@@ -19,22 +19,37 @@ builds:
- cp ".\target\x86_64-pc-windows-msvc\release\komorebi.exe" ".\dist\komorebi_windows_amd64_v1\komorebi.exe"
- id: komorebic
main: dummy.go
goos: ["windows"]
goarch: ["amd64"]
goos: [ "windows" ]
goarch: [ "amd64" ]
binary: komorebic
hooks:
post:
- mkdir -p dist/windows_amd64
- cp ".\target\x86_64-pc-windows-msvc\release\komorebic.exe" ".\dist\komorebic_windows_amd64_v1\komorebic.exe"
- id: komorebic-no-console
main: dummy.go
goos: [ "windows" ]
goarch: [ "amd64" ]
binary: komorebic-no-console
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"
- id: komorebi-gui
main: dummy.go
goos: [ "windows" ]
goarch: [ "amd64" ]
binary: komorebi-gui
hooks:
post:
- mkdir -p dist/windows_amd64
- cp ".\target\x86_64-pc-windows-msvc\release\komorebi-gui.exe" ".\dist\komorebi-gui_windows_amd64_v1\komorebi-gui.exe"
archives:
- replacements:
windows: pc-windows-msvc
amd64: x86_64
- name_template: "{{ .ProjectName }}-{{ .Version }}-x86_64-pc-windows-msvc"
format: zip
name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Arch }}-{{ .Os }}"
files:
- LICENSE
- LICENSE.md
- CHANGELOG.md
checksum:

45
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,45 @@
# Contributing to the Project
The project is a collection of contributions from both the project leaders and
community members. There are many ways to contribute, this can include content
in the project repositories, as well as contributing in public and private
conversation, assisting users, writing blog posts, and many other ways.
## How contributions are made
Contributions to the project primarily happen in the project source
repositories, but may also occur in other places, such as discussion forums and
public and private discourse.
## Contributing content to the Project
In order for the project leaders to manage sustained progress toward the
project goals and maintain project velocity, focus and quality, the project may
adjust the license terms over time.
Content contributed to the project must therefore be provided under
sufficiently liberal terms to allow these operations to proceed unimpeded. As
such contributions are accepted with the following understanding:
* Contributed content is licensed under the terms of the 0-BSD license
* Contributors accept the terms of the project license at the time of
contribution
By making a contribution, you accept both the current project license terms,
and that all contributions that you have made are provided under the terms of
the 0-BSD license.
## Zero-Clause BSD
```
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
```

4971
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,44 @@
[workspace]
resolver = "2"
members = [
"derive-ahk",
"komorebi",
"komorebi-client",
"komorebi-core",
"komorebi-gui",
"komorebic",
"komorebic-no-console",
]
[workspace.dependencies]
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" }
sysinfo = "0.30"
serde = { version = "1", features = ["derive"] }
uds_windows = "1"
[workspace.dependencies.windows]
version = "0.54"
features = [
"implement",
"Win32_System_Com",
"Win32_UI_Shell_Common", # for IObjectArray
"Win32_Foundation",
"Win32_Graphics_Dwm",
"Win32_Graphics_Gdi",
"Win32_System_LibraryLoader",
"Win32_System_RemoteDesktop",
"Win32_System_Threading",
"Win32_UI_Accessibility",
"Win32_UI_HiDpi",
"Win32_UI_Input_KeyboardAndMouse",
"Win32_UI_Shell",
"Win32_UI_Shell_Common",
"Win32_UI_WindowsAndMessaging",
"Win32_System_SystemServices"
]

21
LICENSE
View File

@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2021 Jade Iqbal
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

105
LICENSE.md Normal file
View File

@@ -0,0 +1,105 @@
# PolyForm Strict License 1.0.0
<https://polyformproject.org/licenses/strict/1.0.0>
## Acceptance
In order to get any license under these terms, you must agree
to them as both strict obligations and conditions to all
your licenses.
## Copyright License
The licensor grants you a copyright license for the software
to do everything you might do with the software that would
otherwise infringe the licensor's copyright in it for any
permitted purpose, other than distributing the software or
making changes or new works based on the software.
## Patent License
The licensor grants you a patent license for the software that
covers patent claims the licensor can license, or becomes able
to license, that you would infringe by using the software.
## Noncommercial Purposes
Any noncommercial purpose is a permitted purpose.
## Personal Uses
Personal use for research, experiment, and testing for
the benefit of public knowledge, personal study, private
entertainment, hobby projects, amateur pursuits, or religious
observance, without any anticipated commercial application,
is use for a permitted purpose.
## Noncommercial Organizations
Use by any charitable organization, educational institution,
public research organization, public safety or health
organization, environmental protection organization,
or government institution is use for a permitted purpose
regardless of the source of funding or obligations resulting
from the funding.
## Fair Use
You may have "fair use" rights for the software under the
law. These terms do not limit them.
## No Other Rights
These terms do not allow you to sublicense or transfer any of
your licenses to anyone else, or prevent the licensor from
granting licenses to anyone else. These terms do not imply
any other licenses.
## Patent Defense
If you make any written claim that the software infringes or
contributes to infringement of any patent, your patent license
for the software granted under these terms ends immediately. If
your company makes such a claim, your patent license ends
immediately for work on behalf of your company.
## Violations
The first time you are notified in writing that you have
violated any of these terms, or done anything with the software
not covered by your licenses, your licenses can nonetheless
continue if you come into full compliance with these terms,
and take practical steps to correct past violations, within
32 days of receiving notice. Otherwise, all your licenses
end immediately.
## No Liability
***As far as the law allows, the software comes as is, without
any warranty or condition, and the licensor will not be liable
to you for any damages arising out of these terms or the use
or nature of the software, under any kind of legal claim.***
## Definitions
The **licensor** is the individual or entity offering these
terms, and the **software** is the software the licensor makes
available under these terms.
**You** refers to the individual or entity agreeing to these
terms.
**Your company** is any legal entity, sole proprietorship,
or other kind of organization that you work for, plus all
organizations that have control over, are under the control of,
or are under common control with that organization. **Control**
means ownership of substantially all the assets of an entity,
or the power to direct its management and policies by vote,
contract, or otherwise. Control can be direct or indirect.
**Your licenses** are all the licenses granted to you for the
software under these terms.
**Use** means anything you do with the software requiring one
of your licenses.

843
README.md
View File

@@ -2,60 +2,102 @@
Tiling Window Management for Windows.
![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/LGUG2Z/komorebi/Windows/master)
![GitHub](https://img.shields.io/github/license/LGUG2Z/komorebi)
![GitHub all releases](https://img.shields.io/github/downloads/LGUG2Z/komorebi/total)
![GitHub commits since latest release (by date) for a branch](https://img.shields.io/github/commits-since/LGUG2Z/komorebi/latest/master)
![Discord](https://img.shields.io/discord/898554690126630914?label=discord)
![GitHub Sponsors](https://img.shields.io/github/sponsors/LGUG2Z)
<p>
<a href="https://techforpalestine.org/learn-more">
<img alt="Tech for Palestine" src="https://badge.techforpalestine.org/default">
</a>
<img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/LGUG2Z/komorebi/.github/workflows/windows.yaml">
<img alt="GitHub" src="https://img.shields.io/github/license/LGUG2Z/komorebi">
<img alt="GitHub all releases" src="https://img.shields.io/github/downloads/LGUG2Z/komorebi/total">
<img alt="GitHub commits since latest release (by date) for a branch" src="https://img.shields.io/github/commits-since/LGUG2Z/komorebi/latest">
<a href="https://discord.gg/mGkn66PHkx">
<img alt="Discord" src="https://img.shields.io/discord/898554690126630914">
</a>
<a href="https://github.com/sponsors/LGUG2Z">
<img alt="GitHub Sponsors" src="https://img.shields.io/github/sponsors/LGUG2Z">
</a>
<a href="https://ko-fi.com/lgug2z">
<img alt="Ko-fi" src="https://img.shields.io/badge/kofi-tip-green">
</a>
<a href="https://notado.app/feeds/jado/software-development">
<img alt="Notado Feed" src="https://img.shields.io/badge/Notado-Subscribe-informational">
</a>
<a href="https://www.youtube.com/channel/UCeai3-do-9O4MNy9_xjO6mg?sub_confirmation=1">
<img alt="YouTube" src="https://img.shields.io/youtube/channel/subscribers/UCeai3-do-9O4MNy9_xjO6mg">
</a>
</p>
![screenshot](https://user-images.githubusercontent.com/13164844/184027064-f5a6cec2-2865-4d65-a549-a1f1da589abf.png)
## 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.
Translations of this document can be found in the project wiki:
_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 中文用户指南](https://github.com/LGUG2Z/komorebi/wiki/README-zh) (by [@crosstyan](https://github.com/crosstyan))
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).
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.
Articles, blog posts, demos, and videos about _komorebi_ can be added to this list by PR:
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.
- [Moving to Windows from Linux Pt 1](https://kvwu.io/posts/moving-to-windows/)
- [Windows 下的现代化平铺窗口管理器 komorebi](https://zhuanlan.zhihu.com/p/455064481)
_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.
## GitHub Sponsors Early Access
I encourage you to make a charitable donation to the [Palestine Children's
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). Users who sponsor my work
on `komorebi` at any of the predefined monthly tiers will be given access to a private fork of this repository where I
push features-in-progress that are not yet quite ready to be pushed on the main repository.
[GitHub Sponsors is enabled for this
project](https://github.com/sponsors/LGUG2Z). Unfortunately I don't have
anything specific to offer besides my gratitude and shout outs at the end of
_komorebi_ live development videos and tutorials.
There will never be any feature of `komorebi` that is gated behind sponsorship; every new feature will always be
available for free in the public repository once it meets the requisite level of code quality and completion.
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).
Features-in-progress that are available in early access will be tagged in the issues with
an ["early access" label](https://github.com/LGUG2Z/komorebi/issues?q=is%3Aopen+is%3Aissue+label%3A%22early+access%22).
# Installation
## Charitable Donations
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.
`komorebi`, like `vim`, 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.
[![Watch the quickstart walkthrough video](https://img.youtube.com/vi/H9-_c1egQ4g/hqdefault.jpg)](https://www.youtube.com/watch?v=H9-_c1egQ4g)
I encourage you to make a charitable donation
to [Fresh Start Refugee](https://www.freshstartrefugee.org/donate) before
you consider sponsoring me on GitHub.
# Comparison With Fancy Zones
## Demonstrations
Community member [Olge](https://www.youtube.com/@polle5555) has created an
excellent video which compares the default window management features of
Windows 11, Fancy Zones and komorebi.
If you are not familiar with tiling window managers or if you are looking at
komorebi and wondering "how is this different from Fancy Zones? 🤔", this short
video will answer the majority of your questions.
[![Watch the comparison video](https://img.youtube.com/vi/0LCbS_gm0RA/hqdefault.jpg)](https://www.youtube.com/watch?v=0LCbS_gm0RA)
# 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
@@ -72,511 +114,90 @@ 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. AutoHotKey) 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
ahk --------> komorebic <------> komorebi
```
## Design
_komorebi_ is the successor to [_yatta_](https://github.com/LGUG2Z/yatta) and as such aims to build on the learnings
from that project.
While _yatta_ was primary an attempt to learn how to work with and call Windows APIs from Rust, while secondarily
implementing a minimal viable tiling window manager for my own needs (largely single monitor, single workspace),
_komorebi_ has been redesigned from the ground-up to support more complex features that have become standard in tiling
window managers on other platforms.
_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
### 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).
Alternatively, you may add a new directory to your `Path`
using [`setx`](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/setx) or the Environment
Variables pop up in System Properties Advanced (which can be launched with `SystemPropertiesAdvanced.exe` at a
PowerShell prompt), and then move the binaries to that directory.
### Scoop
If you use the [Scoop](https://scoop.sh/) command line installer, you can run the following commands to install the
binaries from the latest GitHub Release:
```powershell
scoop bucket add extras
scoop install komorebi
# To download the example configuration
iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/master/komorebi.sample.ahk -OutFile $Env:USERPROFILE\komorebi.ahk
iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/master/komorebic.lib.ahk -OutFile $Env:USERPROFILE\komorebic.lib.ahk
iwr https://raw.githubusercontent.com/LGUG2Z/komorebi/master/komorebi.generated.ahk -OutFile $Env:USERPROFILE\komorebi.generated.ahk
```
If you install _komorebi_ using Scoop, the binaries will automatically be added to your `Path`.
Thanks to [@sitiom](https://github.com/sitiom) for getting _komorebi_ added to the popular Scoop Extras bucket.
### Building from Source
If you prefer to compile _komorebi_ from source, you will need
a [working Rust development environment on Windows 10](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
Once you have either the prebuilt binaries in your `Path`, or have compiled the binaries from source (these will already
be in your `Path` if you installed Rust with [rustup](https://rustup.rs), which you absolutely should), you can
run `komorebic start --await-configuration` at a Powershell prompt, and you will see the following output:
```
Start-Process komorebi -WindowStyle hidden
```
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`.
### Configuring
Once `komorebi` is running, you can execute the `komorebi.sample.ahk` script to set up the default keybindings via AHK
(the file includes comments to help you start building your own configuration).
If you have AutoHotKey installed and a `komorebi.ahk` file in your home directory (run `$Env:UserProfile` at a
PowerShell prompt to find your home directory), `komorebi` will automatically try to load it when starting.
There is also tentative support for loading a AutoHotKey v2 files, if the file is named `komorebi.ahk2` and
the `AutoHotKey64.exe` executable for AutoHotKey v2 is in your `Path`. If both `komorebi.ahk` and `komorebi.ahk2` files
exist in your home directory, only `komorebi.ahk` will be loaded. An example of an AutoHotKey v2 configuration file
for _komorebi_ can be found [here](https://gist.github.com/crosstyan/dafacc0778dabf693ce9236c57b201cd).
#### Using Different AHK Executables
The preferred way to install AutoHotKey for use with `komorebi` is to install it via `scoop`:
```powershell
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 executables that `komorebi` looks for to launch and reload `komorebi.ahk` configuration files using
by setting one of the following two environment variables depending on which version of AutoHotKey you wish to use:
- `$Env:KOMOREBI_AHK_V1_EXE`
- `$Env:KOMOREBI_AHK_V2_EXE`
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
#### Generating Common Application-Specific Configurations
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
an AHK file which you can import at the start of your own `komorebi.ahk` file,
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 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 ahk-app-specific-configuration applications.yaml overrides.yaml
```
#### 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.
#### 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
```
It is important to note that the active window border will only apply to windows managed by `komorebi`.
#### 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
```
#### Multiple Layout Changes on Startup
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.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
Sometimes you will want a specific application to never be tiled, and instead float all the time. You add 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
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
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
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:
```ahk
Run, komorebic.exe toggle-mouse-follows-focus, , Hide
```
#### 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
```
#### 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
```
## Configuration with `komorebic`
As previously mentioned, this project does not handle anything related to keybindings and shortcuts directly. I
personally use AutoHotKey to manage my window management shortcuts, and have provided a
sample [komorebi.ahk](komorebi.sample.ahk) AHK script 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.
### AutoHotKey Helper Library for `komorebic`
Additionally, you may run `komorebic.exe ahk-library` to
generate [a helper library for AutoHotKey](komorebic.lib.sample.ahk) which wraps every `komorebic` command in a native
AHK function.
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. A sample AHK script that shows how this library can be
used [is available here](komorebi.sample.with.lib.ahk).
## Features
- [x] Multi-monitor
- [x] Virtual workspaces
- [x] Window stacks
- [x] Cycle through stacked windows
- [x] Change focused window by direction
- [x] Change focused window by direction across monitor boundary
- [x] Move focused window container in direction
- [x] Move focused window container in direction across monitor boundary
- [x] Move focused window container to monitor and follow
- [x] Move focused window container to workspace follow
- [x] Send focused window container to monitor
- [x] Send focused window container to workspace
- [x] Move focused workspace to monitor
- [x] Mouse follows focused container
- [x] Resize window container in direction
- [x] Resize window container on axis
- [x] Set custom resize delta
- [x] Active window border
- [x] Quicksave and quickload layouts with resize dimensions
- [x] Save and load layouts with resize dimensions to/from specific files
- [x] Mouse drag to swap window container position
- [x] Mouse drag to resize window container
- [x] Configurable workspace and container gaps
- [x] BSP tree layout (`bsp`)
- [x] Flip BSP tree layout horizontally or vertically
- [x] Equal-width, max-height column layout (`columns`)
- [x] Equal-height, max-width row layout (`rows`)
- [x] Main half-height window with vertical stack layout (`horizontal-stack`)
- [x] Main half-width window with horizontal stack layout (`vertical-stack`)
- [x] 2x Main window (half and quarter-width) with horizontal stack layout (`ultrawide-vertical-stack`)
- [x] Load custom layouts from JSON and YAML representations
- [x] Dynamically select layout based on the number of open windows
- [x] Floating rules based on exe name, window title and class
- [x] Workspace rules based on exe name and window class
- [x] Additional manage rules based on exe name and window class
- [x] Identify applications which overflow their borders by exe name and class
- [x] Identify 'close/minimize to tray' applications by exe name and class
- [x] Configure work area offsets to preserve space for custom taskbars
- [x] Configure and compensate for the size of Windows invisible borders
- [x] Toggle floating windows
- [x] Toggle monocle window
- [x] Toggle native maximization
- [x] Toggle mouse follows focus
- [x] Toggle Xmouse/Windows focus follows mouse implementation
- [x] Toggle Komorebi focus follows mouse implementation (desktop and system tray-aware)
- [x] Toggle automatic tiling
- [x] Pause all window management
- [x] Load configuration on startup
- [x] Manually reload configuration
- [x] Watch configuration for changes
- [x] Helper library for AutoHotKey
- [x] View window manager state
- [x] Query window manager state
- [x] Subscribe to event and message notifications
## 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.
## License
`komorebi` is licensed under the [PolyForm Strict 1.0.0
license](https://polyformproject.org/licenses/strict/1.0.0). On a high level
this means that you are free to do whatever you want with `komorebi` other than
redistribution, or distribution of new works (ie. hard-forks) based on the
software.
Anyone is free to make their own fork of `komorebi` with changes intended
either for personal use or for integration back upstream via pull requests.
Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for more information about how
code contributions to `komorebi` are licensed.
# 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:
@@ -586,7 +207,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.
@@ -597,12 +218,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
@@ -612,23 +233,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.
@@ -652,21 +274,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.25"}
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.
@@ -682,9 +417,21 @@ 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
- First and foremost, thank you to my wife, both for naming this project and for her patience throughout its never-ending development
- Thank you to [@sitiom](https://github.com/sitiom) for being [an exemplary open source community leader](https://jeezy.substack.com/p/the-open-source-contributions-i-appreciate)
- Thank you to the developers of [nog](https://github.com/TimUntersberger/nog) who came before me and whose work taught me more than I can ever hope to repay
- Thank you to the developers of [GlazeWM](https://github.com/lars-berger/GlazeWM) for pushing the boundaries of tiling window management on Windows with me and having an excellent spirit of collaboration
- Thank you to [@Ciantic](https://github.com/Ciantic) for helping me bring the [hidden Virtual Desktops cloaking function](https://github.com/Ciantic/AltTabAccessor/issues/1) to `komorebi`

View File

@@ -129,7 +129,7 @@ pub fn ahk_function(input: ::proc_macro::TokenStream) -> ::proc_macro::TokenStre
fn generate_ahk_function() -> String {
::std::format!(r#"
{}({}) {{
Run, komorebic.exe {} {} {}, , Hide
RunWait, komorebic.exe {} {} {}, , Hide
}}"#,
::std::stringify!(#name),
#all_arguments,
@@ -148,7 +148,7 @@ pub fn ahk_function(input: ::proc_macro::TokenStream) -> ::proc_macro::TokenStre
fn generate_ahk_function() -> String {
::std::format!(r#"
{}({}) {{
Run, komorebic.exe {} {}, , Hide
RunWait, komorebic.exe {} {}, , Hide
}}"#,
::std::stringify!(#name),
#arguments,
@@ -194,7 +194,7 @@ pub fn ahk_library(input: ::proc_macro::TokenStream) -> ::proc_macro::TokenStrea
stream.extend(quote! {
v.push(::std::format!(r#"
{}() {{
Run, komorebic.exe {}, , Hide
RunWait, komorebic.exe {}, , Hide
}}"#,
::std::stringify!(#name),
::std::stringify!(#name).to_kebab_case()

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

26
docs/cli/border-colour.md Normal file
View File

@@ -0,0 +1,26 @@
# border-colour
```
Set the colour for a window border kind
Usage: komorebic.exe border-colour [OPTIONS] <R> <G> <B>
Arguments:
<R>
Red
<G>
Green
<B>
Blue
Options:
-w, --window-kind <WINDOW_KIND>
[default: single]
[possible values: single, stack, monocle, unfocused]
-h, --help
Print help
```

16
docs/cli/border-offset.md Normal file
View File

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

16
docs/cli/border-width.md Normal file
View File

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

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

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

16
docs/cli/change-layout.md Normal file
View File

@@ -0,0 +1,16 @@
# change-layout
```
Set the layout on the focused workspace
Usage: komorebic.exe change-layout <DEFAULT_LAYOUT>
Arguments:
<DEFAULT_LAYOUT>
[possible values: bsp, columns, rows, vertical-stack, horizontal-stack, ultrawide-vertical-stack, grid, right-main-vertical-stack]
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,19 @@
# cross-monitor-move-behaviour
```
Set the behaviour when moving windows across monitor boundaries
Usage: komorebic.exe cross-monitor-move-behaviour <MOVE_BEHAVIOUR>
Arguments:
<MOVE_BEHAVIOUR>
Possible values:
- swap: Swap the window container with the window container at the edge of the adjacent monitor
- insert: Insert the window container into the focused workspace on the adjacent monitor
- no-op: Do nothing if trying to move a window container in the direction of an adjacent monitor
Options:
-h, --help
Print help (see a summary with '-h')
```

16
docs/cli/cycle-focus.md Normal file
View File

@@ -0,0 +1,16 @@
# cycle-focus
```
Change focus to the window in the specified cycle direction
Usage: komorebic.exe cycle-focus <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

16
docs/cli/cycle-layout.md Normal file
View File

@@ -0,0 +1,16 @@
# cycle-layout
```
Cycle between available layouts
Usage: komorebic.exe cycle-layout <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

16
docs/cli/cycle-monitor.md Normal file
View File

@@ -0,0 +1,16 @@
# cycle-monitor
```
Focus the monitor in the given cycle direction
Usage: komorebic.exe cycle-monitor <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# cycle-move-to-monitor
```
Move the focused window to the monitor in the given cycle direction
Usage: komorebic.exe cycle-move-to-monitor <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# cycle-move-to-workspace
```
Move the focused window to the workspace in the given cycle direction
Usage: komorebic.exe cycle-move-to-workspace <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# cycle-move-workspace-to-monitor
```
Move the focused workspace monitor in the given cycle direction
Usage: komorebic.exe cycle-move-workspace-to-monitor <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

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

@@ -0,0 +1,16 @@
# cycle-move
```
Move the focused window in the specified cycle direction
Usage: komorebic.exe cycle-move <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# cycle-send-to-monitor
```
Send the focused window to the monitor in the given cycle direction
Usage: komorebic.exe cycle-send-to-monitor <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,16 @@
# cycle-send-to-workspace
```
Send the focused window to the workspace in the given cycle direction
Usage: komorebic.exe cycle-send-to-workspace <CYCLE_DIRECTION>
Arguments:
<CYCLE_DIRECTION>
[possible values: previous, next]
Options:
-h, --help
Print help
```

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, path]
<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
```

12
docs/cli/global-state.md Normal file
View File

@@ -0,0 +1,12 @@
# global-state
```
Show a JSON representation of the current global state
Usage: komorebic.exe global-state
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,25 @@
# global-work-area-offset
```
Set offsets to exclude parts of the work area from tiling
Usage: komorebic.exe global-work-area-offset <LEFT> <TOP> <RIGHT> <BOTTOM>
Arguments:
<LEFT>
Size of the left work area offset (set right to left * 2 to maintain right padding)
<TOP>
Size of the top work area offset (set bottom to the same value to maintain bottom padding)
<RIGHT>
Size of the right work area offset
<BOTTOM>
Size of the bottom work area offset
Options:
-h, --help
Print help
```

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

@@ -0,0 +1,12 @@
# gui
```
Launch the komorebi-gui debugging tool
Usage: komorebic.exe gui
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# identify-layered-application
```
Identify an application that has WS_EX_LAYERED, but should still be managed
Usage: komorebic.exe identify-layered-application <IDENTIFIER> <ID>
Arguments:
<IDENTIFIER>
[possible values: exe, class, title, path]
<ID>
Identifier as a string
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# identify-object-name-change-application
```
Identify an application that sends EVENT_OBJECT_NAMECHANGE on launch
Usage: komorebic.exe identify-object-name-change-application <IDENTIFIER> <ID>
Arguments:
<IDENTIFIER>
[possible values: exe, class, title, path]
<ID>
Identifier as a string
Options:
-h, --help
Print help
```

View File

@@ -0,0 +1,19 @@
# identify-tray-application
```
Identify an application that closes to the system tray
Usage: komorebic.exe identify-tray-application <IDENTIFIER> <ID>
Arguments:
<IDENTIFIER>
[possible values: exe, class, title, path]
<ID>
Identifier as a string
Options:
-h, --help
Print help
```

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, path]
<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, path]
<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, path]
<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,19 @@
# move-to-monitor-workspace
```
Move the focused window to the specified monitor workspace
Usage: komorebic.exe move-to-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
```

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, right-main-vertical-stack]
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, right-main-vertical-stack]
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, path]
<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
```

View File

@@ -0,0 +1,16 @@
# promote-window
```
Promote the window in the specified direction
Usage: komorebic.exe promote-window <OPERATION_DIRECTION>
Arguments:
<OPERATION_DIRECTION>
[possible values: left, right, up, down]
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
```

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