Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Mar 30th, 2012  |  syntax: C  |  size: 1.64 KB  |  hits: 29  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff -urN spectrwm/spectrwm.c spectrwm_/spectrwm.c
  2. --- spectrwm/spectrwm.c 2012-03-30 09:45:27.000000000 +0200
  3. +++ spectrwm_/spectrwm.c        2012-03-30 12:40:02.290964713 +0200
  4. @@ -5426,7 +5426,7 @@
  5.  int
  6.  setlayout(char *selector, char *value, int flags)
  7.  {
  8. -       int                     ws_id, i, x, mg, ma, si, raise;
  9. +       int                     ws_id, i, x, mg, ma, si, raise, f;
  10.         int                     st = SWM_V_STACK;
  11.         char                    s[1024];
  12.         struct workspace        *ws;
  13. @@ -5446,8 +5446,16 @@
  14.  
  15.         if (!strcasecmp(s, "vertical"))
  16.                 st = SWM_V_STACK;
  17. -       else if (!strcasecmp(s, "horizontal"))
  18. +    else if (!strcasecmp(s, "vertical.flip")) {
  19. +        st = SWM_V_STACK;
  20. +        f = 1;
  21. +    }
  22. +    else if (!strcasecmp(s, "horizontal"))
  23. +        st = SWM_H_STACK;
  24. +    else if (!strcasecmp(s, "horizontal.flip")) {
  25.                 st = SWM_H_STACK;
  26. +        f = 1;
  27. +    }
  28.         else if (!strcasecmp(s, "fullscreen"))
  29.                 st = SWM_MAX_STACK;
  30.         else
  31. @@ -5484,6 +5492,13 @@
  32.                             SWM_ARG_ID_STACKDEC);
  33.                         stack();
  34.                 }
  35. +        /* Apply flip */
  36. +        if (f == 1) {
  37. +            ws[ws_id].cur_layout->l_config(&ws[ws_id],
  38. +                SWM_ARG_ID_FLIPLAYOUT);
  39. +            stack();
  40. +        }
  41. +
  42.         }
  43.  
  44.         return (0);
  45. diff -urN spectrwm/spectrwm.conf spectrwm_/spectrwm.conf
  46. --- spectrwm/spectrwm.conf      2012-03-30 09:45:27.000000000 +0200
  47. +++ spectrwm_/spectrwm.conf     2012-03-30 12:34:24.452629151 +0200
  48. @@ -54,6 +54,8 @@
  49.  # layout               = ws[1]:4:0:0:0:vertical
  50.  # layout               = ws[2]:0:0:0:0:horizontal
  51.  # layout               = ws[3]:0:0:0:0:fullscreen
  52. +# layout       = ws[1]:4:0:0:0:vertical.flip
  53. +# layout       = ws[2]:0:0:0:0:horizontal.flip
  54.  
  55.  # mod key, (windows key is Mod4) (apple key on OSX is Mod2)
  56.  # modkey = Mod1