Master Stacker - bakkeby/dusk GitHub Wiki

I wanted to highlight some dusk features that combined are greater than the sum of their parts.

Those features are:

The master stacker essentially gives you keybindings to focus on the nth tiled client, which I find to be an improvement over the traditional stacker logic which offers keybindings to focus on the nth client (regardless of whether the client is floating or not).

It does take up a lot of keys on the keyboard, but refactoring your keybindings from scratch focusing on what you actually need and what works best for you is an exercise that is most rewarding. Try it. You can thank me later.

When using a monocle or deck layout surplus clients are not shown on screen and it is not always easy to tell how to get to them.

As a user you may end up:

  • scrolling through the stack until you find the window you are after or
  • randomly trying master stacker keybindings or
  • click on the window title using the mouse cursor

That is where stacker icons comes in. It allows for a prefix to be added to the window title to show what stacker keybinding you need to use to get to that window.

In the below example we have stacker hints of j, k, l, , and . for the windows that are available.

stackericons.jpg

Master stacker + stacker icons works great with any layout, but it works particularly well with deck and monocle layouts because of the reclaimed screen real estate with practically none of the drawbacks because you can bring any of the surplus clients into view with the stroke of a single keybinding.


If you want to try this out then you should set up master stacker keys in a way that makes sense to you.

I am including below the way I have this set up for reference in case there are questions, but the key bindings will likely not make that much sense. The reason for they way they are set up is because I am using a Kinesis Advantage keyboard where the keys in the concave key wells are arranged as columns rather than diagonally as in traditional keyboards.

The main keys on the keyboard are arranged like this:

=    1  2  3  4  5       6  7  8  9  0  -
tab  q  w  e  r  t       y  u  i  o  p  #
caps a  s  d  f  g       h  j  k  l  ;  '
shft z  x  c  v  b       n  m  ,  .  /  shft
     `  \  ←  →             ↑  ↓  [  ]

For the stacker keybindings I stick to have all of them accessible to my right hand, leaving the left hand free to hold down the modifier key(s).

#define STACKKEYS(MOD,ACTION) \
    { KeyPress,   MOD, XK_u,                ACTION, {.i = INC(-1) } }, \
    { KeyPress,   MOD, XK_i,                ACTION, {.i = INC(+1) } }, \
    { KeyPress,   MOD, XK_semicolon,        ACTION, {.i = PREVSEL } }, \
    { KeyPress,   MOD, XK_j,                ACTION, {.i = MASTER(1) } }, \
    { KeyPress,   MOD, XK_m,                ACTION, {.i = MASTER(2) } }, \
    { KeyPress,   MOD, XK_k,                ACTION, {.i = STACK(1) } }, \
    { KeyPress,   MOD, XK_l,                ACTION, {.i = STACK(2) } }, \
    { KeyPress,   MOD, XK_comma,            ACTION, {.i = STACK(3) } }, \
    { KeyPress,   MOD, XK_period,           ACTION, {.i = STACK(4) } }, \
    { KeyPress,   MOD, XK_Down,             ACTION, {.i = STACK(5) } }, \
    { KeyPress,   MOD, XK_bracketleft,      ACTION, {.i = STACK(6) } }, \
    { KeyPress,   MOD, XK_slash,            ACTION, {.i = LASTTILED } },

/* This relates to the StackerIcons functionality and should mirror the STACKKEYS list above. */
static const StackerIcon stackericons[] = {
    { "^c#666666^[^c#dd9090^u^c#666666^]^d^", { .i = INC(-1)   }, StackerRightOfWindowIcon },
    { "^c#666666^[^c#dd9090^i^c#666666^]^d^", { .i = INC(+1)   }, StackerRightOfWindowIcon },
    { "^c#666666^[^c#dd9090^;^c#666666^]^d^", { .i = PREVSEL   }, StackerRightOfWindowIcon },
    { "^c#666666^[^c#dd9090^j^c#666666^]^d^", { .i = MASTER(1) }, StackerRightOfWindowIcon },
    { "^c#666666^[^c#dd9090^m^c#666666^]^d^", { .i = MASTER(2) }, StackerRightOfWindowIcon },
    { "^c#666666^[^c#dd9090^k^c#666666^]^d^", { .i = STACK(1)  }, StackerRightOfWindowIcon },
    { "^c#666666^[^c#dd9090^l^c#666666^]^d^", { .i = STACK(2)  }, StackerRightOfWindowIcon },
    { "^c#666666^[^c#dd9090^,^c#666666^]^d^", { .i = STACK(3)  }, StackerRightOfWindowIcon },
    { "^c#666666^[^c#dd9090^.^c#666666^]^d^", { .i = STACK(4)  }, StackerRightOfWindowIcon },
    { "^c#666666^[^c#dd9090^↓^c#666666^]^d^", { .i = STACK(5)  }, StackerRightOfWindowIcon },
    { "^c#666666^[^c#dd9090^[^c#666666^]^d^", { .i = STACK(6)  }, StackerRightOfWindowIcon },
    { "^c#666666^[^c#dd9090^/^c#666666^]^d^", { .i = LASTTILED }, StackerRightOfWindowIcon },
};

I use status2d markup above to make the brackets a gray colour to stand out less, letting the key itself grab more of the attention.


Back to Other scripts and life hacks.

⚠️ **GitHub.com Fallback** ⚠️