From 7d0adc3c6331e1ff1a02d33e71cf00202ef2e26b Mon Sep 17 00:00:00 2001 From: 0scar Date: Mon, 30 Sep 2024 12:16:05 +0200 Subject: Patch: named scratchpads --- config.def.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'config.def.h') diff --git a/config.def.h b/config.def.h index 57e28e9..28e340c 100644 --- a/config.def.h +++ b/config.def.h @@ -28,10 +28,12 @@ static int log_level = WLR_ERROR; /* NOTE: ALWAYS keep a rule declared even if you don't use rules (e.g leave at least one example) */ #define TAG(t) (1 << (t - 1)) static const Rule rules[] = { - /* app_id title tags mask isfloating monitor */ + /* app_id title tags mask isfloating monitor scratchkey */ /* examples: */ - { "Gimp", NULL, TAG(9), 1, -1 }, /* Start on currently visible tags floating, not tiled */ - { "firefox", NULL, TAG(2), 0, -1 }, /* Start on ONLY tag "9" */ + { "Gimp", NULL, TAG(9), 1, -1, 0 }, /* Start on currently visible tags floating, not tiled */ + { "firefox", NULL, TAG(2), 0, -1, 0 }, /* Start on ONLY tag "9" */ + { NULL, "scratchpad", 0, 1, -1, 's' }, /* Used for terminal scratchpad */ + { NULL, "spadcalc", 0, 1, -1, 'c' }, /* Used for terminal scratchpad */ }; #undef TAG @@ -140,8 +142,8 @@ static const Key keys[] = { /* modifier key function argument */ { MODKEY, XKB_KEY_d, spawn, {.v = menucmd} }, { MODKEY, XKB_KEY_Return, spawn, {.v = termcmd} }, - { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = scratchpadcmd} }, - { MODKEY, XKB_KEY_apostrophe, spawn, {.v = scratchpadcalc} }, + { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, togglescratch, {.v = scratchpadcmd} }, + { MODKEY, XKB_KEY_apostrophe, togglescratch, {.v = scratchpadcalc} }, { MODKEY, XKB_KEY_j, focusstack, {.i = +1} }, { MODKEY, XKB_KEY_k, focusstack, {.i = -1} }, { MODKEY, XKB_KEY_i, incnmaster, {.i = +1} }, -- cgit v1.3