Introduction
Introduction Statistics Contact Development Disclaimer Help
tadded xlock command (I need it regularly) - dwm - [fork] customized build of d…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit ce846e941bee651ae5f17845f670f016040902f9
parent 0a638a4cafb3dd754a596605bb55ac7977fba71e
Author: Anselm R. Garbe <[email protected]>
Date: Thu, 13 Jul 2006 12:19:10 +0200
added xlock command (I need it regularly)
Diffstat:
M client.c | 30 ++++++++++--------------------
M dev.c | 5 ++++-
M dwm.h | 3 ++-
M dwm.html | 6 +++---
4 files changed, 19 insertions(+), 25 deletions(-)
---
diff --git a/client.c b/client.c
t@@ -11,9 +11,7 @@
#include "dwm.h"
-static void floating(void);
-static void tiling(void);
-static void (*arrange)(void) = floating;
+static void (*arrange)(void *) = floating;
void
max(void *aux)
t@@ -24,27 +22,30 @@ max(void *aux)
stack->y = sy;
stack->w = sw - 2 * stack->border;
stack->h = sh - 2 * stack->border;
+ craise(stack);
resize(stack);
discard_events(EnterWindowMask);
}
-static void
-floating(void)
+void
+floating(void *aux)
{
Client *c;
+ arrange = floating;
for(c = stack; c; c = c->snext)
resize(c);
discard_events(EnterWindowMask);
}
-static void
-tiling(void)
+void
+tiling(void *aux)
{
Client *c;
int n, cols, rows, gw, gh, i, j;
float rt, fd;
+ arrange = tiling;
if(!clients)
return;
for(n = 0, c = clients; c; c = c->next, n++);
t@@ -76,17 +77,6 @@ tiling(void)
}
void
-toggle(void *aux)
-{
- if(arrange == floating)
- arrange = tiling;
- else
- arrange = floating;
- arrange();
-}
-
-
-void
sel(void *aux)
{
const char *arg = aux;
t@@ -280,7 +270,7 @@ manage(Window w, XWindowAttributes *wa)
GrabModeAsync, GrabModeSync, None, None);
XGrabButton(dpy, Button3, Mod1Mask, c->win, False, ButtonPressMask,
GrabModeAsync, GrabModeSync, None, None);
- arrange();
+ arrange(NULL);
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2);
focus(c);
}
t@@ -400,7 +390,7 @@ unmanage(Client *c)
XFlush(dpy);
XSetErrorHandler(error_handler);
XUngrabServer(dpy);
- arrange();
+ arrange(NULL);
if(stack)
focus(stack);
}
diff --git a/dev.c b/dev.c
t@@ -17,13 +17,16 @@ const char *term[] = {
"-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*",NULL
};
const char *browse[] = { "firefox", NULL };
+const char *xlock[] = { "xlock", NULL };
static Key key[] = {
{ Mod1Mask, XK_Return, (void (*)(void *))spawn, term },
{ Mod1Mask, XK_w, (void (*)(void *))spawn, browse },
+ { Mod1Mask, XK_l, (void (*)(void *))spawn, xlock },
{ Mod1Mask, XK_k, sel, "prev" },
{ Mod1Mask, XK_j, sel, "next" },
- { Mod1Mask, XK_space, toggle, NULL },
+ { Mod1Mask, XK_t, tiling, NULL },
+ { Mod1Mask, XK_f, tiling, NULL },
{ Mod1Mask, XK_m, max, NULL },
{ Mod1Mask | ShiftMask, XK_c, ckill, NULL },
{ Mod1Mask | ShiftMask, XK_q, quit, NULL },
diff --git a/dwm.h b/dwm.h
t@@ -100,7 +100,8 @@ extern void lower(Client *c);
extern void ckill(void *aux);
extern void sel(void *aux);
extern void max(void *aux);
-extern void toggle(void *aux);
+extern void floating(void *aux);
+extern void tiling(void *aux);
extern void gravitate(Client *c, Bool invert);
/* draw.c */
diff --git a/dwm.html b/dwm.html
t@@ -59,9 +59,9 @@
</li>
<li>
garbeam <b>does not</b> want any feedback to dwm. If y…
- feature requests or if you report bugs, they will be <…
- with a high chance. dwm is only intended to fit garbea…
- however you are free to download and distribute/relice…
+ feature requests, or if you report bugs, they will be …
+ with a high chance. dwm is only intended to fit garbea…
+ However you are free to download and distribute/relice…
conditions of the <a href="http://wmii.de/cgi-bin/hgwe…
</li>
</ul>
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.