Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions src/archy_dwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,12 +641,9 @@ void drawbar(Monitor *m) {
if (showsystray && m == systraytomon(m) && !systrayonleft)
stw = getsystraywidth();

/* draw status first so it can be overdrawn by tags later */
if (m == selmon) { /* status is only drawn on selected monitor */
drw_setscheme(drw, scheme[SchemeNorm]);
tw = TEXTW(stext) - lrpad / 2 + 2; /* 2px extra right padding */
drw_text(drw, m->ww - tw - stw, 0, tw, bh, lrpad / 2 - 2, stext, 0);
}
char *mstext;
char *rstext;
int msx;

resizebarwin(m);
for (c = m->clients; c; c = c->next) {
Expand All @@ -670,9 +667,19 @@ void drawbar(Monitor *m) {
drw_setscheme(drw, scheme[SchemeNorm]);
x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);

if ((w = m->ww - tw - stw - x) > bh) {
drw_setscheme(drw, scheme[SchemeNorm]);
drw_rect(drw, x, 0, w, bh, 1, 1);
drw_setscheme(drw, scheme[SchemeNorm]);
drw_rect(drw, x, 0, m->ww - x, bh, 1, 1);

if (m == selmon) { /* status is only drawn on selected monitor */
rstext = strdup(stext);
if (splitstatus) {
mstext = strsep(&rstext, splitdelim);
msx = (m->ww - TEXTW(mstext) + lrpad) /
2; /* x position of middle status text */
drw_text(drw, msx, 0, TEXTW(mstext) - lrpad, bh, 0, mstext, 0);
}
tw = TEXTW(rstext) - lrpad + 2; /* 2px right padding */
drw_text(drw, m->ww - tw, 0, tw, bh, 0, rstext, 0);
}
drw_map(drw, m->barwin, 0, 0, m->ww - stw, bh);
}
Expand Down
8 changes: 5 additions & 3 deletions src/config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ static const unsigned int systrayspacing = 2; /* systray spacing */
static const int systraypinningfailfirst =
1; /* 1: if pinning fails, display systray on the first monitor, False:
display systray on the last monitor*/
static const int showsystray = 1; /* 0 means no systray */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 0; /* 0 means bottom bar */
static const int showsystray = 1; /* 0 means no systray */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 0; /* 0 means bottom bar */
static const int splitstatus = 1; /* 1 for split status items */
static const char *splitdelim = ";"; /* Character used for separating status */
static const char *fonts[] = {
"monospace:size=6", "Noto Color Emoji:size=7",
"Nerd Font Mono:size=10:antialias=true:hinting=true"};
Expand Down