DWM changes

keyboard
Jonathan Hodgson 4 years ago
parent acfb6dfbd4
commit 81eeb44259
  1. 37
      config.def.h
  2. 4
      dwm.c

@ -1,6 +1,7 @@
/* See LICENSE file for copyright and license details. */
//The media and volume keys
//usr/include/X11/XF86keysym.h
#include "X11/XF86keysym.h"
/* appearance */
@ -30,11 +31,13 @@ static const Rule rules[] = {
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating isterminal noswallow monitor */
//{ "Gimp", NULL, NULL, 0, 0, 0, 0, -1 },
//{ "Firefox", NULL, NULL, 1 << 8, 0, 0, 0, -1 },
{ "xterm-256color", NULL, NULL, 0, 0, 1, 1, -1 },
{ "Thunderbird", NULL, NULL, 1 << 8 , 0, 0, 0, -1 },
/* class instance title tags mask isfloating isterminal noswallow nofakefullscreen monitor */
//{ "Gimp", NULL, NULL, 0, 0, 0, 0, 0, -1 },
//{ "Firefox", NULL, NULL, 1 << 8, 0, 0, 0, 0, -1 },
{ "xterm-256color", NULL, NULL, 0, 0, 1, 1, 0, -1 },
{ "Thunderbird", NULL, NULL, 1 << 8 , 0, 0, 0, 0, -1 },
{ NULL, NULL, "Event Tester", 0, 0, 0, 1, 0, -1 }
};
/* layout(s) */
@ -72,6 +75,8 @@ static const char *dmenucmd[] = { "rofi", "-show", "drun", NULL };
//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[] = { "folder-shell", NULL };
static const char *lfcmd[] = { "folder-shell", "lf", NULL };
static const char *fullscreenshot[] = { "screenshot", NULL };
static const char *activescreenshot[] = { "screenshot", "window", NULL };
static const char *selectscreenshot[] = { "screenshot", "select", NULL };
@ -105,18 +110,28 @@ static const char *screenlayout[] = { "screenlayout", NULL };
static const char *pass[] = { "password-manager", NULL };
static const char *volumeUp[] = { "volume", "up", NULL };
static const char *volumeDown[] = { "volume", "down", NULL };
static const char *volumeToggle[] = { "volume", "toggle", NULL };
static const char *setBackgroundRandom[] = { "rofi-background", "--earth", NULL };
static const char *backgroundDetails[] = { "background", "--only-notify", NULL };
static const char *unity_hud[] = { "hud-menu.py" };
#include "movestack.c"
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY|ControlMask, XK_Return, spawn, {.v = lfcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } },
{ MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } },
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
{ MODKEY|ShiftMask, XK_i, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY|ShiftMask, XK_l, spawn, {.v = logout} },
@ -157,7 +172,15 @@ static Key keys[] = {
{ MODKEY|ShiftMask, XK_p, spawn, {.v = ports } },
{ MODKEY, XK_w, spawn, {.v = whichproject } },
{ MODKEY|ShiftMask, XK_w, spawn, {.v = project } },
{ MODKEY, XK_e, spawn, {.v = pass } },
{ MODKEY, XK_d, spawn, {.v = pass } },
{ MODKEY, XK_x, spawn, {.v = unity_hud } },
//Background
{ MODKEY, XK_e, spawn, {.v = setBackgroundRandom } },
{ MODKEY|ControlMask, XK_e, spawn, {.v = backgroundDetails } },
//Special keys
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volumeUp } },
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = volumeDown } },
{ 0, XF86XK_AudioMute, spawn, {.v = volumeToggle } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)

@ -94,7 +94,7 @@ struct Client {
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
int bw, oldbw;
unsigned int tags;
int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, isterminal, noswallow;
int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, isterminal, noswallow, nofakefullscreen;
pid_t pid;
Client *next;
Client *snext;
@ -144,6 +144,7 @@ typedef struct {
int isfloating;
int isterminal;
int noswallow;
int nofakefullscreen;
int monitor;
} Rule;
@ -316,6 +317,7 @@ applyrules(Client *c)
{
c->isterminal = r->isterminal;
c->isfloating = r->isfloating;
c->nofakefullscreen = r->nofakefullscreen;
c->tags |= r->tags;
for (m = mons; m && m->num != r->monitor; m = m->next);
if (m)

Loading…
Cancel
Save