~bt/dwm

ad6ffc244d11b0d6b555e36f01e256a0bd515709 — Bradley Taunt 11 months ago d0abce7
Tweak volume controls based on new keyboard layout
7 files changed, 14 insertions(+), 24 deletions(-)

A .config.def.h.swp
M config.def.h
M config.h
M drw.o -rw-r--r-- => -rwxr-xr-x
M dwm
M dwm.o -rw-r--r-- => -rwxr-xr-x
M util.o -rw-r--r-- => -rwxr-xr-x
A .config.def.h.swp => .config.def.h.swp +0 -0
M config.def.h => config.def.h +7 -12
@@ 18,11 18,6 @@ static const char *colors[][3]      = {
	[SchemeSel]  = { col_gray4, col_cyan,  col_cyan  },
};

/* amixer keyboard shortcuts */
static const char *upvol[] = { "/usr/bin/amixer", "set", "Master", "5%+", NULL };
static const char *downvol[] = { "/usr/bin/amixer", "set", "Master", "5%-", NULL };
static const char *mutevol[] = { "/usr/bin/amixer", "set", "Master", "toggle", NULL };

/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };



@@ 34,9 29,9 @@ static const Rule rules[] = {
	/* class          instance    title       tags mask     iscentered   isfloating   monitor */
	{ "Gimp",         NULL,       NULL,       0,            0,           1,           -1 },
	{ "Firefox",      NULL,       NULL,       1 << 8,       1,           1,           -1 },
	{ "qutebrowser",  NULL,       NULL,       0,            0,           0,           -1 },
	{ "surf",         NULL,       NULL,       0,            0,           0,           -1 },
	{ "st",           NULL,       NULL,       0,            0,           0,           -1 },
	{ "qutebrowser",  NULL,       NULL,       0,            1,           1,           -1 },
	{ "surf",         NULL,       NULL,       0,            1,           1,           -1 },
	{ "st",           NULL,       NULL,       0,            1,           1,           -1 },
};

/* layout(s) */


@@ 47,8 42,8 @@ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen win

static const Layout layouts[] = {
	/* symbol     arrange function */
	{ "[]=",      tile },    /* first entry is default */
	{ "><>",      NULL },    /* no layout function means floating behavior */
	{ "[]=",      tile },    /* first entry is default */
	{ "[M]",      monocle },
};



@@ 109,9 104,9 @@ static const Key keys[] = {
	TAGKEYS(                        XK_9,                      8)
	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },
	{ MODKEY|ControlMask|ShiftMask, XK_q,      quit,           {1} },
	{ MODKEY,                       XK_F8, spawn, {.v = downvol } },
	{ MODKEY,                       XK_F11,  spawn, {.v = mutevol } },
	{ MODKEY,                       XK_F9, spawn, {.v = upvol   } },
	{ 0,                            XK_F2,     spawn,          SHCMD("amixer set Master playback 5%-") },
	{ 0,                            XK_F3,     spawn,          SHCMD("amixer set Master playback 5%+") },
	{ 0,                            XK_F4,     spawn,          SHCMD("amixer set Master playback toggle") },
};

/* button definitions */

M config.h => config.h +7 -12
@@ 18,11 18,6 @@ static const char *colors[][3]      = {
	[SchemeSel]  = { col_gray4, col_cyan,  col_cyan  },
};

/* amixer keyboard shortcuts */
static const char *upvol[] = { "/usr/bin/amixer", "set", "Master", "5%+", NULL };
static const char *downvol[] = { "/usr/bin/amixer", "set", "Master", "5%-", NULL };
static const char *mutevol[] = { "/usr/bin/amixer", "set", "Master", "toggle", NULL };

/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };



@@ 34,9 29,9 @@ static const Rule rules[] = {
	/* class          instance    title       tags mask     iscentered   isfloating   monitor */
	{ "Gimp",         NULL,       NULL,       0,            0,           1,           -1 },
	{ "Firefox",      NULL,       NULL,       1 << 8,       1,           1,           -1 },
	{ "qutebrowser",  NULL,       NULL,       0,            0,           0,           -1 },
	{ "surf",         NULL,       NULL,       0,            0,           0,           -1 },
	{ "st",           NULL,       NULL,       0,            0,           0,           -1 },
	{ "qutebrowser",  NULL,       NULL,       0,            1,           1,           -1 },
	{ "surf",         NULL,       NULL,       0,            1,           1,           -1 },
	{ "st",           NULL,       NULL,       0,            1,           1,           -1 },
};

/* layout(s) */


@@ 47,8 42,8 @@ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen win

static const Layout layouts[] = {
	/* symbol     arrange function */
	{ "[]=",      tile },    /* first entry is default */
	{ "><>",      NULL },    /* no layout function means floating behavior */
	{ "[]=",      tile },    /* first entry is default */
	{ "[M]",      monocle },
};



@@ 109,9 104,9 @@ static const Key keys[] = {
	TAGKEYS(                        XK_9,                      8)
	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },
	{ MODKEY|ControlMask|ShiftMask, XK_q,      quit,           {1} },
	{ MODKEY,                       XK_F8, spawn, {.v = downvol } },
	{ MODKEY,                       XK_F11,  spawn, {.v = mutevol } },
	{ MODKEY,                       XK_F9, spawn, {.v = upvol   } },
	{ 0,                            XK_F2,     spawn,          SHCMD("amixer set Master playback 5%-") },
	{ 0,                            XK_F3,     spawn,          SHCMD("amixer set Master playback 5%+") },
	{ 0,                            XK_F4,     spawn,          SHCMD("amixer set Master playback toggle") },
};

/* button definitions */

M drw.o => drw.o +0 -0
M dwm => dwm +0 -0
M dwm.o => dwm.o +0 -0
M util.o => util.o +0 -0