diff options
author | Joe <rbo@gmx.us> | 2025-02-28 21:32:59 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2025-02-28 21:32:59 +0100 |
commit | 3907db06dd2648cb37b297bde5e97d19f1e99f76 (patch) | |
tree | c08db34a8843b89c0cb1916a0538ce37d2b86004 | |
parent | swallowd (diff) | |
download | dwl-3907db06dd2648cb37b297bde5e97d19f1e99f76.tar.gz dwl-3907db06dd2648cb37b297bde5e97d19f1e99f76.tar.bz2 dwl-3907db06dd2648cb37b297bde5e97d19f1e99f76.tar.xz dwl-3907db06dd2648cb37b297bde5e97d19f1e99f76.tar.zst dwl-3907db06dd2648cb37b297bde5e97d19f1e99f76.zip |
underlined
-rw-r--r-- | config.def.h | 13 | ||||
-rw-r--r-- | dwl.c | 2 |
2 files changed, 11 insertions, 4 deletions
diff --git a/config.def.h b/config.def.h index 1c875f6..fad8785 100644 --- a/config.def.h +++ b/config.def.h @@ -35,6 +35,11 @@ static char *tags[] = { " " }; +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 */ + /* logging */ static int log_level = WLR_ERROR; @@ -134,10 +139,10 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA #define METAKEY WLR_MODIFIER_ALT #define TAGKEYS(KEY,SKEY,TAG) \ - { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ - { MODKEY|WLR_MODIFIER_CTRL, KEY, toggleview, {.ui = 1 << TAG} }, \ - { MODKEY|WLR_MODIFIER_SHIFT, SKEY, tag, {.ui = 1 << TAG} }, \ - { MODKEY|WLR_MODIFIER_CTRL|WLR_MODIFIER_SHIFT,SKEY,toggletag, {.ui = 1 << TAG} } + { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ + { MODKEY|WLR_MODIFIER_ALT|WLR_MODIFIER_CTRL, KEY, toggleview, {.ui = 1 << TAG} }, \ + { MODKEY|WLR_MODIFIER_SHIFT, SKEY, tag, {.ui = 1 << TAG} }, \ + { MODKEY|WLR_MODIFIER_ALT, KEY, toggletag, {.ui = 1 << TAG} } /* helper for spawning shell commands in the pre dwm-5.0 fashion */ #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } @@ -1599,6 +1599,8 @@ drawbar(Monitor *m) w = TEXTW(m, tags[i]); drwl_setscheme(m->drw, colors[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]); drwl_text(m->drw, x, 0, w, m->b.height, m->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 'dr w_text' :) */ + drwl_rect(m->drw, x + ulinepad, m->b.height - ulinestroke - ulinevoffset, w - (ulinepad * 2), ulinestroke, 1, 0); if (occ & 1 << i) drwl_rect(m->drw, x + boxs, boxs, boxw, boxw, m == selmon && c && c->tags & 1 << i, |