diff options
| author | 0scar <qgt268@alumni.ku.dk> | 2024-09-30 10:16:05 +0000 |
|---|---|---|
| committer | 0scar <qgt268@alumni.ku.dk> | 2024-10-01 11:53:31 +0000 |
| commit | 7d0adc3c6331e1ff1a02d33e71cf00202ef2e26b (patch) | |
| tree | b67e1627719296d1fd8fe207846131c379cfe83a /config.def.h | |
| parent | 5a61337342915ff0697546d0b88852f559bf84a5 (diff) | |
Patch: named scratchpads
Diffstat (limited to 'config.def.h')
| -rw-r--r-- | config.def.h | 12 |
1 files changed, 7 insertions, 5 deletions
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} }, |
