| tremoved font and color definitions - dwm - [fork] customized build of dwm, the… | |
| git clone git://src.adamsgaard.dk/dwm | |
| Log | |
| Files | |
| Refs | |
| README | |
| LICENSE | |
| --- | |
| commit 1edf6a7866ebe219bfa81a1b289fa5c8d0cdfbee | |
| parent 4db2f44277a29ad2c6c053846568667b27658f3f | |
| Author: Anselm R Garbe <[email protected]> | |
| Date: Sat, 14 Jun 2008 10:38:18 +0100 | |
| removed font and color definitions | |
| Diffstat: | |
| M config.def.h | 39 +++++++++++++++++------------… | |
| M dwm.c | 18 ++++++++---------- | |
| 2 files changed, 29 insertions(+), 28 deletions(-) | |
| --- | |
| diff --git a/config.def.h b/config.def.h | |
| t@@ -1,20 +1,20 @@ | |
| /* See LICENSE file for copyright and license details. */ | |
| /* appearance */ | |
| -#define FONT "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*" | |
| -#define NORMBORDERCOLOR "#cccccc" | |
| -#define NORMBGCOLOR "#cccccc" | |
| -#define NORMFGCOLOR "#000000" | |
| -#define SELBORDERCOLOR "#0066ff" | |
| -#define SELBGCOLOR "#0066ff" | |
| -#define SELFGCOLOR "#ffffff" | |
| -static uint borderpx = 1; /* border pixel of windows */ | |
| -static uint snap = 32; /* snap pixel */ | |
| -static Bool showbar = True; /* False means no bar */ | |
| -static Bool topbar = True; /* False means bottom bar */ | |
| +static const char font[] = "-*-terminus-medium-r-normal-*-14-*-*-*-… | |
| +static const char normbordercolor[] = "#cccccc"; | |
| +static const char normbgcolor[] = "#cccccc"; | |
| +static const char normfgcolor[] = "#000000"; | |
| +static const char selbordercolor[] = "#0066ff"; | |
| +static const char selbgcolor[] = "#0066ff"; | |
| +static const char selfgcolor[] = "#ffffff"; | |
| +static uint borderpx = 1; /* border pixel of windows */ | |
| +static uint snap = 32; /* snap pixel */ | |
| +static Bool showbar = True; /* False means no bar */ | |
| +static Bool topbar = True; /* False means bottom bar */ | |
| #ifdef XINERAMA | |
| -static uint xidx = 0; /* Xinerama screen index to use */ | |
| +static uint xidx = 0; /* Xinerama screen index to us… | |
| #endif | |
| /* tagging */ | |
| t@@ -45,12 +45,16 @@ static Layout layouts[] = { | |
| { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << … | |
| /* 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… | |
| +static const char *termcmd[] = { "uxterm", NULL }; | |
| static Key keys[] = { | |
| /* modifier key function argument */ | |
| - { MODKEY, XK_p, spawn, {.v = (char… | |
| - { MODKEY|ShiftMask, XK_Return, spawn, {.v = (char… | |
| + { MODKEY, XK_p, spawn, {.v = dmenu… | |
| + { MODKEY|ShiftMask, XK_Return, spawn, {.v = termc… | |
| { MODKEY, XK_b, togglebar, {0} }, | |
| { MODKEY, XK_j, focusstack, {.i = +1 } … | |
| { MODKEY, XK_k, focusstack, {.i = -1 } … | |
| t@@ -89,15 +93,14 @@ static Button buttons[] = { | |
| /* click event mask button function … | |
| { ClkLtSymbol, 0, Button1, togglelayout, … | |
| { ClkLtSymbol, 0, Button3, togglemax, … | |
| - { ClkWinTitle, 0, Button1, movemouse, … | |
| { ClkWinTitle, 0, Button2, zoom, … | |
| - { ClkWinTitle, 0, Button3, resizemouse, … | |
| + { ClkStatusText, 0, Button2, spawn, … | |
| { ClkWinTitle, 0, Button4, focusstack, … | |
| { ClkWinTitle, 0, Button5, focusstack, … | |
| { ClkClientWin, MODKEY, Button1, movemouse, … | |
| { ClkClientWin, MODKEY, Button2, togglefloating… | |
| { ClkClientWin, MODKEY, Button3, resizemouse, … | |
| - { ClkRootWin, Button1Mask, Button3, spawn, … | |
| + { ClkRootWin, Button1Mask, Button3, spawn, … | |
| TAGBUTTONS(0) | |
| TAGBUTTONS(1) | |
| TAGBUTTONS(2) | |
| diff --git a/dwm.c b/dwm.c | |
| t@@ -1321,12 +1321,12 @@ setup(void) { | |
| /* init screen */ | |
| screen = DefaultScreen(dpy); | |
| root = RootWindow(dpy, screen); | |
| - initfont(FONT); | |
| + initfont(font); | |
| sx = 0; | |
| sy = 0; | |
| sw = DisplayWidth(dpy, screen); | |
| sh = DisplayHeight(dpy, screen); | |
| - bh = dc.font.height + 2; | |
| + bh = dc.h = dc.font.height + 2; | |
| lt = layouts; | |
| updategeom(); | |
| t@@ -1344,14 +1344,12 @@ setup(void) { | |
| cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur); | |
| /* init appearance */ | |
| - dc.norm[ColBorder] = getcolor(NORMBORDERCOLOR); | |
| - dc.norm[ColBG] = getcolor(NORMBGCOLOR); | |
| - dc.norm[ColFG] = getcolor(NORMFGCOLOR); | |
| - dc.sel[ColBorder] = getcolor(SELBORDERCOLOR); | |
| - dc.sel[ColBG] = getcolor(SELBGCOLOR); | |
| - dc.sel[ColFG] = getcolor(SELFGCOLOR); | |
| - initfont(FONT); | |
| - dc.h = bh; | |
| + dc.norm[ColBorder] = getcolor(normbordercolor); | |
| + dc.norm[ColBG] = getcolor(normbgcolor); | |
| + dc.norm[ColFG] = getcolor(normfgcolor); | |
| + dc.sel[ColBorder] = getcolor(selbordercolor); | |
| + dc.sel[ColBG] = getcolor(selbgcolor); | |
| + dc.sel[ColFG] = getcolor(selfgcolor); | |
| dc.drawable = XCreatePixmap(dpy, root, DisplayWidth(dpy, screen), bh, … | |
| dc.gc = XCreateGC(dpy, root, 0, 0); | |
| XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter); |