Closed plasmoduck closed 3 years ago
Have a look at the bar indicators, in particular the drawstateindicator
function:
https://github.com/bakkeby/dwm-flexipatch/blob/master/patch/bar_indicators.c#L96-L108
at the bottom there is this check to draw the floating indicator when the client is floating:
if (c->isfloating)
drawindicator(m, c, occ, x, y, w, h, tag, filled, invert, floatindicatortype);
you can just add an else here to draw the slim bottom bar when the client is tiled
if (c->isfloating)
drawindicator(m, c, occ, x, y, w, h, tag, filled, invert, floatindicatortype);
else
drawindicator(m, c, occ, x, y, w, h, tag, filled, invert, INDICATOR_BOTTOM_BAR_SLIM);
(I guess preferably setting that indicator as a tiledindicatortype
variable in your config.h, which you could default to INDICATOR_NONE in config.def.h)
That's awesome thanks mate
Hey man, how can I do this using my branch https://github.com/plasmoduck/modwm2/ I dont have the same code as your newer version to do that, so how can I make it so the indicator for all window types is the same instead of different in my version? I want to use BOTTOM_BAR_SLIM
Hi @plasmoduck,
In your build you have this right: https://github.com/plasmoduck/modwm2/blob/0797fff84f9ae64ea80899d16acbb468c9ff37cc/patch/bar_wintitle.c#L41-L42
There should be two lines like that in every module that handles client titles, so update the one you happen to use (fancybar, awesomebar, bartabgroups, etc.)
Those two lines is then simply replaced with: https://github.com/bakkeby/dwm-flexipatch/blob/251e3a23de3f2826baad6f1187b4f48351742b0b/patch/bar_wintitle.c#L41
the function being called is a new one that you can copy-paste into your own build (remember to update the header file as well). https://github.com/bakkeby/dwm-flexipatch/blob/251e3a23de3f2826baad6f1187b4f48351742b0b/patch/bar_indicators.c#L96-L110
The tiledindicatortype
config defaults to no indicator in config.def.h.
https://github.com/bakkeby/dwm-flexipatch/blob/master/config.def.h#L66-L69
I guess in your case you'll want both tiledindicatortype
and floatindicatortype
to be set to INDICATOR_BOTTOM_BAR_SLIM.
Alternatively, if you are not fuzzed about being able to configure this, then you could just drop the if (c->isfloating)
part of the statement and leave the call to draw the floating indicator regardless of whether the window is floating or not.
That's awesome! Thanks man, I done it pretty easy!
Hey, I use this for my floating windows indicator type. static int floatindicatortype = INDICATOR_BOTTOM_BAR_SLIM;
My question is, how can I make this the indicator type for normal tiled windows? I quite like the look of it like a border.