Compare commits

..

No commits in common. "7e42ab3f4f6995f8632f9c8f30474ff069794fb7" and "0d3cf443d907fa672e21286e9aaba6f54790c1bb" have entirely different histories.

3 changed files with 18 additions and 22 deletions

View File

@ -46,7 +46,6 @@ static const unsigned int alphas[][3] = {
/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static const char *alttags[] = { "<01>", "<02>", "<03>", "<04>", "<05>" };
static const Rule rules[] = {
/* xprop(1):

View File

@ -19,13 +19,13 @@ static int smartgaps =
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = {
"DepartureMono Nerd Font:size=13:antialias=true:autohint=true"};
"SauceCodePro Nerd Font:size=12:antialias=true:autohint=true"};
static const char dmenufont[] =
"SauceCodePro Nerd Font:size=10:antialias=true:autohint=true";
static const char col_gray1[] = "#191919";
static const char col_gray2[] = "#3d3839";
static const char col_gray3[] = "#B4bdc3";
static const char col_gray4[] = "#3d3839";
static const char col_gray4[] = "#8e8e8e";
static const char col_cyan[] = "#6099C0";
static const char col_green[] = "#819b69";
static const char col_red[] = "#de6e76";
@ -63,8 +63,7 @@ static const unsigned int alphas[][3] = {
[SchemeUrgent] = {OPAQUE, baralpha, borderalpha}};
/* tagging */
static const char *tags[] = {"", "", "", "", "", ""};
static const char *alttags[] = {"", "", "", "", "", ""};
static const char *tags[] = {"󰭹", "", "󰈙", "󰏘", "", ""};
static const Rule rules[] = {
/* xprop(1):
@ -108,7 +107,7 @@ static const Rule rules[] = {
};
/* layout(s) */
static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints =
0; /* 1 means respect size hints in tiled resizals */
@ -118,10 +117,10 @@ static const int resizehints =
static const Layout layouts[] = {
/* symbol arrange function */
{"󰋁", tile}, /* first entry is default */
{"", NULL}, /* no layout function means floating behavior */
{"", monocle},
{"󰘹", deck},
{"[]=", tile}, /* first entry is default */
{"><>", NULL}, /* no layout function means floating behavior */
{"[M]", monocle},
{"H[]", deck},
};
/* key definitions */

22
dwm.c
View File

@ -552,7 +552,7 @@ void unswallow(Client *c) {
}
void buttonpress(XEvent *e) {
unsigned int i, x, click, occ;
unsigned int i, x, click;
Arg arg = {0};
Client *c;
Monitor *m;
@ -566,13 +566,9 @@ void buttonpress(XEvent *e) {
focus(NULL);
}
if (ev->window == selmon->barwin) {
i = x = occ = 0;
/* Bitmask of occupied tags */
for (c = m->clients; c; c = c->next)
occ |= c->tags;
i = x = 0;
do
x += TEXTW(occ & 1 << i ? alttags[i] : tags[i]);
x += TEXTW(tags[i]);
while (ev->x >= x && ++i < LENGTH(tags));
if (i < LENGTH(tags)) {
click = ClkTagBar;
@ -845,7 +841,6 @@ void drawbar(Monitor *m) {
int boxs = drw->fonts->h / 9;
int boxw = drw->fonts->h / 6 + 2;
unsigned int i, occ = 0, urg = 0;
const char *tagtext;
char *ts = stext;
char *tp = stext;
int tx = 0;
@ -894,15 +889,18 @@ void drawbar(Monitor *m) {
}
x = 0;
for (i = 0; i < LENGTH(tags); i++) {
tagtext = occ & 1 << i ? alttags[i] : tags[i];
w = TEXTW(tagtext);
w = TEXTW(tags[i]);
drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeTagsSel
: SchemeTagsNorm]);
drw_text(drw, x, 0, w, bh, lrpad / 2, tagtext, urg & 1 << i);
drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
if (occ & 1 << i)
drw_rect(drw, x + boxs, boxs, boxw, boxw,
m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
urg & 1 << i);
x += w;
}
w = blw = TEXTW(m->ltsymbol);
drw_setscheme(drw, scheme[SchemeTagsSel]);
drw_setscheme(drw, scheme[SchemeTagsNorm]);
static char text[MAX_LINE_LENGTH];
strcpy(text, exec_command_last_line(center_command));
int center_length = TEXTW(text);