Xinqi Bao's Git
projects
/
dwm.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
5e408d8
)
removed monsyms, useless
author
Anselm R Garbe <
[email protected]
>
Thu, 9 Jul 2009 10:29:01 +0000
(11:29 +0100)
committer
Anselm R Garbe <
[email protected]
>
Thu, 9 Jul 2009 10:29:01 +0000
(11:29 +0100)
config.def.h
patch
|
blob
|
history
dwm.c
patch
|
blob
|
history
diff --git
a/config.def.h
b/config.def.h
index
4dfc11b
..
f0e44a7
100644
(file)
--- a/
config.def.h
+++ b/
config.def.h
@@
-13,9
+13,6
@@
static const unsigned int snap = 32; /* snap pixel */
static const Bool showbar = True; /* False means no bar */
static const Bool topbar = True; /* False means bottom bar */
static const Bool showbar = True; /* False means no bar */
static const Bool topbar = True; /* False means bottom bar */
-/* monitor(s) symbols */
-static const char *monsyms[] = { "<1>", "<2>", "<3>", "<4>" };
-
/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
diff --git
a/dwm.c
b/dwm.c
index
fa5fdea
..
07d0d36
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-123,7
+123,7
@@
typedef struct {
struct Monitor {
int screen_number;
float mfact;
struct Monitor {
int screen_number;
float mfact;
- int by
, btx;
/* bar geometry */
+ int by
;
/* bar geometry */
int mx, my, mw, mh; /* screen size */
int wx, wy, ww, wh; /* window area */
unsigned int seltags;
int mx, my, mw, mh; /* screen size */
int wx, wy, ww, wh; /* window area */
unsigned int seltags;
@@
-409,9
+409,8
@@
buttonpress(XEvent *e) {
selmon = m;
focus(NULL);
}
selmon = m;
focus(NULL);
}
- if(ev->window == selmon->barwin && ev->x >= selmon->btx) {
- i = 0;
- x = selmon->btx;
+ if(ev->window == selmon->barwin) {
+ i = x = 0;
do
x += TEXTW(tags[i]);
while(ev->x >= x && ++i < LENGTH(tags));
do
x += TEXTW(tags[i]);
while(ev->x >= x && ++i < LENGTH(tags));
@@
-652,12
+651,6
@@
drawbar(Monitor *m) {
urg |= c->tags;
}
dc.x = 0;
urg |= c->tags;
}
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++) {
dc.w = TEXTW(tags[i]);
col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm;
for(i = 0; i < LENGTH(tags); i++) {
dc.w = TEXTW(tags[i]);
col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm;
@@
-1690,8
+1683,6
@@
updategeom(void) {
if(XineramaIsActive(dpy))
info = XineramaQueryScreens(dpy, &n);
#endif /* XINERAMA */
if(XineramaIsActive(dpy))
info = XineramaQueryScreens(dpy, &n);
#endif /* XINERAMA */
- if(n > LENGTH(monsyms))
- n = LENGTH(monsyms);
/* allocate monitor(s) for the new geometry setup */
for(i = 0; i < n; i++) {
if(!(m = (Monitor *)malloc(sizeof(Monitor))))
/* allocate monitor(s) for the new geometry setup */
for(i = 0; i < n; i++) {
if(!(m = (Monitor *)malloc(sizeof(Monitor))))