[dwm] Blank tags
Make tags blank and move the indicator to the middle. It's like blank keycaps.
This commit is contained in:
parent
2be92f1fb9
commit
3f5e6526f4
@ -4,6 +4,10 @@ My build of dwm.
|
||||
center
|
||||
|
||||
swallow
|
||||
|
||||
combo
|
||||
|
||||
blank tags (my own edit)
|
||||
## Installation
|
||||
Clone the repo.
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
#include <X11/XF86keysym.h>
|
||||
|
||||
/* appearance */
|
||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||
static const unsigned int snap = 32; /* snap pixel */
|
||||
@ -26,7 +28,7 @@ static const char *colors[][3] = {
|
||||
};
|
||||
|
||||
/* tagging */
|
||||
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||
static const char *tags[] = { " ", " ", " ", " ", " ", " ", " ", " ", " " };
|
||||
|
||||
static const Rule rules[] = {
|
||||
/* xprop(1):
|
||||
@ -69,7 +71,7 @@ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn()
|
||||
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, "-n", NULL };
|
||||
static const char *termcmd[] = { "st", NULL };
|
||||
static const char *suspendcmd[] = { "systemctl", "suspend", NULL };
|
||||
static const char *browsercmd[] = { "qutebrowser", NULL };
|
||||
static const char *browsercmd[] = { "librewolf", NULL };
|
||||
static const char *scrotcmd[] = {".local/bin/screenshot.sh"};
|
||||
static const char *scrotscmd[] = {".local/bin/screenshot-save.sh"};
|
||||
static const char *lockcmd[] = { "slock" };
|
||||
@ -87,6 +89,17 @@ static const Key keys[] = {
|
||||
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
||||
{ MODKEY|ShiftMask, XK_s, spawn, {.v = suspendcmd } },
|
||||
{ MODKEY|ShiftMask, XK_b, spawn, {.v = browsercmd } },
|
||||
{ MODKEY|ShiftMask, XK_l, spawn, {.v = lockcmd } },
|
||||
{ 0, XK_Print, spawn, {.v = scrotcmd } },
|
||||
{ ShiftMask, XK_Print, spawn, {.v = scrotscmd } },
|
||||
{ 0, XF86XK_AudioStop, spawn, {.v = stopcmd } },
|
||||
{ 0, XF86XK_AudioNext, spawn, {.v = next } },
|
||||
{ 0, XF86XK_AudioPrev, spawn, {.v = prev } },
|
||||
{ 0, XF86XK_AudioPlay, spawn, {.v = play } },
|
||||
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = downvol } },
|
||||
{ 0, XF86XK_AudioMute, spawn, {.v = mutevol } },
|
||||
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = upvol } },
|
||||
{ MODKEY, XK_b, togglebar, {0} },
|
||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||
|
@ -792,11 +792,11 @@ drawbar(Monitor *m)
|
||||
}
|
||||
x = 0;
|
||||
for (i = 0; i < LENGTH(tags); i++) {
|
||||
w = TEXTW(tags[i]);
|
||||
w = boxw*4;
|
||||
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);
|
||||
if (occ & 1 << i)
|
||||
drw_rect(drw, x + boxs, boxs, boxw, boxw,
|
||||
drw_rect(drw, x+boxw,boxw*1, w-boxw*2, w-boxw*2,
|
||||
m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
|
||||
urg & 1 << i);
|
||||
x += w;
|
||||
|
Loading…
Reference in New Issue
Block a user