~ctb/dwm

aa93e18f25ff9b4aa4f29aa5e29a18058021c04b — Christopher Thomas Bohn 3 years ago 3d4de8d
scratchpad
1 files changed, 20 insertions(+), 28 deletions(-)

M config.def.h
M config.def.h => config.def.h +20 -28
@@ 57,13 57,17 @@ static const Layout layouts[] = {
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_gray2, "-sb", col_blue, "-sf", col_gray3, NULL };
static const char *termcmd[]  = { "st", NULL };
static const char scratchpadname[] = "scratchpad";
static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g", "120x34", NULL };
#include <X11/XF86keysym.h>

static Key keys[] = {
	/* modifier                     key        function        argument */
	{ MODKEY,                       XK_d,      spawn,          {.v = dmenucmd } },
	{ MODKEY,	                	XK_Return, spawn,          {.v = termcmd } },
	{ MODKEY|ControlMask|Mod1Mask,  XK_Return, spawn,          SHCMD("samedir") },
	{ MODKEY,                       XK_b,      togglebar,      {0} },
	{ MODKEY,                       XK_grave,  togglescratch,  {.v = scratchpadcmd } },
	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
	{ MODKEY,                       XK_o,      incnmaster,     {.i = -1 } },


@@ 87,10 91,11 @@ static Key keys[] = {
	{ MODKEY,                       XK_period, focusmon,       {.i = +1 } },
	{ MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },
	{ MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },
	{ MODKEY|ControlMask|ShiftMask, p,     	   spawn,          SHCMD("dmenu-pass") },
	{ MODKEY|ControlMask|ShiftMask, m,     	   spawn,          SHCMD("dmenu-mount") },
	{ MODKEY|ControlMask|ShiftMask, u,     	   spawn,          SHCMD("dmenu-umount") },
	{ MODKEY|ControlMask|ShiftMask, r,     	   spawn,          SHCMD("dmenu-record") },
	{ MODKEY|ControlMask|Mod1Mask,  p,     	   spawn,          SHCMD("dmenu-pass") },
	{ MODKEY|ControlMask|Mod1Mask,  m,     	   spawn,          SHCMD("dmenu-mount") },
	{ MODKEY|ControlMask|Mod1Mask,  u,     	   spawn,          SHCMD("dmenu-umount") },
	{ MODKEY|ControlMask|Mod1Mask,  r,     	   spawn,          SHCMD("dmenu-record") },
	{ MODKEY|ShiftMask,             r,     	   spawn,          SHCMD("dmenu-record") },
	TAGKEYS(                        XK_1,                      0)
	TAGKEYS(                        XK_2,                      1)
	TAGKEYS(                        XK_3,                      2)


@@ 102,32 107,19 @@ static Key keys[] = {
	TAGKEYS(                        XK_9,                      8)
	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },
	{ 0, XF86XK_AudioMute,		spawn,		SHCMD("pamixer -t && refbar") },
	{ 0, XF86XK_AudioRaiseVolume,	spawn,		SHCMD("amixer -q sset Master 3%+ && refbar") },
	{ 0, XF86XK_AudioLowerVolume,	spawn,		SHCMD("amixer -q sset Master 3%- && refbar") },
	{ 0, XF86XK_AudioPrev,		spawn,		SHCMD("mpc prev") },
	{ 0, XF86XK_AudioNext,		spawn,		SHCMD("mpc next") },
	{ 0, XF86XK_AudioPause,		spawn,		SHCMD("mpc pause") },
	{ 0, XF86XK_AudioPlay,		spawn,		SHCMD("mpc play") },
	{ 0, XF86XK_AudioStop,		spawn,		SHCMD("mpc stop") },
	{ 0, XF86XK_AudioRewind,	spawn,		SHCMD("mpc seek -10") },
	{ 0, XF86XK_AudioForward,	spawn,		SHCMD("mpc seek +10") },
	{ 0, XF86XK_AudioMedia,		spawn,		SHCMD("st -e ncmpcpp") },
	{ 0, XF86XK_PowerOff,		spawn,		SHCMD("sysact") },
	{ 0, XF86XK_Calculator,		spawn,		SHCMD("st -e bc -l") },
	{ 0, XF86XK_Sleep,		spawn,		SHCMD("sudo -A zzz") },
	{ 0, XF86XK_WWW,		spawn,		SHCMD("$BROWSER") },
	{ 0, XF86XK_DOS,		spawn,		SHCMD("st") },
	{ 0, XF86XK_ScreenSaver,	spawn,		SHCMD("slock & xset dpms force off; mpc pause; pauseallmpv") },
	{ 0, XF86XK_TaskPane,		spawn,		SHCMD("st -e htop") },
	{ 0, XF86XK_Mail,		spawn,		SHCMD("st -e neomutt") },
	{ 0, XF86XK_MyComputer,		spawn,		SHCMD("st -e lf /") },
	/* { 0, XF86XK_Battery,		spawn,		SHCMD("") }, */
	{ 0, XF86XK_Launch1,		spawn,		SHCMD("xset dpms force off") },
	{ 0, XF86XK_TouchpadToggle,	spawn,		SHCMD("(synclient | grep 'TouchpadOff.*1' && synclient TouchpadOff=0) || synclient TouchpadOff=1") },
	{ 0, XF86XK_TouchpadOff,	spawn,		SHCMD("synclient TouchpadOff=1") },
	{ 0, XF86XK_TouchpadOn,		spawn,		SHCMD("synclient TouchpadOff=0") },
	{ 0, XF86XK_AudioRaiseVolume,	spawn,		SHCMD("pamixer -i 3 && refbar") },
	{ 0, XF86XK_AudioLowerVolume,	spawn,		SHCMD("pamixer -d 3 && refbar") },
	{ 0, XF86XK_MonBrightnessUp,	spawn,		SHCMD("xbacklight -inc 15") },
	{ 0, XF86XK_MonBrightnessDown,	spawn,		SHCMD("xbacklight -dec 15") },
/* XF86AudioMicMute */
/* XF86Display */
/* XF86Display */
/* XF86WLAN */
/* XF86Tools */
/* XF86Search */
/* XF86LaunchA */
/* XF86Explorer */

};

/* button definitions */