scratchpad - Patch

This commit is contained in:
riomoo 2025-02-14 22:45:11 -05:00
parent 361054b838
commit d19bb915e1
Signed by: riomoo
SSH key fingerprint: SHA256:IidVcrEqw4r/6zlIASTgxRmFBmyRiZ/31wjlNkFzVG0
4 changed files with 2445 additions and 11 deletions

View file

@ -13,6 +13,20 @@ static const char *fonts[] = {"Mononoki Nerd Font:size=16:antialias=true:aut
#include "/home/moo/.config/themes/using/colors-wal-dwm.h"
typedef struct {
const char *name;
const void *cmd;
} Sp;
const char *spcmd1[] = {"st", "-n", "spterm", "-g", "120x34", NULL };
const char *spcmd2[] = {"st", "-n", "spfm", "-g", "144x41", "-e", "ls", NULL };
const char *spcmd3[] = {"keepassxc", NULL };
static Sp scratchpads[] = {
/* name cmd */
{"spterm", spcmd1},
{"spranger", spcmd2},
{"keepassxc", spcmd3},
};
/* tagging */
/*static const char *tags[] = { "", "", "", "", "", "", "7", "8", "9" };
*/
@ -24,14 +38,17 @@ static const Rule rules[] = {
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 1 << 6, 0, -1 },
{ NULL, NULL, "pulsemixer", 0, 1, -1 },
{ "waterfox", NULL, NULL, 1, 0, -1 },
{ "Element", NULL, NULL, 1 << 8, 0, -1 },
{ NULL, NULL, "LibreWolf", 1 << 0, 0, -1 },
{ NULL, NULL, "Waterfox", 1 << 0, 0, -1 },
{ NULL, NULL, "Discord", 1 << 8, 0, -1 },
{ "mpv", NULL, NULL, 1 << 5, 1, -1 },
{ "Gimp", NULL, NULL, 1 << 6, 0, -1 },
{ NULL, NULL, "pulsemixer", 0, 1, -1 },
{ "waterfox", NULL, NULL, 1, 0, -1 },
{ "Element", NULL, NULL, 1 << 8, 0, -1 },
{ NULL, NULL, "LibreWolf", 1 << 0, 0, -1 },
{ NULL, NULL, "Waterfox", 1 << 0, 0, -1 },
{ NULL, NULL, "Discord", 1 << 8, 0, -1 },
{ "mpv", NULL, NULL, 1 << 5, 1, -1 },
{ NULL, "spterm", NULL, SPTAG(0), 1, -1 },
{ NULL, "spfm", NULL, SPTAG(1), 1, -1 },
{ NULL, "keepassxc", NULL, SPTAG(2), 0, -1 },
};
/* layout(s) */
@ -93,6 +110,9 @@ static const Key keys[] = {
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
{ MODKEY, XK_y, togglescratch, {.ui = 0 } },
{ MODKEY, XK_u, togglescratch, {.ui = 1 } },
{ MODKEY, XK_x, togglescratch, {.ui = 2 } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
@ -115,7 +135,7 @@ static const Button buttons[] = {
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkClientWin, MODKEY, Button1, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },