Commit Graph

9 Commits

Author SHA1 Message Date
LGUG2Z
b6ff862705 feat(ahk): add config watching + reloading cmds
Adds two new commands that enable the manual reloading of an AHK config
file in the default location and the watching and automatic reloading of
an AHK config file in the default location.
2021-08-15 14:26:46 -07:00
LGUG2Z
91ddb2c22b feat(ahk): autoload config on start
When AutoHotKey is detected, and %USERPROFILE%\komorebi.ahk exists,
komorebi.exe will now try to run the ahk script after starting the
command listener.

For this to work smoothly, it is important to set the #SingleInstance
directive to Force in komorebi.ahk, which will ensure that duplicates of
the script are not run, and a new version of the script is loaded
without displaying a GUI confirmation prompt.

resolve #3
2021-08-14 07:53:40 -07:00
LGUG2Z
0d3751a7cc refactor(wm): reduce boilerplate with getset
This commit introduces the getset crate to reduce a lot of the
boilerplate, especially in workspace.rs, around different variations of
getters. Hopefully this will make the codebase easier to navigate for
contributors in the future.

Also trying to avoid pinning to patch versions and minor versions
wherever possible.
2021-08-13 10:38:11 -07:00
LGUG2Z
579a5556cc refactor(ring): gen element impls using macro
Using macros to generate common type-specific Ring element accessors.
Should make codebase navigation a little easier my making logic-heavy
functions more visible in impl blocks.
2021-08-10 08:10:56 -07:00
LGUG2Z
8b4ce48a66 feat(wm): add container resizing
The last remaining feature to bring komorebi to feature parity with
yatta. Implementing this in komorebi was a lot harder because I had to
make sure that resizing worked even when the layout is flipped (in any
one of the three possible ways).

In yatta, resize dimension information was stored on the window. In
komorebi, I initially tried storing this information on the Container
itself, but eventually decided to store it for all Containers in the
Workspace.

There is some additional work required to ensure that this Vec is kept
up to date whenever containers are added or destroyed, but it all seems
to be working fairly well.

I got rid of the iterative fibonacci code that I adapted from leftwm and
went back and reworked the recursive code that I was using in yatta
(originally from umberwm I think) to integrate layout flipping. At least
for me, it is much easier to reason about.
2021-08-08 23:04:35 -07:00
LGUG2Z
77aa4c0d21 feat(debug): track and hard-restore hwnds
This stores a constantly updated list of known HWNDs at
~/komorebi.hwnd.json which can be used to restore windows that may
disappear into a permanently hidden state during development using a new
'restore-windows' command with komorebic.
2021-08-05 11:36:07 -07:00
LGUG2Z
230b534735 feat(wm): add query command to cli
Added a query command to komorebic to return the WindowManager struct
serialized to JSON to help with debugging and maybe help others to build
tools like stackline for yabai in the future.
2021-07-30 14:11:09 -07:00
LGUG2Z
b0c3480262 fix(wm): float/monocle toggle, invisible borders
This commit fixes issues with toggling on and off Monocle and Floating
Window mode by ensuring that the relevant windows are always at the top
of the Z order, and in the latter case, ensuring that the top visible
window is used to search the local floating window state of the process.

After some experimenting I seem to have been able to adjust to remove
all of the invisible window borders by default, so if desired, a user
can now have no gaps at all.

Also upgraded to the latest version of the windows-rs crate since I saw
it was available. Thankfully no breaking changes.
2021-07-30 10:44:31 -07:00
LGUG2Z
61cee458a1 feat(wm): initial commit
One week of blissful, in-the-zone coding, applying all of the lessons
learnt from the development of yatta.
2021-07-29 16:23:42 -07:00