From f39eb497100f71bfb6b1958a09e83daa8fca2e06 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Tue, 24 Sep 2024 14:20:43 +0200 Subject: [PATCH] add sptask scratchpad, remove sphelp scratchpad --- config.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/config.h b/config.h index 082dc6a..38c4368 100644 --- a/config.h +++ b/config.h @@ -124,10 +124,11 @@ static const char *spfile[] = { "f", TERM, TERM_FLAG_CLASS, "spfile", TERM_FLAG_ static const char *spproc[] = { "p", TERM, TERM_FLAG_CLASS, "spproc", TERM_FLAG_EXEC, "btm", NULL }; static const char *spdisk[] = { "d", TERM, TERM_FLAG_CLASS, "spdisk", TERM_FLAG_EXEC, "dua", "i", "/", NULL }; static const char *spvolm[] = { "v", TERM, TERM_FLAG_CLASS, "spvolm", TERM_FLAG_EXEC, "ncpamixer", NULL }; -static const char *sphelp[] = { "h", TERM, TERM_FLAG_CLASS, "sphelp", TERM_FLAG_EXEC, "/bin/sh", "-c", "glow -p -s $XDG_CONFIG_HOME/glow/style.json /usr/share/dwm/dwm.md", NULL }; +/*static const char *sphelp[] = { "h", TERM, TERM_FLAG_CLASS, "sphelp", TERM_FLAG_EXEC, "/bin/sh", "-c", "glow -p -s $XDG_CONFIG_HOME/glow/style.json /usr/share/dwm/dwm.md", NULL };*/ static const char *spnetm[] = { "m", TERM, TERM_FLAG_CLASS, "spnetm", TERM_FLAG_EXEC, "/bin/sh", "-c", "sleep 0.01; nmtui", NULL }; // This sleep is needed to wait for DWM to size the window static const char *spnetu[] = { "u", TERM, TERM_FLAG_CLASS, "spnetu", TERM_FLAG_EXEC, "bandwhich", NULL }; -static const char *spwiki[] = { "w", TERM, TERM_FLAG_CLASS, "spwiki", TERM_FLAG_EXEC, "zk", "edit", "-i", NULL }; +static const char *spwiki[] = { "w", TERM, TERM_FLAG_CLASS, "spwiki", TERM_FLAG_EXEC, "sh", "-c", "sleep 0.01; zk edit -i", NULL }; +static const char *sptask[] = { "s", TERM, TERM_FLAG_CLASS, "sptask", TERM_FLAG_EXEC, "taskwarrior-tui", NULL }; static const char *spcalc[] = { "c", TERM, TERM_FLAG_CLASS, "spcalc", TERM_FLAG_EXEC, "/bin/sh", "-c", "HOME=$XDG_DATA_HOME wcalc -C", NULL }; static const Rule rules[] = { @@ -147,9 +148,10 @@ static const Rule rules[] = { RULE(.class = "mpv", .isfloating = 0) RULE(.class = "Element", .monitor = 1, .tags = 1 << 0) RULE(.class = "Thunderbird", .monitor = 1, .tags = 1 << 1) - RULE(.class = "sphelp", .scratchkey = 'h', .isfloating = 1, .iscentered = 1, .floatpos = "50% 50% 50% 90%") + /*RULE(.class = "sphelp", .scratchkey = 'h', .isfloating = 1, .iscentered = 1, .floatpos = "50% 50% 50% 90%")*/ RULE(.class = "spcalc", .scratchkey = 'c', .isfloating = 1, .iscentered = 1, .floatpos = "50% 50% 50% 90%") RULE(.class = "spwiki", .scratchkey = 'w', .isfloating = 1, .iscentered = 1, .floatpos = "50% 50% 50% 90%") + RULE(.class = "sptask", .scratchkey = 's', .isfloating = 1, .iscentered = 1, .floatpos = "50% 50% 50% 90%") RULE(.class = "spterm", .scratchkey = 't', .isfloating = 1, .iscentered = 1, .floatpos = "50% 50% 90% 90%") RULE(.class = "spfile", .scratchkey = 'f', .isfloating = 1, .iscentered = 1, .floatpos = "50% 50% 90% 90%") RULE(.class = "spdisk", .scratchkey = 'd', .isfloating = 1, .iscentered = 1, .floatpos = "50% 50% 90% 90%") @@ -202,7 +204,7 @@ static const char *termcmd[] = { TERM, NULL }; #include static const Key keys[] = { /* modifier key function argument */ - { MODKEY, XK_F1, togglescratch, {.v = sphelp} }, + /*{ MODKEY, XK_F1, togglescratch, {.v = sphelp} },*/ // { MODKEY | ShiftMask, XK_F1, spawn, {.v = (const char *[]){NULL}} }, { MODKEY, XK_F2, spawn, SHCMD("$HOME/.local/libexec/dwm/dmenuhandler") }, // { MODKEY | ShiftMask, XK_F2, spawn, {.v = (const char *[]){NULL}} }, @@ -317,7 +319,7 @@ static const Key keys[] = { // { MODKEY | ShiftMask, XK_w, spawn, {.v = (const char *[]){NULL}} }, { MODKEY, XK_v, togglescratch, {.v = spcalc} }, // { MODKEY | ShiftMask, XK_v, spawn, {.v = (const char *[]){NULL}} }, - // { MODKEY, XK_z, spawn, {.v = (const char *[]){NULL}} }, TODO: Maybe oatmeal scratchpad? + { MODKEY, XK_z, togglescratch, {.v = sptask} }, // { MODKEY | ShiftMask, XK_z, spawn, {.v = (const char *[]){NULL}} }, { MODKEY, XK_space, spawn, {.v = termcmd} }, { MODKEY | ShiftMask, XK_space, togglescratch, {.v = spterm} },