bakkeby / dwm-flexipatch

A dwm build with preprocessor directives to decide which patches to include during build time
MIT License
1.15k stars 235 forks source link

awesomebar cuts off dwmblocks status #367

Open EnterTheVoid-x86 opened 1 year ago

EnterTheVoid-x86 commented 1 year ago

Look in the top right, there is supposed to be a memory counter and on normal dwm it shows "1.5G/31G", but on awesomebar + dwmblocks it shows "1G"

2023-08-08-173557_1920x1080_scrot

bakkeby commented 1 year ago

Can't replicate with the awesomebar nor with the winicon patch enabled.

Looking at the screenshot it looks like you have a standalone systray (e.g. stalonetray) that is placed on top of the bar.

image

If that is the case then it suggests that the power symbol on the right hand side of the systray is also part of the status (likely with spaces in between). The power symbol itself also suggests that you are likely also using mouse click hooks.

It is odd that you have that much leading blank space before the 1G.

If you can give a list of other patches that you have enabled then I can check if I spot any conflicts.

EnterTheVoid-x86 commented 1 year ago

Sure, here's my patches.h file.

patches.h (discord link)

EnterTheVoid-x86 commented 1 year ago

I also have a source code repo, and the power icon actually isn't part of the status command. That is a modified statusbutton patch with icons on the left and right

bakkeby commented 1 year ago

So these are the toggles that you have enabled:

$ grep -E "#define .* 1$" patches.h
#define BAR_AWESOMEBAR_PATCH 1
#define BAR_LTSYMBOL_PATCH 1
#define BAR_POWERLINE_STATUS_PATCH 1
#define BAR_TAGPREVIEW_PATCH 1
#define BAR_STATUS_PATCH 1
#define BAR_STATUSBUTTON_PATCH 1
#define BAR_STATUS2D_XRDB_TERMCOLORS_PATCH 1
#define BAR_SYSTRAY_PATCH 1
#define BAR_TAGS_PATCH 1
#define BAR_WINICON_PATCH 1
#define BAR_WINTITLE_PATCH 1
#define ALT_TAB_PATCH 1
#define AUTOSTART_PATCH 1
#define XRDB_PATCH 1
#define MONOCLE_LAYOUT 1

Notably you have BAR_POWERLINE_STATUS_PATCH enabled, which will use control characters to determine the colour scheme to use for each segment of the status.

If using the powerline patch and we run the following command to set the status to "hello world" then the status will be empty because there are no powerline separators defined in the status text.

xsetroot -name "hello world"

If we run the following command to set your memory counter we get that /3 is matched to create a diagonal powerline separator and only "1G" remains.

xsetroot -name "1.5G/31G"

I don't see a way to escape the <, >, / and \ symbols used by this patch.

Unless you actually need the powerline status I'd recommend just disabling it.

EnterTheVoid-x86 commented 1 year ago

Thanks for the advice, I'll try this out soon.