/* See LICENSE file for copyright and license details. */ /* appearance */ static const char font[] = "-*-fixed-medium-r-*-*-12-*-*-*-*-*-iso8859-*"; static const char normbordercolor[] = "#222222"; static const char normbgcolor[] = "#262626"; static const char normfgcolor[] = "#777777"; static const char selbordercolor[] = "#777777"; static const char selbgcolor[] = "#262626"; static const char selfgcolor[] = "#5496FF"; static const char* colors[NumColors][ColLast] = { // border foreground background { normbordercolor, normfgcolor, normbgcolor }, // normal { selbordercolor, selbgcolor, selfgcolor }, // selected { normbordercolor, selbgcolor, selfgcolor }, // warning { normbordercolor, "#ffffff", "#ff0000" }, // error { normbordercolor, "#7598b2", normbgcolor }, // delim { normbordercolor, "#b10000", normbgcolor }, // hot { normbordercolor, "#b15c00", normbgcolor }, // medium { normbordercolor, "#6cb100", normbgcolor }, // cool }; static const unsigned int borderpx = 4; //4 /* border pixel of windows */ static const unsigned int gappx = 6; //8 /* gap pixel between windows */ static const unsigned int snap = 0; /* snap pixel */ static const Bool showbar = True; /* False means no bar */ static const Bool topbar = True; /* False means bottom bar */ static const int nmaster = 2; /* default number of clients in the master area */ /* tagging */ static const char *tags[] = { " ⌂ ", "web", "dev", "media", "gfx", "off", "term", "misc", "im" }; #define ALL 0 #define MAIN 1 << 0 #define WEB 1 << 1 #define DEV 1 << 2 #define MEDIA 1 << 3 #define GFX 1 << 4 #define OFF 1 << 5 #define TERM 1 << 6 #define MISC 1 << 7 #define IM 1 << 8 static const Rule rules[] = { /* class instance title tags mask isfloating monitor */ { "wbar", NULL, NULL, ALL, True, -1 }, { NULL, NULL, "pad", ALL, True, -1 }, { NULL, NULL, "panel", MAIN, False, -1 }, { "Snapfly", NULL, NULL, MAIN, True, -1 }, { "Dropbox", NULL, NULL, MAIN, True, -1 }, { "Chromium", NULL, NULL, WEB, False, -1 }, { "Uzbl-core", NULL, NULL, WEB, False, -1 }, { "Codeblocks", NULL, NULL, DEV, False, -1 }, { "Gedit", NULL, NULL, DEV, False, -1 }, { "Gvim", NULL, NULL, DEV, False, -1 }, { "Vlc", NULL, NULL, MEDIA, False, -1 }, { "Mmc", NULL, NULL, MEDIA, False, -1 }, { "Xfburn", NULL, NULL, MEDIA, False, -1 }, { "Gimp", NULL, NULL, GFX, True, -1 }, { "Abiword", NULL, NULL, OFF, False, -1 }, { "Gnumeric", NULL, NULL, OFF, False, -1 }, { "Terminator", NULL, NULL, TERM, False, -1 }, { "Catfish.pyc", NULL, NULL, MISC, False, -1 }, { "File-roller" , NULL, NULL, MISC, False, -1 }, { "Gftp", NULL, NULL, MISC, False, -1 }, { "Lxappearance", NULL, NULL, MISC, False, -1 }, { "Thunar", NULL, NULL, MISC, False, -1 }, { "Transmission", NULL, NULL, MISC, False, -1 }, { "Viewnior", NULL, NULL, MISC, False, -1 }, { "Pidgin", NULL, NULL, IM, False, -1 }, }; /* layout(s) */ static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ static const Bool resizehints = True; /* True means respect size hints in tiled resizals */ #include "nmaster.c" #include "bstack.c" static const Layout layouts[] = { /* symbol arrange function */ { " T", tile }, /* first entry is default */ { " N", ntile }, { " B", nbstack }, { " S", bstack }, // { "[F]", NULL }, /* no layout function means floating behavior */ // { "[M]", monocle }, }; /* key definitions */ #define MODKEY Mod1Mask #define TAGKEYS(KEY,TAG) \ { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, /* helper for spawning shell commands in the pre dwm-5.0 fashion */ #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 *padcmd[] = { "urxvt", "-title", "pad", "-geometry", "80x5+600+60", NULL }; static const char *termcmd[] = { "urxvt", NULL }; static const char *startcmd[] = { "dwm-start", NULL }; static Key keys[] = { /* modifier key function argument */ { MODKEY, XK_p, spawn, {.v = dmenucmd } }, { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, { MODKEY, XK_w, spawn, {.v = startcmd } }, { MODKEY, XK_v, spawn, {.v = padcmd } }, { MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } }, { MODKEY, XK_h, setmfact, {.f = -0.05} }, { MODKEY, XK_l, setmfact, {.f = +0.05} }, { MODKEY, XK_Return, zoom, {0} }, { MODKEY, XK_Tab, view, {0} }, { MODKEY|ShiftMask, XK_c, killclient, {0} }, { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, { MODKEY, XK_space, setlayout, {0} }, { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, { MODKEY, XK_0, view, {.ui = ~0 } }, { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, { MODKEY, XK_comma, focusmon, {.i = -1 } }, { MODKEY, XK_period, focusmon, {.i = +1 } }, { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, TAGKEYS( 0x26, 0) TAGKEYS( 0xe9, 1) TAGKEYS( 0x22, 2) TAGKEYS( 0x27, 3) TAGKEYS( 0x28, 4) TAGKEYS( 0x2d, 5) TAGKEYS( 0xe8, 6) TAGKEYS( 0x5f, 7) TAGKEYS( 0xe7, 8) { MODKEY|ShiftMask, XK_q, quit, {0} }, }; /* button definitions */ /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ static Button buttons[] = { /* click event mask button function argument */ { ClkLtSymbol, 0, Button1, setlayout, {0} }, { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, { ClkWinTitle, 0, Button1, focusonclick, {0} }, { ClkWinTitle, 0, Button2, zoom, {0} }, { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, { ClkClientWin, MODKEY, Button1, movemouse, {0} }, { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, { ClkTagBar, 0, Button1, view, {0} }, { ClkTagBar, 0, Button3, toggleview, {0} }, { ClkTagBar, MODKEY, Button1, tag, {0} }, { ClkTagBar, MODKEY, Button3, toggletag, {0} }, };