sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit bbb4fee2f289f9fa5a6f568c1eb862b9ec238335
parent dfac571eb67799fae66ba01fb56ca329e2fa4220
Author: anselm@garbe.us <unknown>
Date:   Thu, 27 Jan 2011 09:30:37 +0100

merge
Diffstat:
Adwm.suckless.org/patches/dwm-5.8.2-swap.diff | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adwm.suckless.org/patches/swapfocus.md | 14++++++++++++++
2 files changed, 68 insertions(+), 0 deletions(-)

diff --git a/dwm.suckless.org/patches/dwm-5.8.2-swap.diff b/dwm.suckless.org/patches/dwm-5.8.2-swap.diff @@ -0,0 +1,54 @@ +diff -up dwm-5.8.2/config.def.h dwm-5.8.2-swap/config.def.h +--- dwm-5.8.2/config.def.h 2010-06-04 13:39:15.000000000 +0300 ++++ dwm-5.8.2-swap/config.def.h 2011-01-26 07:53:44.607195598 +0200 +@@ -53,6 +53,7 @@ static Key keys[] = { + { MODKEY, XK_p, spawn, {.v = dmenucmd } }, + { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, + { MODKEY, XK_b, togglebar, {0} }, ++ { MODKEY, XK_s, swapfocus, {0} }, + { MODKEY, XK_j, focusstack, {.i = +1 } }, + { MODKEY, XK_k, focusstack, {.i = -1 } }, + { MODKEY, XK_h, setmfact, {.f = -0.05} }, +Only in dwm-5.8.2-swap: config.h +diff -up dwm-5.8.2/dwm.c dwm-5.8.2-swap/dwm.c +--- dwm-5.8.2/dwm.c 2010-06-04 13:39:15.000000000 +0300 ++++ dwm-5.8.2-swap/dwm.c 2011-01-26 07:54:27.741193905 +0200 +@@ -183,6 +183,7 @@ static void focus(Client *c); + static void focusin(XEvent *e); + static void focusmon(const Arg *arg); + static void focusstack(const Arg *arg); ++static void swapfocus(); + static unsigned long getcolor(const char *colstr); + static Bool getrootptr(int *x, int *y); + static long getstate(Window w); +@@ -244,6 +245,7 @@ static int xerrorstart(Display *dpy, XEr + static void zoom(const Arg *arg); + + /* variables */ ++static Arg focusdirection={.i=1}; + static const char broken[] = "broken"; + static char stext[256]; + static int screen; +@@ -862,6 +864,8 @@ focusmon(const Arg *arg) { + + void + focusstack(const Arg *arg) { ++ focusdirection.i=arg->i; ++ + Client *c = NULL, *i; + + if(!selmon->sel) +@@ -886,6 +890,13 @@ focusstack(const Arg *arg) { + } + } + ++void ++swapfocus(){ ++ focusdirection.i*=-1; ++ focusstack(&focusdirection); ++} ++ ++ + unsigned long + getcolor(const char *colstr) { + Colormap cmap = DefaultColormap(dpy, screen); diff --git a/dwm.suckless.org/patches/swapfocus.md b/dwm.suckless.org/patches/swapfocus.md @@ -0,0 +1,14 @@ +# SWAP FOCUS + +## Description + +This patch makes it possible to switch focus with one single shortcut (alt-s) instead of having to think if you should use alt-j or alt-k for reaching the last used window. + +## Download + + * [dwm-5.8.2-swap.diff](dwm-5.8.2-swap.diff) (dwm 5.8.2) + +## Author + + * Lasse Engblom +