mirror of
https://git.suckless.org/dwm
synced 2024-12-27 03:16:32 +00:00
removed monsyms, useless
This commit is contained in:
parent
5e408d8ff6
commit
565050ac51
2 changed files with 3 additions and 15 deletions
|
@ -13,9 +13,6 @@ static const unsigned int snap = 32; /* snap pixel */
|
||||||
static const Bool showbar = True; /* False means no bar */
|
static const Bool showbar = True; /* False means no bar */
|
||||||
static const Bool topbar = True; /* False means bottom bar */
|
static const Bool topbar = True; /* False means bottom bar */
|
||||||
|
|
||||||
/* monitor(s) symbols */
|
|
||||||
static const char *monsyms[] = { "<1>", "<2>", "<3>", "<4>" };
|
|
||||||
|
|
||||||
/* tagging */
|
/* tagging */
|
||||||
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||||
|
|
||||||
|
|
15
dwm.c
15
dwm.c
|
@ -123,7 +123,7 @@ typedef struct {
|
||||||
struct Monitor {
|
struct Monitor {
|
||||||
int screen_number;
|
int screen_number;
|
||||||
float mfact;
|
float mfact;
|
||||||
int by, btx; /* bar geometry */
|
int by; /* bar geometry */
|
||||||
int mx, my, mw, mh; /* screen size */
|
int mx, my, mw, mh; /* screen size */
|
||||||
int wx, wy, ww, wh; /* window area */
|
int wx, wy, ww, wh; /* window area */
|
||||||
unsigned int seltags;
|
unsigned int seltags;
|
||||||
|
@ -409,9 +409,8 @@ buttonpress(XEvent *e) {
|
||||||
selmon = m;
|
selmon = m;
|
||||||
focus(NULL);
|
focus(NULL);
|
||||||
}
|
}
|
||||||
if(ev->window == selmon->barwin && ev->x >= selmon->btx) {
|
if(ev->window == selmon->barwin) {
|
||||||
i = 0;
|
i = x = 0;
|
||||||
x = selmon->btx;
|
|
||||||
do
|
do
|
||||||
x += TEXTW(tags[i]);
|
x += TEXTW(tags[i]);
|
||||||
while(ev->x >= x && ++i < LENGTH(tags));
|
while(ev->x >= x && ++i < LENGTH(tags));
|
||||||
|
@ -652,12 +651,6 @@ drawbar(Monitor *m) {
|
||||||
urg |= c->tags;
|
urg |= c->tags;
|
||||||
}
|
}
|
||||||
dc.x = 0;
|
dc.x = 0;
|
||||||
if(mons->next) { /* more than a single monitor */
|
|
||||||
dc.w = TEXTW(monsyms[m->screen_number]);
|
|
||||||
drawtext(monsyms[m->screen_number], selmon == m ? dc.sel : dc.norm, False);
|
|
||||||
dc.x += dc.w;
|
|
||||||
}
|
|
||||||
m->btx = dc.x;
|
|
||||||
for(i = 0; i < LENGTH(tags); i++) {
|
for(i = 0; i < LENGTH(tags); i++) {
|
||||||
dc.w = TEXTW(tags[i]);
|
dc.w = TEXTW(tags[i]);
|
||||||
col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm;
|
col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm;
|
||||||
|
@ -1690,8 +1683,6 @@ updategeom(void) {
|
||||||
if(XineramaIsActive(dpy))
|
if(XineramaIsActive(dpy))
|
||||||
info = XineramaQueryScreens(dpy, &n);
|
info = XineramaQueryScreens(dpy, &n);
|
||||||
#endif /* XINERAMA */
|
#endif /* XINERAMA */
|
||||||
if(n > LENGTH(monsyms))
|
|
||||||
n = LENGTH(monsyms);
|
|
||||||
/* allocate monitor(s) for the new geometry setup */
|
/* allocate monitor(s) for the new geometry setup */
|
||||||
for(i = 0; i < n; i++) {
|
for(i = 0; i < n; i++) {
|
||||||
if(!(m = (Monitor *)malloc(sizeof(Monitor))))
|
if(!(m = (Monitor *)malloc(sizeof(Monitor))))
|
||||||
|
|
Loading…
Reference in a new issue