add underline tags
This commit is contained in:
parent
6e501c133c
commit
694c55c704
2 changed files with 36 additions and 27 deletions
18
config.def.h
18
config.def.h
|
|
@ -3,16 +3,16 @@
|
||||||
#include <X11/XF86keysym.h>
|
#include <X11/XF86keysym.h>
|
||||||
|
|
||||||
/* appearance */
|
/* appearance */
|
||||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
static const unsigned int borderpx = 3; /* border pixel of windows */
|
||||||
static const unsigned int snap = 32; /* snap pixel */
|
static const unsigned int snap = 32; /* snap pixel */
|
||||||
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
|
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
|
||||||
static const unsigned int systrayspacing = 2; /* systray spacing */
|
static const unsigned int systrayspacing = 4; /* systray spacing */
|
||||||
static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, 0: display systray on the last monitor*/
|
static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, 0: display systray on the last monitor*/
|
||||||
static const int showsystray = 1; /* 0 means no systray */
|
static const int showsystray = 1; /* 0 means no systray */
|
||||||
static const int swallowfloating = 0; /* 1 means swallow floating windows by default */
|
static const int swallowfloating = 0; /* 1 means swallow floating windows by default */
|
||||||
static const int swterminheritfs = 1; /* 1 terminal inherits fullscreen on unswallow, 0 otherwise */
|
static const int swterminheritfs = 1; /* 1 terminal inherits fullscreen on unswallow, 0 otherwise */
|
||||||
static const unsigned int gappih = 15; /* horiz inner gap between windows */
|
static const unsigned int gappih = 20; /* horiz inner gap between windows */
|
||||||
static const unsigned int gappiv = 15; /* vert inner gap between windows */
|
static const unsigned int gappiv = 20; /* vert inner gap between windows */
|
||||||
static const unsigned int gappoh = 10; /* horiz outer gap between windows and screen edge */
|
static const unsigned int gappoh = 10; /* horiz outer gap between windows and screen edge */
|
||||||
static const unsigned int gappov = 5; /* vert outer gap between windows and screen edge */
|
static const unsigned int gappov = 5; /* vert outer gap between windows and screen edge */
|
||||||
static int smartgaps = 0; /* 1 means no outer gap when there is only one window */
|
static int smartgaps = 0; /* 1 means no outer gap when there is only one window */
|
||||||
|
|
@ -30,7 +30,7 @@ static const char col_cyan[] = "#005577";
|
||||||
static const char *colors[][3] = {
|
static const char *colors[][3] = {
|
||||||
/* fg bg border */
|
/* fg bg border */
|
||||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||||
[SchemeSel] = { col_gray4, col_gray2, col_cyan },
|
[SchemeSel] = { col_gray3, col_gray1, col_gray4 },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *const autostart[] = {
|
static const char *const autostart[] = {
|
||||||
|
|
@ -41,6 +41,11 @@ static const char *const autostart[] = {
|
||||||
/* tagging */
|
/* tagging */
|
||||||
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "0" };
|
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "0" };
|
||||||
|
|
||||||
|
static const unsigned int ulinepad = 5; /* horizontal padding between the underline and tag */
|
||||||
|
static const unsigned int ulinestroke = 2; /* thickness / height of the underline */
|
||||||
|
static const unsigned int ulinevoffset = 0; /* how far above the bottom of the bar the line should appear */
|
||||||
|
static const int ulineall = 0; /* 1 to show underline on all tags, 0 for just the active ones */
|
||||||
|
|
||||||
static const Rule rules[] = {
|
static const Rule rules[] = {
|
||||||
/* xprop(1):
|
/* xprop(1):
|
||||||
* WM_CLASS(STRING) = instance, class
|
* WM_CLASS(STRING) = instance, class
|
||||||
|
|
@ -48,7 +53,8 @@ static const Rule rules[] = {
|
||||||
*/
|
*/
|
||||||
/* class instance title tags mask isfloating isterminal noswallow monitor */
|
/* class instance title tags mask isfloating isterminal noswallow monitor */
|
||||||
{ "Gimp", NULL, NULL, 0, 1, 0, 0, -1 },
|
{ "Gimp", NULL, NULL, 0, 1, 0, 0, -1 },
|
||||||
{ "Firefox", NULL, NULL, 1 << 8, 0, 0, -1, -1 },
|
// { "Firefox", NULL, NULL, 1 << 8, 0, 0, -1, -1 },
|
||||||
|
{ "wezterm", NULL, NULL, 0, 0, 1, 0, -1 },
|
||||||
{ "St", NULL, NULL, 0, 0, 1, 0, -1 },
|
{ "St", NULL, NULL, 0, 0, 1, 0, -1 },
|
||||||
{ NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */
|
{ NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */
|
||||||
};
|
};
|
||||||
|
|
|
||||||
3
dwm.c
3
dwm.c
|
|
@ -947,6 +947,9 @@ drawbar(Monitor *m)
|
||||||
w = TEXTW(tags[i]);
|
w = TEXTW(tags[i]);
|
||||||
drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
|
drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
|
||||||
drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
|
drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
|
||||||
|
if (ulineall || m->tagset[m->seltags] & 1 << i) /* if there are conflicts, just move these lines directly underneath both 'drw_setscheme' and 'drw_text' :) */
|
||||||
|
drw_rect(drw, x + ulinepad, bh - ulinestroke - ulinevoffset, w - (ulinepad * 2), ulinestroke, 1, 0);
|
||||||
|
|
||||||
x += w;
|
x += w;
|
||||||
}
|
}
|
||||||
w = TEXTW(m->ltsymbol);
|
w = TEXTW(m->ltsymbol);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue