Return to repo list

smartlaunch

Contextual launcher/tag shortcut methodology; intended for dwm.
Return to HMagellan.com

config.h.patch (1388B)


      1 --- a/config.def.h	2020-07-17 16:37:58.636247493 -0500
      2 +++ b/config.def.h	2020-07-17 18:16:29.555379720 -0500
      3 @@ -29,6 +29,7 @@
      4  	/* class      instance    title       tags mask     isfloating   monitor */
      5  	{ "Gimp",     NULL,       NULL,       0,            1,           -1 },
      6  	{ "Firefox",  NULL,       NULL,       1 << 8,       0,           -1 },
      7 +    { "Example",  NULL,       NULL,       1 << 5,       0,           -1 },
      8  };
      9  
     10  /* layout(s) */
     11 @@ -58,6 +59,7 @@
     12  static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
     13  static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
     14  static const char *termcmd[]  = { "st", NULL };
     15 +static const char *examplecmd[] = { "/bin/bash", "-c", "/root/smartlaunch.sh example Example example", NULL };
     16  
     17  static Key keys[] = {
     18  	/* modifier                     key        function        argument */
     19 @@ -94,6 +96,8 @@
     20  	TAGKEYS(                        XK_8,                      7)
     21  	TAGKEYS(                        XK_9,                      8)
     22  	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },
     23 +    { MODKEY,                       XK_r,      spawn,          {.v = examplecmd } },
     24 +    { MODKEY,                       XK_r,      view,           {.ui = 1 << 5 } },
     25  };
     26  
     27  /* button definitions */