Skip to content
Discussion options

You must be logged in to vote

Looking at the original cyclelayouts patch we have that the argument passed to the cyclelayout function is supposed to indicate direction.

   { MODKEY|ControlMask,           XK_comma,  cyclelayout,    {.i = -1 } },
   { MODKEY|ControlMask,           XK_period, cyclelayout,    {.i = +1 } },

but the function itself just checked for i > 0:

cyclelayout(const Arg *arg) {
   Layout *l;
   for(l = (Layout *)layouts; l != selmon->lt[selmon->sellt]; l++);
   if(arg->i > 0) {
       if(l->symbol && (l + 1)->symbol)
           setlayout(&((Arg) { .v = (l + 1) }));
       else
           setlayout(&((Arg) { .v = layouts }));
   } else {
       if(l != layouts && (l - 1)->symbol)
           setlayout(&((

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@0xGodspeed
Comment options

Answer selected by 0xGodspeed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants