[FEAT]: using monitor width dynamically in komorebic-bar #512

Closed
opened 2026-01-05 14:51:12 +01:00 by adam · 4 comments
Owner

Originally created by @azinsharaf on GitHub (Nov 4, 2024).

Sponsorship Information

GitHub Sponsors

Suggestion

can komorebi-bar detect the monitor width dynamically and set the position > end > x from it? I have two monitors with different sizes at home (x=5140) and work (x=3410) and the bar doesn't fit correctly when i switch to another.

Alternatives Considered

i change the width manually when i go to the office.

Originally created by @azinsharaf on GitHub (Nov 4, 2024). ### Sponsorship Information GitHub Sponsors ### Suggestion can komorebi-bar detect the monitor width dynamically and set the `position > end > x` from it? I have two monitors with different sizes at home (x=5140) and work (x=3410) and the bar doesn't fit correctly when i switch to another. ### Alternatives Considered i change the width manually when i go to the office.
adam added the enhancementi-will-not-work-on-thiskomorebi-bar labels 2026-01-05 14:51:13 +01:00
adam closed this issue 2026-01-05 14:51:13 +01:00
Author
Owner

@jklasdjklasdc commented on GitHub (Dec 6, 2024):

if using an ahk configuration you can do

CompleteConfiguration()
WinWait("komorebi-bar")
WinMove(0, 0, A_ScreenWidth, 40, "ahk_exe komorebi-bar.exe")

to resize it to screen width and just replace the 40 with the desired height

@jklasdjklasdc commented on GitHub (Dec 6, 2024): if using an ahk configuration you can do CompleteConfiguration() WinWait("komorebi-bar") WinMove(0, 0, A_ScreenWidth, 40, "ahk_exe komorebi-bar.exe") to resize it to screen width and just replace the 40 with the desired height
Author
Owner

@LGUG2Z commented on GitHub (Jan 23, 2025):

@CtByte @alex-ds13 I think this is done with the latest config changes, right?

@LGUG2Z commented on GitHub (Jan 23, 2025): @CtByte @alex-ds13 I think this is done with the latest config changes, right?
Author
Owner

@CtByte commented on GitHub (Jan 23, 2025):

I have "same-size dual-monitor" setup and an issue I had with my 2nd bar disappearing on hot-reload is fixed by #1224
I am not sure if the bars resize auto-magically if you simply put your laptop to sleep and wake it up with different monitors. That might needs a restart.

@LGUG2Z @alex-ds13 There might be a way to detect if the monitor settings change and auto-reload the bars.

@azinsharaf I think you might need to read the PR's description, since you can now remove most of the location and size related settings.

Could you test your setup with the latest? (or just wait for a nightly/full release)

@CtByte commented on GitHub (Jan 23, 2025): I have "same-size dual-monitor" setup and an issue I had with my 2nd bar disappearing on hot-reload is fixed by #1224 I am not sure if the bars resize auto-magically if you simply put your laptop to sleep and wake it up with different monitors. That might needs a restart. @LGUG2Z @alex-ds13 There might be a way to detect if the monitor settings change and auto-reload the bars. @azinsharaf I think you might need to read the PR's description, since you can now remove most of the location and size related settings. Could you test your setup with the [latest](https://github.com/LGUG2Z/komorebi/actions/runs/12922372998)? (or just wait for a nightly/full release)
Author
Owner

@alex-ds13 commented on GitHub (Jan 23, 2025):

@CtByte @alex-ds13 I think this is done with the latest config changes, right?

It should be done automatically yes.

I am not sure if the bars resize auto-magically if you simply put your laptop to sleep and wake it up with different monitors. That might needs a restart.

For this comment ^ from @CtByte, this might actually be an issue since it would require applying the config again after a monitor change... I'm not sure if we can detect this, but if we can then it should be easy to pass it to the bar like we did with the komorebi reconnect.

@alex-ds13 commented on GitHub (Jan 23, 2025): > [@CtByte](https://github.com/CtByte) [@alex-ds13](https://github.com/alex-ds13) I think this is done with the latest config changes, right? It should be done automatically yes. > I am not sure if the bars resize auto-magically if you simply put your laptop to sleep and wake it up with different monitors. That might needs a restart. For this comment ^ from @CtByte, this might actually be an issue since it would require applying the config again after a monitor change... I'm not sure if we can detect this, but if we can then it should be easy to pass it to the bar like we did with the komorebi reconnect.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#512