[FEAT]: different active window border style #239

Closed
opened 2026-01-05 14:49:13 +01:00 by adam · 6 comments
Owner

Originally created by @thearturca on GitHub (Aug 29, 2023).

Is your feature request related to a problem? Please describe.
First of all thank you for great WM that I use every day. It helps my orginize things on desktop. I love it, especially in combination with yasb.
I searched issues and discussions but didnt find answer for my question.
Can komorebi have ability to choose border-style. Currently I'm using border width 16 to fill the gaps between border and actual window. If I set smaller width, like 4 or 8 it start showing gaps between window and border.

What Im using - border width 32

image

I have problem with that - border width 6

image

Describe the solution you'd like
I want to choose border position style like in Figma or smth (Outside, Inside, Center).
Currently I see it works like Inside border and starts with gap from window. I requesting Outside border style. Dont know about implementation, but border could be behind window and growing outside like in next image.

What I expect to see in komorebi - border width 4 (or 6)

Group 68

Maybe komorebi have something like that but I missed it in docs and Issues.

Originally created by @thearturca on GitHub (Aug 29, 2023). **Is your feature request related to a problem? Please describe.** First of all thank you for great WM that I use every day. It helps my orginize things on desktop. I love it, especially in combination with yasb. I searched issues and discussions but didnt find answer for my question. Can komorebi have ability to choose border-style. Currently I'm using border width 16 to fill the gaps between border and actual window. If I set smaller width, like 4 or 8 it start showing gaps between window and border. ## What Im using - border width 32 ![image](https://github.com/LGUG2Z/komorebi/assets/74871489/9b7df655-b6d2-469b-bc42-8c4ab1da26bb) ## I have problem with that - border width 6 ![image](https://github.com/LGUG2Z/komorebi/assets/74871489/b7f8c297-93e4-4998-8685-917ac34bad67) **Describe the solution you'd like** I want to choose border position style like in Figma or smth (Outside, Inside, Center). Currently I see it works like Inside border and starts with gap from window. I requesting Outside border style. Dont know about implementation, but border could be behind window and growing outside like in next image. ## What I expect to see in komorebi - border width 4 (or 6) ![Group 68](https://github.com/LGUG2Z/komorebi/assets/74871489/99285f1e-0e8f-4fd7-97ff-b38d7cdf73ea) Maybe komorebi have something like that but I missed it in docs and Issues.
adam added the enhancement label 2026-01-05 14:49:13 +01:00
adam closed this issue 2026-01-05 14:49:13 +01:00
Author
Owner

@thearturca commented on GitHub (Sep 12, 2023):

I see the technology behind border drawing. Its GDI pen drswing in WM_PAINT callback of the border window, which doesn't have pen alignment property. But in GDI+ you have SetAlignment for pen.
I could implement that, but I need to learn rust an figured out where the GDI+ bindings in windows-rs if they are exists.
Or I have to go even deeper and learn Direct2D or something like that.

@thearturca commented on GitHub (Sep 12, 2023): I see the technology behind border drawing. Its GDI pen drswing in WM_PAINT callback of the border window, which doesn't have pen alignment property. But in GDI+ you have SetAlignment for pen. I could implement that, but I need to learn rust an figured out where the GDI+ bindings in windows-rs if they are exists. Or I have to go even deeper and learn Direct2D or something like that.
Author
Owner

@LGUG2Z commented on GitHub (Sep 12, 2023):

I think that you're looking for this command to compensate for the gaps between the border and the window when changing the active window border width:

❯ komorebic active-window-border-offset
Set the offset for the active window border

Usage: komorebic.exe active-window-border-offset <OFFSET>

Arguments:
  <OFFSET>  Desired offset of the active window border

Options:
  -h, --help  Print help
@LGUG2Z commented on GitHub (Sep 12, 2023): I think that you're looking for this command to compensate for the gaps between the border and the window when changing the active window border width: ``` ❯ komorebic active-window-border-offset Set the offset for the active window border Usage: komorebic.exe active-window-border-offset <OFFSET> Arguments: <OFFSET> Desired offset of the active window border Options: -h, --help Print help ```
Author
Owner

@cloudUser98 commented on GitHub (Sep 18, 2023):

I think that you're looking for this command to compensate for the gaps between the border and the window when changing the active window border width:

❯ komorebic active-window-border-offset
Set the offset for the active window border

Usage: komorebic.exe active-window-border-offset <OFFSET>

Arguments:
  <OFFSET>  Desired offset of the active window border

Options:
  -h, --help  Print help

For me the offset option is taking in consideration the window padding so there is still a gap between the actual window and the border.

image

