Return to repo list

smartlaunch

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

commit cec85c0c89d60843157906ed53c5648b26918a03
parent 352cc2347577c3e93552f17290b23408f02c74be
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Fri, 17 Jul 2020 18:25:04 -0500

Added patch file

Diffstat:
MREADME | 3+++
Aconfig.h.patch | 27+++++++++++++++++++++++++++
2 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/README b/README @@ -89,6 +89,9 @@ A method for contextually-aware rules-based application/tag view change shortcut 2). If there IS a window matching the WM_NAME in the command, the view will simply switch to the tag associated with the existing application, and nothing new will be started. + Refer to the file config.h.patch in this repository to see an example of the changes to be made to config.h + to configure any given program to work with Smartlaunch. + 04. License Smartlaunch is licensed under the MIT/Expat license. See the LICENSE file for more details. diff --git a/config.h.patch b/config.h.patch @@ -0,0 +1,27 @@ +--- config.def.h 2020-07-17 16:37:58.636247493 -0500 ++++ smartlaunchmod.h 2020-07-17 18:16:29.555379720 -0500 +@@ -29,6 +29,7 @@ + /* class instance title tags mask isfloating monitor */ + { "Gimp", NULL, NULL, 0, 1, -1 }, + { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, ++ { "Example", NULL, NULL, 1 << 5, 0, -1 }, + }; + + /* layout(s) */ +@@ -58,6 +59,7 @@ + static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ + static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; + static const char *termcmd[] = { "st", NULL }; ++static const char *examplecmd[] = { "/bin/bash", "-c", "/root/smartlaunch.sh Example example", NULL }; + + static Key keys[] = { + /* modifier key function argument */ +@@ -94,6 +96,8 @@ + TAGKEYS( XK_8, 7) + TAGKEYS( XK_9, 8) + { MODKEY|ShiftMask, XK_q, quit, {0} }, ++ { MODKEY, XK_r, spawn, {.v = examplecmd } }, ++ { MODKEY, XK_r, view, {.ui = 1 << 5 } }, + }; + + /* button definitions */