[wiki] [sites] wiki updated

From: <hg_AT_suckless.org>
Date: Wed, 26 Jan 2011 06:03:18 +0000 (UTC)

changeset: 680:11756bbd5482
tag: tip
user: lasse
date: Wed Jan 26 08:03:38 2011 +0200
files: dwm.suckless.org/patches/dwm-5.8.2-swap.diff
description:
Making swapfocus aware of that you used alt-j or alt-k (bugfix)


diff -r c095090fef00 -r 11756bbd5482 dwm.suckless.org/patches/dwm-5.8.2-swap.diff
--- a/dwm.suckless.org/patches/dwm-5.8.2-swap.diff Tue Jan 25 19:42:34 2011 +0200
+++ b/dwm.suckless.org/patches/dwm-5.8.2-swap.diff Wed Jan 26 08:03:38 2011 +0200
_AT_@ -1,53 +1,54 @@
-diff -crB a/config.def.h b/config.def.h
-*** a/config.def.h 2010-06-04 13:39:15.000000000 +0300
---- b/config.def.h 2011-01-25 14:55:53.667217737 +0200
-***************
-*** 53,58 ****
---- 53,59 ----
- { 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 b: config.h
-diff -crB a/dwm.c b/dwm.c
-*** a/dwm.c 2010-06-04 13:39:15.000000000 +0300
---- b/dwm.c 2011-01-25 14:54:37.169197602 +0200
-***************
-*** 183,188 ****
---- 183,189 ----
- 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,249 ****
---- 245,251 ----
- static void zoom(const Arg *arg);
-
- /* variables */
-+ static Arg focusdirection={.i=1};
- static const char broken[] = "broken";
- static char stext[256];
- static int screen;
-***************
-*** 886,891 ****
---- 888,900 ----
- }
- }
-
-+ void
-+ swapfocus(){
-+ focusdirection.i*=-1;
-+ focusstack(&focusdirection);
-+ }
-+
-+
- unsigned long
- getcolor(const char *colstr) {
- Colormap cmap = DefaultColormap(dpy, screen);
+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
+_AT_@ -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
+_AT_@ -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);
+_AT_@ -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;
+_AT_@ -862,6 +864,8 @@ focusmon(const Arg *arg) {
+
+ void
+ focusstack(const Arg *arg) {
++ focusdirection.i=arg->i;
++
+ Client *c = NULL, *i;
+
+ if(!selmon->sel)
+_AT_@ -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);
Received on Wed Jan 26 2011 - 07:03:18 CET

This archive was generated by hypermail 2.3.0 : Thu Sep 13 2012 - 19:31:37 CEST