forked from mirror/dwm
removed font and color definitions
This commit is contained in:
parent
4db2f44277
commit
1edf6a7866
2 changed files with 29 additions and 28 deletions
39
config.def.h
39
config.def.h
|
@ -1,20 +1,20 @@
|
||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
|
|
||||||
/* appearance */
|
/* appearance */
|
||||||
#define FONT "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*"
|
static const char font[] = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*";
|
||||||
#define NORMBORDERCOLOR "#cccccc"
|
static const char normbordercolor[] = "#cccccc";
|
||||||
#define NORMBGCOLOR "#cccccc"
|
static const char normbgcolor[] = "#cccccc";
|
||||||
#define NORMFGCOLOR "#000000"
|
static const char normfgcolor[] = "#000000";
|
||||||
#define SELBORDERCOLOR "#0066ff"
|
static const char selbordercolor[] = "#0066ff";
|
||||||
#define SELBGCOLOR "#0066ff"
|
static const char selbgcolor[] = "#0066ff";
|
||||||
#define SELFGCOLOR "#ffffff"
|
static const char selfgcolor[] = "#ffffff";
|
||||||
static uint borderpx = 1; /* border pixel of windows */
|
static uint borderpx = 1; /* border pixel of windows */
|
||||||
static uint snap = 32; /* snap pixel */
|
static uint snap = 32; /* snap pixel */
|
||||||
static Bool showbar = True; /* False means no bar */
|
static Bool showbar = True; /* False means no bar */
|
||||||
static Bool topbar = True; /* False means bottom bar */
|
static Bool topbar = True; /* False means bottom bar */
|
||||||
|
|
||||||
#ifdef XINERAMA
|
#ifdef XINERAMA
|
||||||
static uint xidx = 0; /* Xinerama screen index to use */
|
static uint xidx = 0; /* Xinerama screen index to use */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* tagging */
|
/* tagging */
|
||||||
|
@ -45,12 +45,16 @@ static Layout layouts[] = {
|
||||||
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
|
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
|
||||||
|
|
||||||
/* 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 = (char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||||
|
|
||||||
|
/* commands */
|
||||||
|
static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
|
||||||
|
static const char *termcmd[] = { "uxterm", NULL };
|
||||||
|
|
||||||
static Key keys[] = {
|
static Key keys[] = {
|
||||||
/* modifier key function argument */
|
/* modifier key function argument */
|
||||||
{ MODKEY, XK_p, spawn, {.v = (char *[]){"dmenu_run", "-fn", FONT, "-nb", NORMBGCOLOR, "-nf", NORMFGCOLOR, "-sb", SELBGCOLOR, "-sf", SELFGCOLOR, NULL}} },
|
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||||
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = (char *[]){"uxterm", NULL}} },
|
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
||||||
{ MODKEY, XK_b, togglebar, {0} },
|
{ MODKEY, XK_b, togglebar, {0} },
|
||||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||||
|
@ -89,15 +93,14 @@ static Button buttons[] = {
|
||||||
/* click event mask button function argument */
|
/* click event mask button function argument */
|
||||||
{ ClkLtSymbol, 0, Button1, togglelayout, {0} },
|
{ ClkLtSymbol, 0, Button1, togglelayout, {0} },
|
||||||
{ ClkLtSymbol, 0, Button3, togglemax, {0} },
|
{ ClkLtSymbol, 0, Button3, togglemax, {0} },
|
||||||
{ ClkWinTitle, 0, Button1, movemouse, {0} },
|
|
||||||
{ ClkWinTitle, 0, Button2, zoom, {0} },
|
{ ClkWinTitle, 0, Button2, zoom, {0} },
|
||||||
{ ClkWinTitle, 0, Button3, resizemouse, {0} },
|
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
|
||||||
{ ClkWinTitle, 0, Button4, focusstack, {.i = +1 } },
|
{ ClkWinTitle, 0, Button4, focusstack, {.i = +1 } },
|
||||||
{ ClkWinTitle, 0, Button5, focusstack, {.i = -1 } },
|
{ ClkWinTitle, 0, Button5, focusstack, {.i = -1 } },
|
||||||
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
|
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
|
||||||
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
|
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
|
||||||
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
|
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
|
||||||
{ ClkRootWin, Button1Mask, Button3, spawn, {.v = (char *[]){"uxterm", NULL}} },
|
{ ClkRootWin, Button1Mask, Button3, spawn, {.v = termcmd } },
|
||||||
TAGBUTTONS(0)
|
TAGBUTTONS(0)
|
||||||
TAGBUTTONS(1)
|
TAGBUTTONS(1)
|
||||||
TAGBUTTONS(2)
|
TAGBUTTONS(2)
|
||||||
|
|
18
dwm.c
18
dwm.c
|
@ -1321,12 +1321,12 @@ setup(void) {
|
||||||
/* init screen */
|
/* init screen */
|
||||||
screen = DefaultScreen(dpy);
|
screen = DefaultScreen(dpy);
|
||||||
root = RootWindow(dpy, screen);
|
root = RootWindow(dpy, screen);
|
||||||
initfont(FONT);
|
initfont(font);
|
||||||
sx = 0;
|
sx = 0;
|
||||||
sy = 0;
|
sy = 0;
|
||||||
sw = DisplayWidth(dpy, screen);
|
sw = DisplayWidth(dpy, screen);
|
||||||
sh = DisplayHeight(dpy, screen);
|
sh = DisplayHeight(dpy, screen);
|
||||||
bh = dc.font.height + 2;
|
bh = dc.h = dc.font.height + 2;
|
||||||
lt = layouts;
|
lt = layouts;
|
||||||
updategeom();
|
updategeom();
|
||||||
|
|
||||||
|
@ -1344,14 +1344,12 @@ setup(void) {
|
||||||
cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur);
|
cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur);
|
||||||
|
|
||||||
/* init appearance */
|
/* init appearance */
|
||||||
dc.norm[ColBorder] = getcolor(NORMBORDERCOLOR);
|
dc.norm[ColBorder] = getcolor(normbordercolor);
|
||||||
dc.norm[ColBG] = getcolor(NORMBGCOLOR);
|
dc.norm[ColBG] = getcolor(normbgcolor);
|
||||||
dc.norm[ColFG] = getcolor(NORMFGCOLOR);
|
dc.norm[ColFG] = getcolor(normfgcolor);
|
||||||
dc.sel[ColBorder] = getcolor(SELBORDERCOLOR);
|
dc.sel[ColBorder] = getcolor(selbordercolor);
|
||||||
dc.sel[ColBG] = getcolor(SELBGCOLOR);
|
dc.sel[ColBG] = getcolor(selbgcolor);
|
||||||
dc.sel[ColFG] = getcolor(SELFGCOLOR);
|
dc.sel[ColFG] = getcolor(selfgcolor);
|
||||||
initfont(FONT);
|
|
||||||
dc.h = bh;
|
|
||||||
dc.drawable = XCreatePixmap(dpy, root, DisplayWidth(dpy, screen), bh, DefaultDepth(dpy, screen));
|
dc.drawable = XCreatePixmap(dpy, root, DisplayWidth(dpy, screen), bh, DefaultDepth(dpy, screen));
|
||||||
dc.gc = XCreateGC(dpy, root, 0, 0);
|
dc.gc = XCreateGC(dpy, root, 0, 0);
|
||||||
XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter);
|
XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter);
|
||||||
|
|
Loading…
Reference in a new issue