Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature(wm)/stop ignore restore #1186

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

alex-ds13
Copy link
Contributor

@alex-ds13 alex-ds13 commented Dec 17, 2024

This PR creates a new SocketMessage called StopIgnoreRestore which makes komorebi stop without calling window.restore() on all windows. This way every maximized window will stay maximized once you start komorebi again and it is able to use the previous State.

If it fails to restore the previous state you might have to call komorebic restore-windows in case you had hidden windows, for example when when using the window_hiding_behaviour as Hide, or you can simply unminimize them if you were using Cloak or Minimize.

This PR is built on top #1185 so it needs to be merged after that one.

@LGUG2Z I've made this just a draft PR so you can give me your feedback and tell me if you think it's fine to add or if you rather not add it to not increase complexity just to appease the needs of one person (that one person being me 😄). I don't think users can use this to shoot themselves on the foot because even if they are using window_hiding_behaviour as Hide they can always call komorebic restore-windows afterwards if for some reason komorebi fails to load their previous State.
Also this command is mostly intended for developers that are making changes to komorebi code and need to be restarting it a lot of times.
However I totally understand if you think it's better not to add it. In that case I might keep rebasing this commit on top of master just for me... 😄

komorebic/src/main.rs Outdated Show resolved Hide resolved
@alex-ds13 alex-ds13 force-pushed the feat(wm)/stop-ignore-restore branch from 0c9b3e8 to 580d1d6 Compare December 17, 2024 23:26
@alex-ds13 alex-ds13 marked this pull request as ready for review December 17, 2024 23:36
This commit creates a new `SocketMessage` called `StopIgnoreRestore`
which makes komorebi stop without calling `window.restore()` on all
windows. This way every maximized window will stay maximized once you
start komorebi again and it is able to use the previous `State`.

If it fails to restore the previous state you might have to call
`komorebic restore-windows` in case you had hidden windows, for example
when when using the `window_hiding_behaviour` as `Hide`, or you can
simply unminimize them if you were using `Cloak` or `Minimize`.
@alex-ds13 alex-ds13 force-pushed the feat(wm)/stop-ignore-restore branch from 580d1d6 to 19581d0 Compare December 18, 2024 09:19
@LGUG2Z LGUG2Z merged commit f089d3e into LGUG2Z:master Dec 18, 2024
6 checks passed
@alex-ds13 alex-ds13 deleted the feat(wm)/stop-ignore-restore branch December 18, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants