neeasade / dotfiles

garden
http://noriceno.life
MIT License
383 stars 13 forks source link

bspwm double borders script doesn't work #15

Closed BillyTheMotherBoard closed 5 years ago

BillyTheMotherBoard commented 5 years ago

Hello man, first of all, thank you for providing this bspwm script to get double borders: https://github.com/neeasade/dotfiles/blob/master/wm/.wm/scripts/visual/2bspwm

I need to replicate double borders setup but I run into an issue when I modify the size of the borders, for example I tried increasing the value of outer borders but this didn't have any effect; this being said when I play with inner borders this works.

But as you can see here: https://i.redd.it/ppyjvxe5t7y01.png I need the outer border to be way bigger than the inner, now i'm stuck i don't know how to solve this... did you run into it too?

Thanks for reading man ;)

neeasade commented 5 years ago

I need to replicate double borders setup but I run into an issue when I modify the size of the borders

This is set outside of this script -- with bspc config border_width -- you can add a call bspc config border_width $((inWidthNormal+outWidthNormal)) before the subscribe to conform the borders to your entered width.

I will refactor that script to simplify it a bit, but I hope that makes sense.

neeasade commented 5 years ago

updated the script to be a little more opinionated -- you can now just take it and tweak the knobs at the top and get what you want.

BillyTheMotherBoard commented 5 years ago

updated the script to be a little more opinionated -- you can now just take it and tweak the knobs at the top and get what you want. Awesome man thank you for updating the script now I can use it, if you want to improve it I can give you a feedback:

when running it from a terminal I get this output: /home/hustler/Documents/Scripts/main//2bspwm: line 18: type: greaten: not found which doesn't affect the script in the sense that it still works but you might want to fix it, I guess it's related to the form of the path, see there are two // instead of one maybe it's the issue.

Second thing I noticed is that when switching from a window to another, I find it isn't fluent when updating borders colors (focused to normal and reverse) at least not like native bspwm borders, it looks like there is a 0.3sec retard between the drawing of double borders on native ones, I don't know if you get what I mean ahah neither if you can fix it.

Anyway thank you !!

neeasade commented 5 years ago

which doesn't affect the script in the sense that it still works

yepp, that's printing to stderr/is intented noise when you don't have greaten/colort -- it's ok though it's optional, you can rmove that whole section to silence it

Second thing I noticed is that when switching from a window to another, I find it isn't fluent when updating borders colors (focused to normal and reverse) at least not like native bspwm borders, I don't know if you get what I mean ahah neither if you can fix it.

yepp, there is not a way to disable bspwm's initial border draw currently. would need to add that as an option via PR/fork bspwm.

BillyTheMotherBoard commented 5 years ago

which doesn't affect the script in the sense that it still works

yepp, that's printing to stderr/is intented noise when you don't have greaten/colort -- it's ok though it's optional, you can rmove that whole section to silence it

Second thing I noticed is that when switching from a window to another, I find it isn't fluent when updating borders colors (focused to normal and reverse) at least not like native bspwm borders, I don't know if you get what I mean ahah neither if you can fix it.

yepp, there is not a way to disable bspwm's initial border draw currently. would need to add that as an option via PR/fork bspwm.

oh alright, do you use the script yourself? I will ask the dev of bspwm to add the double borders feature

neeasade commented 5 years ago

oh alright, do you use the script yourself?

yepp, I just live with the double draw/or only use for screenshots

BillyTheMotherBoard commented 5 years ago

oh alright, do you think it would be technically possible to implement it natively into bspwm?

neeasade commented 5 years ago

of course, but whether or not it is wanted/gets merged in is another matter.

I would think the path of least resistance is either a config toggle to disable border drawing, or a way to unmap windows. I'm unsure (there are a number of feature requests regarding window decorations adjacent to this discussion, and I'm not sure @baskerville thinks they fit into the scope of bspwm/if there is a flexible way to do so that they find fitting)

BillyTheMotherBoard commented 5 years ago

of course, but whether or not it is wanted/gets merged in is another matter.

I would think the path of least resistance is either a config toggle to disable border drawing, or a way to unmap windows. I'm unsure (there are a number of feature requests regarding window decorations adjacent to this discussion, and I'm not sure @baskerville thinks they fit into the scope of bspwm/if there is a flexible way to do so that they find fitting)

Well can you make the script independent of bspc config border_width so we can try to set this to 0 and give directly numerical values to chwb2?

Or does it draw on already existing borders and this is not possible?

neeasade commented 5 years ago

Or does it draw on already existing borders and this is not possible?

right, the existing border pixelmap, controlled by bspwm

BillyTheMotherBoard commented 5 years ago

so there is no solution to disable bspwm to natively draw borders but keep the bspc config border_width value?

Maybe we could add rules to URxvt firefox etc windows where we disable borders so chwb2 will draw on them without native bspwm interfer with it? I couldn't find how to add a rule to set the border to 0

neeasade commented 5 years ago

so there is no solution to disable bspwm to natively draw borders but keep the bspc config border_width value?

correct, which is why you can implement this option in bspwm if you want it

Maybe we could add rules to URxvt firefox etc windows where we disable borders so chwb2 will draw on them without native bspwm interfer with it? I couldn't find how to add a rule to set the border to 0

a border set in this way would be the same border, leaving nothing to draw on

BillyTheMotherBoard commented 5 years ago

ahah I see, I'm not able to implement this option myself due to skills and time issue, it's for this I asked the devs if they could do it :)

m-col commented 5 years ago

I started a branch for double borders on a fork of bspwm if you want to try it. On my system it works well... most of the time. It glitches out when resizing and things like that, and solving this isn't as simple as it is for chwb2, where you would just make it listen to all the different bspwm events.

I basically copied parts from chwb2 and put them as close as I could to where bspwm draws its borders to try and reduce the delay. (Note: I started learning C just for this purpose so it will be messy!)

m-col commented 5 years ago

If I remember correctly (haven't looked in a few days) you need to set these settings (which should add up)

bspc config border_width 8 bspc config border_width_in 4 bspc config border_width_out 4

At the minute the two borders are each half the width of the configured border_width. I was planning to remove the 'in' settings to just have normal and optional outside borders. I would be interested in feedback or ideas to improve it, if this is of interest to anyone.