
Untitled
By: a guest on
Mar 30th, 2012 | syntax:
C | size: 1.64 KB | hits: 29 | expires: Never
diff -urN spectrwm/spectrwm.c spectrwm_/spectrwm.c
--- spectrwm/spectrwm.c 2012-03-30 09:45:27.000000000 +0200
+++ spectrwm_/spectrwm.c 2012-03-30 12:40:02.290964713 +0200
@@ -5426,7 +5426,7 @@
int
setlayout(char *selector, char *value, int flags)
{
- int ws_id, i, x, mg, ma, si, raise;
+ int ws_id, i, x, mg, ma, si, raise, f;
int st = SWM_V_STACK;
char s[1024];
struct workspace *ws;
@@ -5446,8 +5446,16 @@
if (!strcasecmp(s, "vertical"))
st = SWM_V_STACK;
- else if (!strcasecmp(s, "horizontal"))
+ else if (!strcasecmp(s, "vertical.flip")) {
+ st = SWM_V_STACK;
+ f = 1;
+ }
+ else if (!strcasecmp(s, "horizontal"))
+ st = SWM_H_STACK;
+ else if (!strcasecmp(s, "horizontal.flip")) {
st = SWM_H_STACK;
+ f = 1;
+ }
else if (!strcasecmp(s, "fullscreen"))
st = SWM_MAX_STACK;
else
@@ -5484,6 +5492,13 @@
SWM_ARG_ID_STACKDEC);
stack();
}
+ /* Apply flip */
+ if (f == 1) {
+ ws[ws_id].cur_layout->l_config(&ws[ws_id],
+ SWM_ARG_ID_FLIPLAYOUT);
+ stack();
+ }
+
}
return (0);
diff -urN spectrwm/spectrwm.conf spectrwm_/spectrwm.conf
--- spectrwm/spectrwm.conf 2012-03-30 09:45:27.000000000 +0200
+++ spectrwm_/spectrwm.conf 2012-03-30 12:34:24.452629151 +0200
@@ -54,6 +54,8 @@
# layout = ws[1]:4:0:0:0:vertical
# layout = ws[2]:0:0:0:0:horizontal
# layout = ws[3]:0:0:0:0:fullscreen
+# layout = ws[1]:4:0:0:0:vertical.flip
+# layout = ws[2]:0:0:0:0:horizontal.flip
# mod key, (windows key is Mod4) (apple key on OSX is Mod2)
# modkey = Mod1