---- - config.def.h | 3 ++- - dwm.c | 14 ++++++++++++++ - 2 files changed, 16 insertions(+), 1 deletion(-) - -diff --git a/config.def.h b/config.def.h -index 2d824d1..fb7dc0c 100644 ---- a/config.def.h -+++ b/config.def.h -_AT_@ -6,7 +6,7 @@ static const unsigned int snap = 32; /* snap pixel */ - static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ - static const unsigned int systrayspacing = 2; /* systray spacing */ - static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/ --static const int showsystray = 1; /* 0 means no systray */ -+static int showsystray = 1; /* 0 means no systray */ - static const int showbar = 1; /* 0 means no bar */ - static const int topbar = 1; /* 0 means bottom bar */ - static const char *fonts[] = { "monospace:size=10" }; -_AT_@ -68,6 +68,7 @@ static Key keys[] = { - { MODKEY, XK_p, spawn, {.v = dmenucmd } }, - { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, - { MODKEY, XK_b, togglebar, {0} }, -+ { MODKEY|ShiftMask, XK_b, togglesystray, {0} }, - { MODKEY, XK_j, focusstack, {.i = +1 } }, - { MODKEY, XK_k, focusstack, {.i = -1 } }, - { MODKEY, XK_i, incnmaster, {.i = +1 } }, -diff --git a/dwm.c b/dwm.c -index 1b90b7b..530ef32 100644 ---- a/dwm.c -+++ b/dwm.c -_AT_@ -240,6 +240,7 @@ static void tag(const Arg *arg); - static void tagmon(const Arg *arg); - static void tile(Monitor *); - static void togglebar(const Arg *arg); -+static void togglesystray(); - static void togglefloating(const Arg *arg); - static void toggletag(const Arg *arg); - static void toggleview(const Arg *arg); -_AT_@ -1908,6 +1909,19 @@ togglebar(const Arg *arg) - arrange(selmon); - } - -+void -+togglesystray() -+{ -+ if (showsystray) -+ XUnmapWindow(dpy, systray->win); -+ showsystray = !showsystray; -+ updatesystray(); -+ drawbar(selmon); -+} -+ - void - togglefloating(const Arg *arg) - { --- -2.26.2 - diff --git a/dwm.suckless.org/patches/systray/index.md b/dwm.suckless.org/patches/systray/index.md index b1cc2c6c..4cb174f8 100644 --- a/dwm.suckless.org/patches/systray/index.md +++ b/dwm.suckless.org/patches/systray/index.md _AT_@ -18,10 +18,6 @@ Download * [dwm-git-20130119-systray.diff](dwm-git-20130119-systray.diff) (19946b) * [dwm-systray-6.0.diff](dwm-systray-6.0.diff) (19788b) (20130119) -Apply the following patch on top of the systray patch to have a keybind for showing/hiding the systray. - -* [dwm-systray-toggle-6.2.diff](dwm-systray-6.2.diff) (2465b) - Author ------ * Jan Christoph Ebersbach <jceb_AT_e-jc.de> _AT_@ -29,5 +25,4 @@ Author * David Phillips (5ed9c48 (6.1), 20160103, 20180314) * Eric Pruitt (7af4d43 (20160626)) * Igor Gevka (cb3f58a (6.2), 20200216) -* Christopher Witt <git_AT_ch-witt.de> (systray-toggle-6.2) * Michel Boaventura <michel.boaventura_AT_protonmail.com> (f09418b)Received on Wed Jul 08 2020 - 21:01:29 CEST
This archive was generated by hypermail 2.3.0 : Wed Jul 08 2020 - 21:12:43 CEST