Compare commits
2 Commits
0d3cf443d9
...
7e42ab3f4f
Author | SHA1 | Date | |
---|---|---|---|
7e42ab3f4f | |||
9e64cf1ef2 |
@ -46,6 +46,7 @@ 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):
|
||||
|
17
config.h
17
config.h
@ -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[] = {
|
||||
"SauceCodePro Nerd Font:size=12:antialias=true:autohint=true"};
|
||||
"DepartureMono Nerd Font:size=13: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[] = "#8e8e8e";
|
||||
static const char col_gray4[] = "#3d3839";
|
||||
static const char col_cyan[] = "#6099C0";
|
||||
static const char col_green[] = "#819b69";
|
||||
static const char col_red[] = "#de6e76";
|
||||
@ -63,7 +63,8 @@ static const unsigned int alphas[][3] = {
|
||||
[SchemeUrgent] = {OPAQUE, baralpha, borderalpha}};
|
||||
|
||||
/* tagging */
|
||||
static const char *tags[] = {"", "", "", "", "", ""};
|
||||
static const char *tags[] = {"", "", "", "", "", ""};
|
||||
static const char *alttags[] = {"", "", "", "", "", ""};
|
||||
|
||||
static const Rule rules[] = {
|
||||
/* xprop(1):
|
||||
@ -107,7 +108,7 @@ static const Rule rules[] = {
|
||||
};
|
||||
|
||||
/* layout(s) */
|
||||
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
|
||||
static const float mfact = 0.50; /* 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 */
|
||||
@ -117,10 +118,10 @@ static const int resizehints =
|
||||
|
||||
static const Layout layouts[] = {
|
||||
/* symbol arrange function */
|
||||
{"[]=", tile}, /* first entry is default */
|
||||
{"><>", NULL}, /* no layout function means floating behavior */
|
||||
{"[M]", monocle},
|
||||
{"H[]", deck},
|
||||
{"", tile}, /* first entry is default */
|
||||
{"", NULL}, /* no layout function means floating behavior */
|
||||
{"", monocle},
|
||||
{"", deck},
|
||||
};
|
||||
|
||||
/* key definitions */
|
||||
|
22
dwm.c
22
dwm.c
@ -552,7 +552,7 @@ void unswallow(Client *c) {
|
||||
}
|
||||
|
||||
void buttonpress(XEvent *e) {
|
||||
unsigned int i, x, click;
|
||||
unsigned int i, x, click, occ;
|
||||
Arg arg = {0};
|
||||
Client *c;
|
||||
Monitor *m;
|
||||
@ -566,9 +566,13 @@ void buttonpress(XEvent *e) {
|
||||
focus(NULL);
|
||||
}
|
||||
if (ev->window == selmon->barwin) {
|
||||
i = x = 0;
|
||||
i = x = occ = 0;
|
||||
/* Bitmask of occupied tags */
|
||||
for (c = m->clients; c; c = c->next)
|
||||
occ |= c->tags;
|
||||
|
||||
do
|
||||
x += TEXTW(tags[i]);
|
||||
x += TEXTW(occ & 1 << i ? alttags[i] : tags[i]);
|
||||
while (ev->x >= x && ++i < LENGTH(tags));
|
||||
if (i < LENGTH(tags)) {
|
||||
click = ClkTagBar;
|
||||
@ -841,6 +845,7 @@ 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;
|
||||
@ -889,18 +894,15 @@ void drawbar(Monitor *m) {
|
||||
}
|
||||
x = 0;
|
||||
for (i = 0; i < LENGTH(tags); i++) {
|
||||
w = TEXTW(tags[i]);
|
||||
tagtext = occ & 1 << i ? alttags[i] : tags[i];
|
||||
w = TEXTW(tagtext);
|
||||
drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeTagsSel
|
||||
: SchemeTagsNorm]);
|
||||
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);
|
||||
drw_text(drw, x, 0, w, bh, lrpad / 2, tagtext, urg & 1 << i);
|
||||
x += w;
|
||||
}
|
||||
w = blw = TEXTW(m->ltsymbol);
|
||||
drw_setscheme(drw, scheme[SchemeTagsNorm]);
|
||||
drw_setscheme(drw, scheme[SchemeTagsSel]);
|
||||
static char text[MAX_LINE_LENGTH];
|
||||
strcpy(text, exec_command_last_line(center_command));
|
||||
int center_length = TEXTW(text);
|
||||
|
Loading…
x
Reference in New Issue
Block a user