Compare commits
2 Commits
master
...
825b0388e0
| Author | SHA1 | Date | |
|---|---|---|---|
| 825b0388e0 | |||
|
|
586960d520 |
2
LICENSE
2
LICENSE
@@ -1,6 +1,5 @@
|
|||||||
MIT/X Consortium License
|
MIT/X Consortium License
|
||||||
|
|
||||||
© 2010-2026 Hiltjo Posthuma <hiltjo@codemadness.org>
|
|
||||||
© 2006-2019 Anselm R Garbe <anselm@garbe.ca>
|
© 2006-2019 Anselm R Garbe <anselm@garbe.ca>
|
||||||
© 2006-2009 Jukka Salmi <jukka at salmi dot ch>
|
© 2006-2009 Jukka Salmi <jukka at salmi dot ch>
|
||||||
© 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
|
© 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
|
||||||
@@ -12,6 +11,7 @@ MIT/X Consortium License
|
|||||||
© 2008 Martin Hurton <martin dot hurton at gmail dot com>
|
© 2008 Martin Hurton <martin dot hurton at gmail dot com>
|
||||||
© 2008 Neale Pickett <neale dot woozle dot org>
|
© 2008 Neale Pickett <neale dot woozle dot org>
|
||||||
© 2009 Mate Nagy <mnagy at port70 dot net>
|
© 2009 Mate Nagy <mnagy at port70 dot net>
|
||||||
|
© 2010-2016 Hiltjo Posthuma <hiltjo@codemadness.org>
|
||||||
© 2010-2012 Connor Lane Smith <cls@lubutu.com>
|
© 2010-2012 Connor Lane Smith <cls@lubutu.com>
|
||||||
© 2011 Christoph Lohmann <20h@r-36.net>
|
© 2011 Christoph Lohmann <20h@r-36.net>
|
||||||
© 2015-2016 Quentin Rameau <quinq@fifth.space>
|
© 2015-2016 Quentin Rameau <quinq@fifth.space>
|
||||||
|
|||||||
7
Makefile
7
Makefile
@@ -13,6 +13,9 @@ all: dwm
|
|||||||
|
|
||||||
${OBJ}: config.h config.mk
|
${OBJ}: config.h config.mk
|
||||||
|
|
||||||
|
config.h:
|
||||||
|
cp config.def.h $@
|
||||||
|
|
||||||
dwm: ${OBJ}
|
dwm: ${OBJ}
|
||||||
${CC} -o $@ ${OBJ} ${LDFLAGS}
|
${CC} -o $@ ${OBJ} ${LDFLAGS}
|
||||||
|
|
||||||
@@ -21,8 +24,8 @@ clean:
|
|||||||
|
|
||||||
dist: clean
|
dist: clean
|
||||||
mkdir -p dwm-${VERSION}
|
mkdir -p dwm-${VERSION}
|
||||||
cp -R LICENSE Makefile README config.mk\
|
cp -R LICENSE Makefile README config.def.h config.mk\
|
||||||
dwm.1 drw.h util.h ${SRC} transient.c dwm-${VERSION}
|
dwm.1 drw.h util.h ${SRC} dwm.png transient.c dwm-${VERSION}
|
||||||
tar -cf dwm-${VERSION}.tar dwm-${VERSION}
|
tar -cf dwm-${VERSION}.tar dwm-${VERSION}
|
||||||
gzip dwm-${VERSION}.tar
|
gzip dwm-${VERSION}.tar
|
||||||
rm -rf dwm-${VERSION}
|
rm -rf dwm-${VERSION}
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
|
|
||||||
/* NOTE: config.h replaces this file, but I'm keeping this one to help distinguish
|
|
||||||
* between others' patches (published via suckless.org) and my own additions.
|
|
||||||
* - to see others' patches, diff config.def.h against upstream's config.def.h
|
|
||||||
* - to see my additional changes, diff config.h against config.def.h
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* appearance */
|
/* appearance */
|
||||||
static unsigned int borderpx = 1; /* border pixel of windows */
|
static unsigned int borderpx = 1; /* border pixel of windows */
|
||||||
static unsigned int snap = 32; /* snap pixel */
|
static unsigned int snap = 32; /* snap pixel */
|
||||||
|
|||||||
50
config.h
50
config.h
@@ -1,14 +1,6 @@
|
|||||||
/* Copied from config.dev.h file. */
|
/* Copied from config.dev.h file. */
|
||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
|
|
||||||
#define BROWSER_CMD "qutebrowser"
|
|
||||||
// define BROWSER_CMD "brave"
|
|
||||||
#define SYSTEM_MONITOR "htop"
|
|
||||||
// define TERMINAL_CLASS "St"
|
|
||||||
// define TERMINAL_CMD "st"
|
|
||||||
#define TERMINAL_CLASS "Kitty"
|
|
||||||
#define TERMINAL_CMD "kitty"
|
|
||||||
|
|
||||||
/* appearance */
|
/* appearance */
|
||||||
static unsigned int borderpx = 1; /* border pixel of windows */
|
static unsigned int borderpx = 1; /* border pixel of windows */
|
||||||
static unsigned int snap = 32; /* snap pixel */
|
static unsigned int snap = 32; /* snap pixel */
|
||||||
@@ -41,8 +33,9 @@ static const Rule rules[] = {
|
|||||||
* WM_NAME(STRING) = title
|
* WM_NAME(STRING) = title
|
||||||
*/
|
*/
|
||||||
/* class instance title tags mask isfloating isterminal noswallow monitor */
|
/* class instance title tags mask isfloating isterminal noswallow monitor */
|
||||||
{ TERMINAL_CLASS, NULL, NULL, 0, 0, 1, 0, -1 },
|
|
||||||
{ "Gimp", NULL, NULL, 0, 0, 0, 0, -1 },
|
{ "Gimp", NULL, NULL, 0, 0, 0, 0, -1 },
|
||||||
|
{ "Firefox", NULL, NULL, 1 << 8, 0, 0, -1, -1 },
|
||||||
|
{ "St", NULL, NULL, 0, 0, 1, 0, -1 },
|
||||||
{ NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */
|
{ NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -71,7 +64,12 @@ static const Layout layouts[] = {
|
|||||||
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
|
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
|
||||||
#define STACKKEYS(MOD,ACTION) \
|
#define STACKKEYS(MOD,ACTION) \
|
||||||
{ MOD, XK_j, ACTION##stack, {.i = INC(+1) } }, \
|
{ MOD, XK_j, ACTION##stack, {.i = INC(+1) } }, \
|
||||||
{ MOD, XK_k, ACTION##stack, {.i = INC(-1) } },
|
{ MOD, XK_k, ACTION##stack, {.i = INC(-1) } }, \
|
||||||
|
{ MOD, XK_grave, ACTION##stack, {.i = PREVSEL } }, \
|
||||||
|
{ MOD, XK_q, ACTION##stack, {.i = 0 } }, \
|
||||||
|
{ MOD, XK_a, ACTION##stack, {.i = 1 } }, \
|
||||||
|
{ MOD, XK_z, ACTION##stack, {.i = 2 } }, \
|
||||||
|
{ MOD, XK_x, ACTION##stack, {.i = -1 } },
|
||||||
|
|
||||||
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
||||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||||
@@ -79,7 +77,7 @@ static const Layout layouts[] = {
|
|||||||
/* commands */
|
/* commands */
|
||||||
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
||||||
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbordercolor, "-sf", selfgcolor, NULL };
|
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbordercolor, "-sf", selfgcolor, NULL };
|
||||||
static const char *termcmd[] = { TERMINAL_CMD, NULL };
|
static const char *termcmd[] = { "kitty", NULL }; // TODO: replace kitty with st
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Xresources preferences to load at startup
|
* Xresources preferences to load at startup
|
||||||
@@ -104,27 +102,29 @@ ResourcePref resources[] = {
|
|||||||
|
|
||||||
static const Key keys[] = {
|
static const Key keys[] = {
|
||||||
/* modifier key function argument */
|
/* modifier key function argument */
|
||||||
{ MODKEY|ShiftMask, XK_f, togglebar, {0} },
|
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||||
|
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
||||||
|
{ MODKEY, XK_b, togglebar, {0} },
|
||||||
STACKKEYS(MODKEY, focus)
|
STACKKEYS(MODKEY, focus)
|
||||||
STACKKEYS(MODKEY|ShiftMask, push)
|
STACKKEYS(MODKEY|ShiftMask, push)
|
||||||
/* { MODKEY, XK_h, zxcv, {.f = -0.05} }, */
|
|
||||||
/* { MODKEY, XK_l, zxcv, {.f = +0.05} }, */
|
|
||||||
{ MODKEY|ShiftMask, XK_h, setmfact, {.f = -0.05} }, // zxcv
|
|
||||||
{ MODKEY|ShiftMask, XK_l, setmfact, {.f = +0.05} }, // zxcv
|
|
||||||
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||||
{ MODKEY|ShiftMask, XK_Return, zoom, {0} }, /* swap current and master clients */
|
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||||
|
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||||
|
{ MODKEY, XK_Return, zoom, {0} }, // TODO: zxcv decide/update key
|
||||||
|
{ MODKEY, XK_Tab, view, {0} }, // TODO: zxcv decide/update key
|
||||||
|
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
||||||
{ MODKEY, XK_comma, setlayout, {.v = &layouts[0]} },
|
{ MODKEY, XK_comma, setlayout, {.v = &layouts[0]} },
|
||||||
{ MODKEY, XK_period, setlayout, {.v = &layouts[1]} },
|
{ MODKEY, XK_period, setlayout, {.v = &layouts[1]} },
|
||||||
{ MODKEY|ShiftMask, XK_period, setlayout, {.v = &layouts[2]} },
|
{ MODKEY|ShiftMask, XK_period, setlayout, {.v = &layouts[2]} },
|
||||||
{ MODKEY, XK_slash, togglefloating, {0} }, /* float the curret window */
|
{ MODKEY, XK_slash, togglefloating, {0} },
|
||||||
{ MODKEY|ShiftMask, XK_slash, setlayout, {.v = &layouts[3]} }, /* TODO: does this do anything? is it needed? */
|
{ MODKEY|ShiftMask, XK_slash, setlayout, {.v = &layouts[3]} }, /* TODO: do anything? needed? */
|
||||||
|
{ MODKEY, XK_0, view, {.ui = ~0 } }, // TODO: zxcv update key
|
||||||
|
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, // TODO: zxcv update key
|
||||||
{ MODKEY|ShiftMask, XK_m, focusmon, {.i = -1 } },
|
{ MODKEY|ShiftMask, XK_m, focusmon, {.i = -1 } },
|
||||||
{ MODKEY, XK_m, focusmon, {.i = +1 } },
|
{ MODKEY, XK_m, focusmon, {.i = +1 } },
|
||||||
{ MODKEY|ShiftMask, XK_t, tagmon, {.i = -1 } },
|
{ MODKEY|ShiftMask, XK_t, tagmon, {.i = -1 } },
|
||||||
{ MODKEY, XK_t, tagmon, {.i = +1 } },
|
{ MODKEY, XK_t, tagmon, {.i = +1 } },
|
||||||
{ MODKEY, XK_grave, view, {.ui = ~0 } }, /* ` -> view all tags */
|
|
||||||
{ MODKEY|ShiftMask, XK_grave, tag, {.ui = ~0 } }, /* shift + ` -> apply all tags */
|
|
||||||
TAGKEYS( XK_1, 0)
|
TAGKEYS( XK_1, 0)
|
||||||
TAGKEYS( XK_2, 1)
|
TAGKEYS( XK_2, 1)
|
||||||
TAGKEYS( XK_3, 2)
|
TAGKEYS( XK_3, 2)
|
||||||
@@ -135,13 +135,7 @@ static const Key keys[] = {
|
|||||||
TAGKEYS( XK_8, 7)
|
TAGKEYS( XK_8, 7)
|
||||||
TAGKEYS( XK_9, 8)
|
TAGKEYS( XK_9, 8)
|
||||||
TAGKEYS( XK_0, 9)
|
TAGKEYS( XK_0, 9)
|
||||||
{ MODKEY, XK_q, killclient, {0} },
|
{ MODKEY|ShiftMask, XK_BackSpace, quit, {0} },
|
||||||
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
|
||||||
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
|
||||||
{ MODKEY, XK_space, spawn, {.v = dmenucmd } },
|
|
||||||
{ MODKEY, XK_s, spawn, SHCMD(TERMINAL_CMD " -e " SYSTEM_MONITOR) },
|
|
||||||
{ MODKEY|ShiftMask, XK_b, spawn, {.v = (const char*[]){ BROWSER_CMD, NULL } } },
|
|
||||||
{ MODKEY, XK_b, spawn, SHCMD(TERMINAL_CMD " -e bookmark-find") },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* button definitions */
|
/* button definitions */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# dwm version
|
# dwm version
|
||||||
VERSION = 6.7
|
VERSION = 6.6
|
||||||
|
|
||||||
# Customize below to fit your system
|
# Customize below to fit your system
|
||||||
|
|
||||||
|
|||||||
8
dwm.c
8
dwm.c
@@ -953,7 +953,6 @@ getatomprop(Client *c, Atom prop)
|
|||||||
|
|
||||||
if (XGetWindowProperty(dpy, c->win, prop, 0L, sizeof atom, False, XA_ATOM,
|
if (XGetWindowProperty(dpy, c->win, prop, 0L, sizeof atom, False, XA_ATOM,
|
||||||
&da, &di, &dl, &dl, &p) == Success && p) {
|
&da, &di, &dl, &dl, &p) == Success && p) {
|
||||||
if (dl > 0)
|
|
||||||
atom = *(Atom *)p;
|
atom = *(Atom *)p;
|
||||||
XFree(p);
|
XFree(p);
|
||||||
}
|
}
|
||||||
@@ -1402,13 +1401,6 @@ resizeclient(Client *c, int x, int y, int w, int h)
|
|||||||
c->oldw = c->w; c->w = wc.width = w;
|
c->oldw = c->w; c->w = wc.width = w;
|
||||||
c->oldh = c->h; c->h = wc.height = h;
|
c->oldh = c->h; c->h = wc.height = h;
|
||||||
wc.border_width = c->bw;
|
wc.border_width = c->bw;
|
||||||
if (((nexttiled(c->mon->clients) == c && !nexttiled(c->next))
|
|
||||||
|| &monocle == c->mon->lt[c->mon->sellt]->arrange)
|
|
||||||
&& !c->isfullscreen && !c->isfloating) {
|
|
||||||
c->w = wc.width += c->bw * 2;
|
|
||||||
c->h = wc.height += c->bw * 2;
|
|
||||||
wc.border_width = 0;
|
|
||||||
}
|
|
||||||
XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
|
XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
|
||||||
configure(c);
|
configure(c);
|
||||||
XSync(dpy, False);
|
XSync(dpy, False);
|
||||||
|
|||||||
Reference in New Issue
Block a user