LukeSmithxyz / dwmblocks

My status bar: my build of the modular dwmblocks
GNU General Public License v2.0
430 stars 368 forks source link

How to change size of dwmblock #71

Closed divyangchauhan closed 2 years ago

divyangchauhan commented 3 years ago

How can I change size of dwmblock?

ghost commented 3 years ago

Since dwmblocks sends the status bar text to dwm which in turn draws it on the screen, it's not a question of how you change the size of dwmblocks but it is about changing the size of dwm's statusbar.

You can either change the size of the bar by changing the font size in dwm's config.h. e.g: static const char *fonts[] = { "monospace:size=10" }; in which you would change 10 to a higher value for a larger bar, or a lower value for a smaller bar

Or if you want to change the size of the bar without changing the size of the text you could use the statuspadding patch: https://dwm.suckless.org/patches/statuspadding/

This patch adds the following configuration options: static const int horizpadbar = 2; /* horizontal padding for statusbar */ static const int vertpadbar = 0; /* vertical padding for statusbar */

I would leave horizpadbar as it is since increasing it will increase the padding of the tag buttons, but you can increase vertpadbar to increase the bar's height, I personally have it set to 10.

If you have any more questions feel free to ask

Edit: fix code formatting