xtheme - bar single background color support

This commit is contained in:
GasparVardanyan 2024-09-01 20:46:34 +04:00
parent 3dce0b2892
commit 4dcaf1426d
3 changed files with 14 additions and 1 deletions

View file

@ -1,9 +1,17 @@
/* See LICENSE file for copyright and license details. */
# ifdef BARSINGLEBG
# error (conflicting macro names)
# endif // BARSINGLEBG
/* theme management */
# include "theme_beg.h" /* this is a compile-time generated header file */
# include "theme.h"
# if DWM_BARSINGLEBG == 1
# define BARSINGLEBG
# endif
/* appearance */
static const unsigned int borderpx = DWM_BORDERPX; /* border pixel of windows */
static const unsigned int snap = DWM_SNAP; /* snap pixel */

6
dwm.c
View file

@ -762,7 +762,11 @@ drawbar(Monitor *m)
if ((w = m->ww - tw - x) > bh) {
if (m->sel) {
drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
# ifdef BARSINGLEBG
drw_setscheme(drw, scheme[SchemeNorm]);
# else
drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
# endif // BARSINGLEBG
drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
if (m->sel->isfloating)
drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);

View file

@ -1,5 +1,6 @@
| TYPE | RESOURCE | DEFAULT VALUE | [ALTERNATIVE RESOURCE] |
|:---------:|:-----------------:|:---------------------:|:-------------------------:|
| B | barSingleBg | 0 | |
| U | borderpx | 1 | |
| U | snap | 32 | |
| I | showbar | 1 | |