about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--config.default.h2
-rw-r--r--draw.c9
-rw-r--r--dwm.17
-rw-r--r--event.c6
4 files changed, 16 insertions, 8 deletions
diff --git a/config.default.h b/config.default.h
index f28f5b8..6147c98 100644
--- a/config.default.h
+++ b/config.default.h
@@ -55,7 +55,7 @@ static Key key[] = { \
 };
 
 /* Query class:instance:title for regex matching info with following command:
- * xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/{ printf("%s\n",$2) }' */
+ * xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/ { printf("%s\n",$2) }' */
 #define RULES \
 static Rule rule[] = { \
 	/* class:instance:title regex	tags regex	isfloat */ \
diff --git a/draw.c b/draw.c
index 64b11af..3938e5e 100644
--- a/draw.c
+++ b/draw.c
@@ -97,9 +97,7 @@ drawstatus()
 	int i, x;
 
 	dc.x = dc.y = 0;
-	dc.w = bw;
 
-	drawtext(NULL, dc.status, False);
 	for(i = 0; i < ntags; i++) {
 		dc.w = textw(tags[i]);
 		if(seltag[i])
@@ -121,9 +119,12 @@ drawstatus()
 	}
 	drawtext(stext, dc.status, False);
 
-	if(sel && ((dc.w = dc.x - x) > bh)) {
+	if((dc.w = dc.x - x) > bh) {
 		dc.x = x;
-		drawtext(sel->name, dc.sel, False);
+		if(sel)
+			drawtext(sel->name, dc.sel, False);
+		else
+			drawtext(NULL, dc.norm, False);
 	}
 	XCopyArea(dpy, dc.drawable, barwin, dc.gc, 0, 0, bw, bh, 0, 0);
 	XSync(dpy, False);
diff --git a/dwm.1 b/dwm.1
index 61663ff..4e23f1c 100644
--- a/dwm.1
+++ b/dwm.1
@@ -40,7 +40,12 @@ is read and displayed in the status text area.
 .TP
 .B Button1
 click on a tag label views all windows with that
-.BR tag .
+.BR tag ,
+click on the mode label toggles between
+.B tiled
+and
+.B floating
+mode.
 .TP
 .B Button3
 click on a tag label adds/removes all windows with that
diff --git a/event.c b/event.c
index 3c83aa8..1d2227d 100644
--- a/event.c
+++ b/event.c
@@ -116,8 +116,10 @@ buttonpress(XEvent *e)
 				return;
 			}
 		}
-		if(ev->x < x + bmw)
-			togglemode(NULL);
+		if(ev->x < x + bmw) {
+			if(ev->button == Button1)
+				togglemode(NULL);
+		}
 	}
 	else if((c = getclient(ev->window))) {
 		focus(c);
round-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
// C++ style:
//  no pointers except cell*
//  use long as the default integer type; it's always large enough to hold pointers

#define unused __attribute__((unused))

#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<errno.h>
#include<time.h>
#include<math.h>
#include<vector>
using std::vector;
#include<list>
using std::list;
#include<stack>
using std::stack;
#include<utility>
using std::pair;

#include<tr1/unordered_map>
using std::tr1::unordered_map;
#include<tr1/unordered_set>
using std::tr1::unordered_set;
#include<algorithm>

#include<string>
using std::string;
const size_t NOT_FOUND = string::npos;

#include<iostream>
using std::istream;
using std::ostream;
using std::iostream;
using std::cin;
using std::cout;
using std::cerr;

#include<sstream>
using std::stringstream;
using std::istringstream;
using std::ostringstream;

#include<fstream>
using std::ifstream;
using std::ofstream;



// interpreter decls

#include "type_list"

#include "function_list"

// interpreter impl

#include "file_list"

// interpreter tests

#include "test_file_list"