dwm-meillo

changeset 58:1269bd127551

made barclick to select the specific tag
author Anselm R. Garbe <garbeam@wmii.de>
date Fri, 14 Jul 2006 10:34:07 +0200
parents f005d46462e8
children 5d4653de9a1c
files bar.c dwm.1 dwm.h dwm.html event.c main.c
diffstat 6 files changed, 36 insertions(+), 4 deletions(-) [+]
line diff
     1.1 --- a/bar.c	Fri Jul 14 10:07:38 2006 +0200
     1.2 +++ b/bar.c	Fri Jul 14 10:34:07 2006 +0200
     1.3 @@ -6,6 +6,20 @@
     1.4  #include "dwm.h"
     1.5  
     1.6  void
     1.7 +barclick(XButtonPressedEvent *e)
     1.8 +{
     1.9 +	int x = 0;
    1.10 +	Arg a;
    1.11 +	for(a.i = 0; a.i < TLast; a.i++) {
    1.12 +		x += textw(tags[a.i]) + dc.font.height;
    1.13 +		if(e->x < x) {
    1.14 +			view(&a);
    1.15 +			return;
    1.16 +		}
    1.17 +	}
    1.18 +}
    1.19 +
    1.20 +void
    1.21  draw_bar()
    1.22  {
    1.23  	int i;
     2.1 --- a/dwm.1	Fri Jul 14 10:07:38 2006 +0200
     2.2 +++ b/dwm.1	Fri Jul 14 10:34:07 2006 +0200
     2.3 @@ -12,6 +12,9 @@
     2.4  .TP
     2.5  .B \-v
     2.6  prints version information to stdout, then exits.
     2.7 +.SS Status text
     2.8 +.B dwm
     2.9 +reads from stdin to display status text if provided.
    2.10  .SS Default Key Bindings
    2.11  .TP 16
    2.12  .I Key	
     3.1 --- a/dwm.h	Fri Jul 14 10:07:38 2006 +0200
     3.2 +++ b/dwm.h	Fri Jul 14 10:34:07 2006 +0200
     3.3 @@ -103,6 +103,7 @@
     3.4  
     3.5  /* bar.c */
     3.6  extern void draw_bar();
     3.7 +extern void barclick(XButtonPressedEvent *e);
     3.8  
     3.9  /* client.c */
    3.10  extern void manage(Window w, XWindowAttributes *wa);
     4.1 --- a/dwm.html	Fri Jul 14 10:07:38 2006 +0200
     4.2 +++ b/dwm.html	Fri Jul 14 10:34:07 2006 +0200
     4.3 @@ -39,7 +39,7 @@
     4.4  		</p>
     4.5  		<ul>
     4.6  			<li>
     4.7 -			dwm has no 9P support, no status bar, no menu, no editable tagbars,
     4.8 +			dwm has no 9P support, no menu, no editable tagbars,
     4.9  			no shell-based configuration and remote control and comes without
    4.10  			any additional tools like printing the selection or warping the
    4.11  			mouse.
    4.12 @@ -69,6 +69,11 @@
    4.13  			clients.
    4.14  			</li>
    4.15  			<li>
    4.16 +			dwm reads from <b>stdin</b> to print arbirary status text (like the
    4.17 +			date, load, battery charge). That's much simpler than larsremote,
    4.18 +			wmiir and what not...
    4.19 +			</li>
    4.20 +			<li>
    4.21  			garbeam <b>does not</b> want any feedback to dwm. If you ask for support,
    4.22  			feature requests, or if you report bugs, they will be <b>ignored</b>
    4.23  			with a high chance. dwm is only intended to fit garbeams needs.
    4.24 @@ -87,6 +92,13 @@
    4.25  		<p>
    4.26  		<code>hg clone http://wmii.de/cgi-bin/hgwebdir.cgi/dwm</code>
    4.27  		</p>
    4.28 -		<p>--Anselm (20060713)</p>
    4.29 +		<h3>Download</h3>
    4.30 +		<p>There is no release yet.</p>
    4.31 +		<h3>Miscellaneous</h3>
    4.32 +		<p>
    4.33 +		You can purchase this <a href="https://www.spreadshirt.net/shop.php?op=article&article_id=3298632&view=403">tricot</a>
    4.34 +		if you like dwm and the dwm logo, which has been designed by garbeam.
    4.35 +		</p>
    4.36 +		<p><small>--Anselm (20060714)</small></p>
    4.37  	</body>
    4.38  </html>
     5.1 --- a/event.c	Fri Jul 14 10:07:38 2006 +0200
     5.2 +++ b/event.c	Fri Jul 14 10:34:07 2006 +0200
     5.3 @@ -50,7 +50,9 @@
     5.4  	XButtonPressedEvent *ev = &e->xbutton;
     5.5  	Client *c;
     5.6  
     5.7 -	if((c = getclient(ev->window))) {
     5.8 +	if(barwin == ev->window)
     5.9 +		barclick(ev);
    5.10 +	else if((c = getclient(ev->window))) {
    5.11  		craise(c);
    5.12  		switch(ev->button) {
    5.13  		default:
     6.1 --- a/main.c	Fri Jul 14 10:07:38 2006 +0200
     6.2 +++ b/main.c	Fri Jul 14 10:34:07 2006 +0200
     6.3 @@ -252,7 +252,7 @@
     6.4  
     6.5  	wa.override_redirect = 1;
     6.6  	wa.background_pixmap = ParentRelative;
     6.7 -	wa.event_mask = ExposureMask;
     6.8 +	wa.event_mask = ButtonPressMask | ExposureMask;
     6.9  
    6.10  	bx = by = 0;
    6.11  	bw = sw;