Minor tweaks to awesomebar patch (incl. alpha and systray compatibility)

pull/32/head
bakkeby 5 years ago
parent 2d1d1dade4
commit d0757568ee

@ -13,6 +13,8 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
### Changelog:
2019-09-10 - Minor tweaks to awesomebar patch (incl. alpha and systray compatibility).
2019-09-09 - Added deck, fibonacci (dwindle and spiral), gridmode, gapplessgrid, horizgrid, nrowgrid, centeredmaster and flextile layouts. Added alternativetags and awesomebar patches.
2019-09-08 - Added cfacts and vanitygaps patches, added bstack and bstackhoriz layouts

@ -36,6 +36,9 @@ static const unsigned int alphas[][3] = {
/* fg bg border */
[SchemeNorm] = { OPAQUE, baralpha, borderalpha },
[SchemeSel] = { OPAQUE, baralpha, borderalpha },
#if AWESOMEBAR_PATCH
[SchemeHid] = { OPAQUE, baralpha, borderalpha },
#endif // AWESOMEBAR_PATCH
};
#endif // ALPHA_PATCH
static const char *colors[][3] = {
@ -217,6 +220,9 @@ static Key keys[] = {
{ MODKEY|Mod4Mask|ShiftMask, XK_0, defaultgaps, {0} },
#endif // VANITYGAPS_PATCH
{ MODKEY, XK_Tab, view, {0} },
#if AWESOMEBAR_PATCH
{ MODKEY, XK_z, showhideclient, {0} },
#endif // AWESOMEBAR_PATCH
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
{ MODKEY|ShiftMask, XK_q, quit, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
@ -231,9 +237,10 @@ static Key keys[] = {
{ MODKEY|ControlMask, XK_w, setflexlayout, {.i = 7 } }, // grid
{ MODKEY|ControlMask, XK_e, setflexlayout, {.i = 262 } }, // deck layout
{ MODKEY|ControlMask, XK_r, setflexlayout, {.i = 6 } }, // monocle
{ MODKEY|ControlMask, XK_t, rotatelayoutaxis, {.i = 0} }, /* flextile, 0 = layout axis */
{ MODKEY|ControlMask, XK_Tab, rotatelayoutaxis, {.i = 1} }, /* flextile, 1 = master axis */
{ MODKEY|ControlMask|ShiftMask, XK_Tab, rotatelayoutaxis, {.i = 2} }, /* flextile, 2 = stack axis */
{ MODKEY|ControlMask, XK_g, setflexlayout, {.i = 257 } }, // columns (col) layout
{ MODKEY|ControlMask, XK_t, rotatelayoutaxis, {.i = 0 } }, /* flextile, 0 = layout axis */
{ MODKEY|ControlMask, XK_Tab, rotatelayoutaxis, {.i = 1 } }, /* flextile, 1 = master axis */
{ MODKEY|ControlMask|ShiftMask, XK_Tab, rotatelayoutaxis, {.i = 2 } }, /* flextile, 2 = stack axis */
{ MODKEY|ControlMask, XK_Return, mirrorlayout, {0} }, /* flextile, flip master and stack areas */
#endif // FLEXTILE_LAYOUT
{ MODKEY, XK_space, setlayout, {0} },
@ -281,6 +288,7 @@ static Button buttons[] = {
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
#if AWESOMEBAR_PATCH
{ ClkWinTitle, 0, Button1, togglewin, {0} },
{ ClkWinTitle, 0, Button3, showhideclient, {0} },
#endif // AWESOMEBAR_PATCH
{ ClkWinTitle, 0, Button2, zoom, {0} },
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },

@ -1197,7 +1197,7 @@ focusin(XEvent *e)
{
XFocusChangeEvent *ev = &e->xfocus;
#if SYSTRAY_PATCH
#if SYSTRAY_PATCH && !AWESOMEBAR_PATCH
if (showsystray) {
/* Clear status bar to avoid artifacts beneath systray icons */
drw_rect(drw, 0, 0, selmon->ww, bh, 1, 1);

@ -1,5 +1,6 @@
void
hide(Client *c) {
if (!c || HIDDEN(c))
return;
@ -46,4 +47,21 @@ togglewin(const Arg *arg)
focus(c);
restack(selmon);
}
}
void
showhideclient(const Arg *arg)
{
Client *c = (Client*)arg->v;
if (!c)
c = selmon->sel;
if (!c)
return;
if (HIDDEN(c)) {
show(c);
restack(selmon);
} else {
hide(c);
}
}

@ -1,3 +1,4 @@
static void hide(Client *c);
static void show(Client *c);
static void togglewin(const Arg *arg);
static void togglewin(const Arg *arg);
static void showhideclient(const Arg *arg);

@ -29,6 +29,7 @@
* 000100000101 261 default tile layout
* 000100100101 293 centered master
* 000100000111 263 default tile layout with grid stack
* 000100000001 257 columns (col) layout
*/
void
setflexlayout(const Arg *arg)

@ -269,4 +269,4 @@
/* Monocle layout (default).
* This can be optionally disabled in favour of other layouts.
*/
#define MONOCLE_LAYOUT 1
#define MONOCLE_LAYOUT 1

Loading…
Cancel
Save