about summary refs log tree commit diff stats
path: root/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'event.c')
-rw-r--r--event.c36
1 files changed, 26 insertions, 10 deletions
diff --git a/event.c b/event.c
index e948cb3..ecbb8d2 100644
--- a/event.c
+++ b/event.c
@@ -14,8 +14,8 @@
 /********** CUSTOMIZE **********/
 
 const char *term[] = { 
-	"urxvtc", "-tr", "+sb", "-bg", "black", "-fg", "white", "-fn",
-	"-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*",NULL
+	"urxvtc", "-tr", "+sb", "-bg", "black", "-fg", "white", "-cr", "white",
+	"-fn", "-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*", NULL
 };
 const char *browse[] = { "firefox", NULL };
 const char *xlock[] = { "xlock", NULL };
@@ -128,18 +128,34 @@ buttonpress(XEvent *e)
 	Client *c;
 
 	if(barwin == ev->window) {
-		x = 0;
-		for(a.i = 0; a.i < TLast; a.i++) {
-			x += textw(tags[a.i]);
-			if(ev->x < x) {
-				view(&a);
-				break;
+		switch(ev->button) {
+		default:
+			x = 0;
+			for(a.i = 0; a.i < TLast; a.i++) {
+				x += textw(tags[a.i]);
+				if(ev->x < x) {
+					view(&a);
+					break;
+				}
 			}
+			break;
+		case Button4:
+			a.i = (tsel + 1 < TLast) ? tsel + 1 : 0;
+			view(&a);
+			break;
+		case Button5:
+			a.i = (tsel - 1 >= 0) ? tsel - 1 : TLast - 1;
+			view(&a);
+			break;
 		}
 	}
 	else if((c = getclient(ev->window))) {
-		if(arrange == dotile && !c->dofloat)
+		if(arrange == dotile && !c->isfloat) {
+			if((ev->state & ControlMask) && (ev->button == Button1))
+				zoom(NULL);
 			return;
+		}
+		/* floating windows */
 		higher(c);
 		switch(ev->button) {
 		default:
@@ -297,7 +313,7 @@ propertynotify(XEvent *e)
 			default: break;
 			case XA_WM_TRANSIENT_FOR:
 				XGetTransientForHint(dpy, c->win, &trans);
-				if(!c->dofloat && (c->dofloat = (trans != 0)))
+				if(!c->isfloat && (c->isfloat = (trans != 0)))
 					arrange(NULL);
 				break;
 			case XA_WM_NORMAL_HINTS:
/ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# getwtxt [![Build Status](https://travis-ci.com/getwtxt/getwtxt.svg?branch=master)](https://travis-ci.com/getwtxt/getwtxt)

twtxt registry written in Go. Still in development. 

*  Began: 10 May 2019
*  No deadline. Should be finished by the end of May 2019.

## Progress

Checks indicate steps I've finished. The first blank box is what I'm working on.

* [x] Types and basic init/config
* [x] HTTP routing
* [x] Handlers stubbed out
* [x] Registry manipulation ([getwtxt/registry](https://github.com/getwtxt/registry))
* [x] Request handling
* [ ] Cache management details
* [ ] Persistent data storage
* [ ] Catch up on tests / Concurrency safety checks
* [ ] Refactor and optimize

## Notes

* twtxt
  * [twtxt.readthedocs.io](https://twtxt.readthedocs.io)