35 Commits

Author SHA1 Message Date
LGUG2Z
6e36b81669 build(nix): add flake.nix for cross-compilation from darwin and linux
I was getting really tired of having to switch between display inputs to
different platform-specific machines to be able to make and test changes
on komorebi for Windows and komorebi for Mac.

With this commit, the `flake.nix` provides a Nix devShell and crane
build for users to make and validate changes with `cargo check`, `cargo
clippy` and `cargo build` with the Windows MSVC toolchain on Linux and
macOS.
2025-12-28 17:24:41 -08:00
LGUG2Z
ff4187aecf chore(dev): begin v0.1.40-dev 2025-12-14 14:07:44 -08:00
LGUG2Z
c8c4c3507c chore(deps): handle egui-related upgrades 2025-11-12 16:20:19 -08:00
LGUG2Z
1c23439f95 chore(deps): bump egui and eframe to 0.32 2025-09-30 18:30:04 -07:00
LGUG2Z
80877cc449 refactor(rust): upgrade to edition 2024 part 1 2025-09-24 11:09:08 -07:00
LGUG2Z
539aeec965 refactor(rust): remove getset dependency 2025-09-20 14:34:19 -07:00
LGUG2Z
e07b464b0d chore(dev): begin 0.1.39-dev 2025-09-20 12:59:09 -07:00
LGUG2Z
eec6312a51 chore(dev): begin v0.1.38-dev 2025-05-17 20:26:13 -07:00
LGUG2Z
6a10d583a6 build(cargo): propagate expensive schemars feature correctly 2025-05-11 20:00:15 -07:00
LGUG2Z
a8b02f40fd chore(dev): begin 0.1.37-dev 2025-04-13 09:38:12 -07:00
alex-ds13
58730b81b4 feat(gui): add floating and locked border colours 2025-04-01 05:53:33 -07:00
LGUG2Z
edf1943157 chore(dev): begin v0.1.36-dev 2025-03-22 12:14:43 -07:00
dependabot[bot]
c48e1db0ff chore(deps): bump random_word from 0.4.3 to 0.5.0
Bumps [random_word](https://github.com/MitchellRhysHall/random_word) from 0.4.3 to 0.5.0.
- [Commits](https://github.com/MitchellRhysHall/random_word/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-10 08:32:59 -07:00
LGUG2Z
8bc04f0610 chore(deps): bump windows-rs from 0.58 to 0.60 2025-02-21 20:16:50 -08:00
LGUG2Z
c903cdbb75 chore(dev): begin v0.1.35-dev 2025-02-20 19:31:27 -08:00
LGUG2Z
83114ed3e7 chore(deps): cargo update 2025-02-03 19:21:46 -08:00
LGUG2Z
b451df0379 chore(dev): begin v0.1.34-dev 2025-01-11 15:06:50 -08:00
LGUG2Z
5a8f48c6b9 chore(dev): begin v0.1.33-dev 2025-01-03 18:20:23 -08:00
LGUG2Z
6c07863b81 chore(dev): begin v0.1.32-dev 2024-12-14 08:53:42 -08:00
LGUG2Z
d55d356b37 chore(dev): begin v0.1.31-dev 2024-11-04 07:58:49 -08:00
LGUG2Z
6f27de8e5c chore(deps): bump eframe from 0.28 to 0.29 2024-10-13 10:05:11 -07:00
LGUG2Z
a1f1be0afe chore(dev): begin v0.1.30-dev 2024-09-28 11:50:25 -07:00
LGUG2Z
ddb600f745 chore(deps): bump windows-rs from 0.57 to 0.58
Not a huge fan of these updates in the windows-rs crate which swap the
isize values which were previously wrapped in various handles with *mut
core::ffi:c_void pointers.

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

Going forward any pub fn in WindowsApi should prefer isize over Windows
handles which wrap c_void pointers.
2024-09-25 18:25:03 -07:00
LGUG2Z
360d0915a1 refactor(deps): unify versions across workspace pkgs 2024-09-19 21:33:03 -07:00
LGUG2Z
7653495e31 chore(dev): begin v0.1.29-dev 2024-07-15 17:11:35 -07:00
LGUG2Z
0cdce8fc2a chore(release): v0.1.28 2024-07-15 08:59:42 -07:00
LGUG2Z
e2f2d6b919 feat(animation): add window animations
Work on this feature was first started by @thearturca in November 2023
before komorebi v0.1.21 in #597 and has undergone numerous revisions
to reach the point of this commit.

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

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

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

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

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

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

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

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

Need review and testings

refactor(animation): avoid unwrap
(fa6d5bbc77c1882f85ee1ce73733ff7e53b39eaa)

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

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

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

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

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

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

This fixes a bug when windows get shunk during the animation
2024-07-10 13:28:31 -07:00
dependabot[bot]
5b997b6ea6 chore(deps): bump eframe from 0.27.2 to 0.28.1
Bumps [eframe](https://github.com/emilk/egui) from 0.27.2 to 0.28.1.
- [Release notes](https://github.com/emilk/egui/releases)
- [Changelog](https://github.com/emilk/egui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/emilk/egui/compare/0.27.2...0.28.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-08 19:27:30 -07:00
LGUG2Z
9a65a4ae92 chore(dev): begin v0.1.28-dev 2024-06-20 20:26:07 -07:00
LGUG2Z
a511cbd263 chore(release): v0.1.27 2024-06-19 14:52:54 -07:00
LGUG2Z
03fdbea5cd refactor(ahk): remove derive-ahk and references
This commit finally sunsets the derive-ahk proc macro and the
ahk-library cli command.

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

This commit also fixes some clippy lints and adds some allow
annotations.
2024-05-23 19:00:46 -07:00
LGUG2Z
e46a0757e3 chore(dev): begin v0.1.27-dev 2024-05-23 16:53:57 -07:00
LGUG2Z
3556f38469 chore(release): v0.1.26 2024-05-22 15:36:20 -07:00
LGUG2Z
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