summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@wmii.de>2006-07-14 10:34:07 +0200
committerAnselm R. Garbe <garbeam@wmii.de>2006-07-14 10:34:07 +0200
commit6458d72572a30d2cc4af3385755033b2cca93057 (patch)
tree158be70ab7a84b729a66f0532c08aa7b336db217
parentimplemented bar for dwm (I miss status text), I plan that status text is read... (diff)
downloaddwm-6458d72572a30d2cc4af3385755033b2cca93057.tar.gz
dwm-6458d72572a30d2cc4af3385755033b2cca93057.zip
made barclick to select the specific tag
-rw-r--r--bar.c14
-rw-r--r--dwm.13
-rw-r--r--dwm.h1
-rw-r--r--dwm.html16
-rw-r--r--event.c4
-rw-r--r--main.c2
6 files changed, 36 insertions, 4 deletions
diff --git a/bar.c b/bar.c
index 9914e56..ea4b946 100644
--- a/bar.c
+++ b/bar.c
@@ -6,6 +6,20 @@
6#include "dwm.h" 6#include "dwm.h"
7 7
8void 8void
9barclick(XButtonPressedEvent *e)
10{
11 int x = 0;
12 Arg a;
13 for(a.i = 0; a.i < TLast; a.i++) {
14 x += textw(tags[a.i]) + dc.font.height;
15 if(e->x < x) {
16 view(&a);
17 return;
18 }
19 }
20}
21
22void
9draw_bar() 23draw_bar()
10{ 24{
11 int i; 25 int i;
diff --git a/dwm.1 b/dwm.1
index e205e05..95a5d3a 100644
--- a/dwm.1
+++ b/dwm.1
@@ -12,6 +12,9 @@ is a dynamic window manager for X11.
12.TP 12.TP
13.B \-v 13.B \-v
14prints version information to stdout, then exits. 14prints version information to stdout, then exits.
15.SS Status text
16.B dwm
17reads from stdin to display status text if provided.
15.SS Default Key Bindings 18.SS Default Key Bindings
16.TP 16 19.TP 16
17.I Key 20.I Key
diff --git a/dwm.h b/dwm.h
index 1f8283c..5d7ff1a 100644
--- a/dwm.h
+++ b/dwm.h
@@ -103,6 +103,7 @@ extern Client *clients, *sel;
103 103
104/* bar.c */ 104/* bar.c */
105extern void draw_bar(); 105extern void draw_bar();
106extern void barclick(XButtonPressedEvent *e);
106 107
107/* client.c */ 108/* client.c */
108extern void manage(Window w, XWindowAttributes *wa); 109extern void manage(Window w, XWindowAttributes *wa);
diff --git a/dwm.html b/dwm.html
index d1602fb..2efdebd 100644
--- a/dwm.html
+++ b/dwm.html
@@ -39,7 +39,7 @@
39 </p> 39 </p>
40 <ul> 40 <ul>
41 <li> 41 <li>
42 dwm has no 9P support, no status bar, no menu, no editable tagbars, 42 dwm has no 9P support, no menu, no editable tagbars,
43 no shell-based configuration and remote control and comes without 43 no shell-based configuration and remote control and comes without
44 any additional tools like printing the selection or warping the 44 any additional tools like printing the selection or warping the
45 mouse. 45 mouse.
@@ -69,6 +69,11 @@
69 clients. 69 clients.
70 </li> 70 </li>
71 <li> 71 <li>
72 dwm reads from <b>stdin</b> to print arbirary status text (like the
73 date, load, battery charge). That's much simpler than larsremote,
74 wmiir and what not...
75 </li>
76 <li>
72 garbeam <b>does not</b> want any feedback to dwm. If you ask for support, 77 garbeam <b>does not</b> want any feedback to dwm. If you ask for support,
73 feature requests, or if you report bugs, they will be <b>ignored</b> 78 feature requests, or if you report bugs, they will be <b>ignored</b>
74 with a high chance. dwm is only intended to fit garbeams needs. 79 with a high chance. dwm is only intended to fit garbeams needs.
@@ -87,6 +92,13 @@
87 <p> 92 <p>
88 <code>hg clone http://wmii.de/cgi-bin/hgwebdir.cgi/dwm</code> 93 <code>hg clone http://wmii.de/cgi-bin/hgwebdir.cgi/dwm</code>
89 </p> 94 </p>
90 <p>--Anselm (20060713)</p> 95 <h3>Download</h3>
96 <p>There is no release yet.</p>
97 <h3>Miscellaneous</h3>
98 <p>
99 You can purchase this <a href="https://www.spreadshirt.net/shop.php?op=article&article_id=3298632&view=403">tricot</a>
100 if you like dwm and the dwm logo, which has been designed by garbeam.
101 </p>
102 <p><small>--Anselm (20060714)</small></p>
91 </body> 103 </body>
92</html> 104</html>
diff --git a/event.c b/event.c
index c55be0f..4edf139 100644
--- a/event.c
+++ b/event.c
@@ -50,7 +50,9 @@ buttonpress(XEvent *e)
50 XButtonPressedEvent *ev = &e->xbutton; 50 XButtonPressedEvent *ev = &e->xbutton;
51 Client *c; 51 Client *c;
52 52
53 if((c = getclient(ev->window))) { 53 if(barwin == ev->window)
54 barclick(ev);
55 else if((c = getclient(ev->window))) {
54 craise(c); 56 craise(c);
55 switch(ev->button) { 57 switch(ev->button) {
56 default: 58 default:
diff --git a/main.c b/main.c
index 99e9f49..3d3e896 100644
--- a/main.c
+++ b/main.c
@@ -252,7 +252,7 @@ main(int argc, char *argv[])
252 252
253 wa.override_redirect = 1; 253 wa.override_redirect = 1;
254 wa.background_pixmap = ParentRelative; 254 wa.background_pixmap = ParentRelative;
255 wa.event_mask = ExposureMask; 255 wa.event_mask = ButtonPressMask | ExposureMask;
256 256
257 bx = by = 0; 257 bx = by = 0;
258 bw = sw; 258 bw = sw;