bakkeby / dwm-flexipatch

A dwm build with preprocessor directives to decide which patches to include during build time

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`setborderpx` patch does not work with `pertag`

vishalbalaji opened this issue · comments

I noticed that the setborderpx patch does not respect the pertag patch. I have been searching around for a potential solution for this, but I haven't noticed any issues or discussions surrounding it.

I am not very familiar with suckless code, but looking into setborderpx.c, I noticed that the border width was being handled on a per-client basis and not a per-tag basis. Is this why this hasn't been handled yet?

The setborderpx patch allows for the border width for clients on a monitor to be adjusted during runtime, which will affect the border width of new clients.

Additionally it will loop through all existing clients and adjust the border width accordingly.

The primary incentive for changing the border width is in multi-monitor setups where screens have different DPI, and some people prefer to adjust the border width so that they look roughly the same on both monitors.

Having a different border width per tag does not make much sense in this context as the tags will be on the same monitor.

But let's say that you were to implement that by storing and restoring m->borderpx whenever you switch tags.

You would also need to change the setborderpx function to only update the clients that are visible.

Now you have another problem where if you move a window to another tag then the border width may be wrong, so you would need to ensure that the border width of the client is changed to respect the border width of the destination tag. This would involve anything that moves clients around, and there are many places where a client may change tags.

A separate and jarring effect is that if you view more than one tag then you would have clients shown with different border widths. If you wanted to address that then you may need to apply the border width every time you change the view.

A similar issue is when moving a window from one monitor to another.

Overall it may be easier to refer to the monitor borderpx rather than c->bw in both resizeclient and configure.

My use case for something like this would be to have a fullscreen with multiple windows, sort of like a zen mode. I'm not sure if any of the current patches do it, so my solution was to disable the bar, gaps and borders to achieve this.

I didn't realize that the complexity for this went this deep though. Anyway, thanks a lot for replying. I will close this issue now.

I see. I think what you did by hiding the bar and toggling off gaps is the way to go here.

Possibly toggleborder might be of use. As is it only applies to the selected client, but can be changed to make it apply to all visible clients.