@cloudUser98 commented on GitHub (Sep 18, 2023): > I think that you're looking for this command to compensate for the gaps between the border and the window when changing the active window border width: > > ``` > ❯ komorebic active-window-border-offset > Set the offset for the active window border > > Usage: komorebic.exe active-window-border-offset <OFFSET> > > Arguments: > <OFFSET> Desired offset of the active window border > > Options: > -h, --help Print help > ``` For me the offset option is taking in consideration the window padding so there is still a gap between the actual window and the border. ![image](https://github.com/LGUG2Z/komorebi/assets/109044519/3ddeefbb-9d19-4570-8725-33d23f2c0cfe)
Author
Owner

@thearturca commented on GitHub (Sep 18, 2023):

I think that you're looking for this command to compensate for the gaps between the border and the window when changing the active window border width:

❯ komorebic active-window-border-offset
Set the offset for the active window border

Usage: komorebic.exe active-window-border-offset <OFFSET>

Arguments:
  <OFFSET>  Desired offset of the active window border

Options:
  -h, --help  Print help

For me the offset option is taking in consideration the window padding so there is still a gap between the actual window and the border.

image

Hello
You can set negative offset to clear the gaps between window and border. It looks like this:
image
There is no gaps except the corners of window. Here still some gaps but they are not noticeable.

That's my current config for border

komorebic active-window-border-width 11
komorebic active-window-border-offset -- -3
komorebic active-window-border-colour 66 165 245 --window-kind single
komorebic active-window-border-colour 256 165 66 --window-kind stack
komorebic active-window-border-colour 255 51 153 --window-kind monocle
komorebic active-window-border enable

Idk maybe should close this issue? Because negative offset kind of solves original issue. Just need add some info in docs that you can set negative offset

@thearturca commented on GitHub (Sep 18, 2023): > > I think that you're looking for this command to compensate for the gaps between the border and the window when changing the active window border width: > > ``` > > ❯ komorebic active-window-border-offset > > Set the offset for the active window border > > > > Usage: komorebic.exe active-window-border-offset <OFFSET> > > > > Arguments: > > <OFFSET> Desired offset of the active window border > > > > Options: > > -h, --help Print help > > ``` > > For me the offset option is taking in consideration the window padding so there is still a gap between the actual window and the border. > > ![image](https://user-images.githubusercontent.com/109044519/268747925-3ddeefbb-9d19-4570-8725-33d23f2c0cfe.png) Hello You can set negative offset to clear the gaps between window and border. It looks like this: ![image](https://github.com/LGUG2Z/komorebi/assets/74871489/70bdb070-accc-4cf8-bd0e-cd505f76ee51) There is no gaps except the corners of window. Here still some gaps but they are not noticeable. That's my current config for border ``` komorebic active-window-border-width 11 komorebic active-window-border-offset -- -3 komorebic active-window-border-colour 66 165 245 --window-kind single komorebic active-window-border-colour 256 165 66 --window-kind stack komorebic active-window-border-colour 255 51 153 --window-kind monocle komorebic active-window-border enable ``` Idk maybe should close this issue? Because negative offset kind of solves original issue. Just need add some info in docs that you can set negative offset
Author
Owner

@LGUG2Z commented on GitHub (Sep 21, 2023):

I was about to create a tutorial video for setting negative offsets today when I noticed that the static config options for setting the border width and offsets unfortunately leak and implementation detail which means that the offset option takes a Rect instead of a signed integer. I'll fix this for the next release, and then it should be possible to set the negative offsets with a single signed integer value directly in the static config file too.

@LGUG2Z commented on GitHub (Sep 21, 2023): I was about to create a tutorial video for setting negative offsets today when I noticed that the static config options for setting the border width and offsets unfortunately leak and implementation detail which means that the `offset` option takes a `Rect` instead of a signed integer. I'll fix this for the next release, and then it should be possible to set the negative offsets with a single signed integer value directly in the static config file too.
Author
Owner

@LGUG2Z commented on GitHub (Sep 22, 2023):

Video of me working on this here: https://www.youtube.com/watch?v=nsJz4KJrBsA

From v0.1.19, in the static config file, border_width and border_offset will be deprecated and users will be directed by the documentation to use active_window_border_width and active_window_border_offset, both of which share the same names as, and take the same arguments as the corresponding komorebic commands!

@LGUG2Z commented on GitHub (Sep 22, 2023): Video of me working on this here: https://www.youtube.com/watch?v=nsJz4KJrBsA From v0.1.19, in the static config file, `border_width` and `border_offset` will be deprecated and users will be directed by the documentation to use `active_window_border_width` and `active_window_border_offset`, both of which share the same names as, and take the same arguments as the corresponding `komorebic` commands!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#239