#include "X11/XF86keysym.h" /* appearance */ static const char font[] = "-*-stlarch-medium-r-*-*-10-*-*-*-*-*-iso8859-*" "," "-*-tamzen-medium-*-normal-*-9-*-*-*-*-*-iso8859-*"; #define NUMCOLORS 21 static const char colors[NUMCOLORS][ColLast][21] = { // border foreground background { "#594b4b", "#594b4b", "#231e1d" }, // 01 - normal { "#423a3a", "#dadada", "#241e1d" }, // 02 - selected { "#888888", "#069a4c", "#231e1d" }, // 03 - urgent { "#231e1d", "#423a3a", "#231e1d" }, // 04 - black { "#231e1d", "#8c635a", "#231e1d" }, // 05 - red { "#231e1d", "#c4c195", "#231e1d" }, // 06 - green { "#231e1d", "#bfa599", "#231e1d" }, // 07 - yellow { "#231e1d", "#a296b0", "#231e1d" }, // 08 - blue { "#231e1d", "#71686f", "#231e1d" }, // 09 - magenta { "#231e1d", "#000000", "#000000" }, // unusable { "#231e1d", "#5c4646", "#231e1d" }, // 0B - cyan { "#231e1d", "#bf988f", "#231e1d" }, // 0C - light gray { "#231e1d", "#bf988f", "#231e1d" }, // 0D - gray { "#231e1d", "#997a7e", "#231e1d" }, // 0E - light red { "#231e1d", "#c4cc99", "#231e1d" }, // 0F - light green { "#231e1d", "#e6cfca", "#231e1d" }, // 10 - light yellow { "#231e1d", "#a796b0", "#231e1d" }, // 11 - light blue { "#231e1d", "#998d98", "#231e1d" }, // 12 - light magenta { "#231e1d", "#878135", "#231e1d" }, // 13 - light cyan { "#231e1d", "#e4cab9", "#231e1d" }, // 14 - white { "#802635", "#BF9F5F", "#802635" }, // 15 - warning }; static const unsigned int borderpx = 1; // border pixel of windows static const unsigned int snap = 5; // snap pixel static const unsigned int systrayspacing = 1; // space between systray icons static const Bool showsystray = False; // False means no systray static const Bool showbar = True; // False means no bar static const Bool topbar = True; // False means bottom bar int marginbottom = 12; static Bool useicons = True; // False means use ascii symbols static const char scratchpadname[] = "Scratchpad"; /* layout(s) */ static const float mfact = 0.50; // factor of master area size [0.05..0.95] static const Bool resizehints = False; // True means respect size hints in tiled resizals static const int nmaster = 1; // default number of clients in the master area static const Layout layouts[] = { // icon symbol arrange function { "/home/fiddler/extras/all-dwm/dwm-config/icons/tile.xbm", "þ", tile }, { "/home/fiddler/extras/all-dwm/dwm-config/icons/bstack.xbm", "ü", bstack }, { "/home/fiddler/extras/all-dwm/dwm-config/icons/float.xbm", "ý", NULL }, // no layout function means floating behavior { "/home/fiddler/extras/all-dwm/dwm-config/icons/monocle.xbm", "ÿ", monocle }, { "/home/fiddler/extras/all-dwm/dwm-config/icons/grid.xbm", "ú", imgrid }, }; static const MonocleNumberedIcon monoclenumberedicons[] = { { "/home/fiddler/extras/all-dwm/dwm-config/icons/monocle0.xbm" }, { "/home/fiddler/extras/all-dwm/dwm-config/icons/monocle1.xbm" }, { "/home/fiddler/extras/all-dwm/dwm-config/icons/monocle2.xbm" }, { "/home/fiddler/extras/all-dwm/dwm-config/icons/monocle3.xbm" }, { "/home/fiddler/extras/all-dwm/dwm-config/icons/monocle4.xbm" }, { "/home/fiddler/extras/all-dwm/dwm-config/icons/monocle5.xbm" }, }; /* tagging */ static const Tag tags[] = { // name layout mfact nmaster { "", &layouts[0], -1, -1 }, { " ", &layouts[4], 0.22, -1 }, { " ", &layouts[0], 0.65, -1 }, { " ", &layouts[4], 0.65, -1 }, { " ", &layouts[3], -1, -1 }, { " layout >> ", &layouts[2], -1, -1 }, }; /* window rules */ static const Rule rules[] = { // class instance title tags mask isfloating iscentred monitor { "mpv", NULL, NULL, 0, True, -1 }, { "luakit", NULL, NULL, 1 << 3, False, -1 }, }; /* key definitions */ #define MODKEY Mod4Mask #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", "-i", "-fn", font, "-nb", colors[0][ColBG], "-nf", colors[1][ColFG],"-sb", colors[2][ColBG], "-sf", colors[1][ColFG], NULL }; static const char *termcmd[] = { "urxvtc", NULL }; static const char *scratchpadcmd[] = { "urxvtc", "-title", scratchpadname, "-geometry", "70x9+400+10", NULL }; //static const char *scrotcmd[] = { "scrot", "&&", "mv", "*.png", "~/pics/", NULL }; static const char *rangercmd[] ={ "urxvtc", "-e", "ranger", NULL}; static const char *musiccmd[] ={ "urxvtc", "-e", "ncmpcpp", NULL}; static const char *webcmd[] ={"luakit", NULL}; static const char *volup[] = { "amixer", "-q", "sset", "Master", "5%+", "unmute", NULL }; static const char *voldown[] = { "amixer", "-q", "sset", "Master", "5%-", "unmute", NULL }; static const char *volmute[] = { "amixer", "-q", "sset", "Master", "toggle", NULL }; static const char *mpdnext[] = { "mpc", "next", NULL }; static const char *mpdprev[] = { "mpc", "prev", NULL }; static const char *mpdstop[] = { "mpc", "stop", NULL }; static const char *tmuxcmd[] = { "urxvtc", "-title", "tmux", "-e", "tmux", "-2", "-f", "/home/fiddler/.tmux/tmux.conf", NULL }; #include "moveresize.c" static Key keys[] = { // modifier key function argument /* Here starts the moveresize keys */ { MODKEY, XK_Down, moveresize, {.v = (int []){ 0, 25, 0, 0 }}}, { MODKEY, XK_Up, moveresize, {.v = (int []){ 0, -25, 0, 0 }}}, { MODKEY, XK_Right, moveresize, {.v = (int []){ 25, 0, 0, 0 }}}, { MODKEY, XK_Left, moveresize, {.v = (int []){ -25, 0, 0, 0 }}}, { MODKEY|ShiftMask, XK_Down, moveresize, {.v = (int []){ 0, 0, 0, 25 }}}, { MODKEY|ShiftMask, XK_Up, moveresize, {.v = (int []){ 0, 0, 0, -25 }}}, { MODKEY|ShiftMask, XK_Right, moveresize, {.v = (int []){ 0, 0, 25, 0 }}}, { MODKEY|ShiftMask, XK_Left, moveresize, {.v = (int []){ 0, 0, -25, 0 }}}, /* Here ends the moveresize keys */ /* Here starts the nmaster keys */ { MODKEY, XK_i, incnmaster, {.i = +1 } }, { MODKEY, XK_d, incnmaster, {.i = -1 } }, /*{ MODKEY, XK_x, setnmaster, {.i = 2 } },*/ { MODKEY, XK_Tab, swapfocus, {0} }, { MODKEY, XK_d, spawn, {.v = rangercmd } }, { MODKEY, XK_p, spawn, {.v = dmenucmd } }, { MODKEY|ShiftMask, XK_z, spawn, {.v = musiccmd } }, { MODKEY|ControlMask, XK_Up, spawn, {.v = volup } }, { MODKEY|ControlMask, XK_Down, spawn, {.v = voldown } }, { MODKEY|ControlMask, XK_m, spawn, {.v = volmute } }, { MODKEY|ControlMask, XK_Right, spawn, {.v = mpdnext } }, { MODKEY|ControlMask, XK_Left, spawn, {.v = mpdprev } }, { MODKEY|ControlMask, XK_s, spawn, {.v = mpdstop } }, { MODKEY, XK_w, spawn, {.v = webcmd } }, { MODKEY|ShiftMask, XK_t, spawn, {.v = tmuxcmd } }, { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, { MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY|ShiftMask, XK_j, pushdown, {.i = +1 } }, { MODKEY|ShiftMask, XK_k, pushup, {.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|ShiftMask, XK_c, killclient, {0} }, { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, { MODKEY|ControlMask, XK_b, setlayout, {.v = &layouts[1]} }, { MODKEY, XK_f, setlayout, {.v = &layouts[2]} }, { MODKEY|ShiftMask, XK_f, togglefullscreen, {0} }, { MODKEY, XK_m, setlayout, {.v = &layouts[3]} }, { MODKEY, XK_g, setlayout, {.v = &layouts[4]} }, { 0, XK_F12, togglescratch, {.v = scratchpadcmd} }, { MODKEY|ShiftMask, XK_b, togglebar, {0} }, // { MODKEY, XK_b, togglebottombar,{0} }, { 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( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) TAGKEYS( XK_4, 3) TAGKEYS( XK_5, 4) TAGKEYS( XK_6, 5) TAGKEYS( XK_7, 6) TAGKEYS( XK_8, 7) TAGKEYS( XK_9, 8) { MODKEY|ShiftMask, XK_q, quit, {0} }, /*{ 0, XF86XK_Launch1, spawn, {.v = screenoffcmd } }, { 0, XF86XK_PowerOff, spawn, {.v = shutdowncmd } }, { 0, XF86XK_AudioLowerVolume, spawn, {.v = voldowncmd } }, { 0, XF86XK_AudioMute, spawn, {.v = voltogglecmd } }, { 0, XF86XK_AudioRaiseVolume, spawn, {.v = volupcmd } }, */ }; #include "tilemovemouse.c" /* 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} }, { ClkWinTitle, 0, Button1, focusstack, {.i = +1 } }, { ClkWinTitle, 0, Button3, focusstack, {.i = -1 } }, { ClkClientWin, MODKEY, Button1, tilemovemouse, {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} }, /*{ ClkRootWin, 0, Button3, spawn, {.v = menucmd } }, { ClkStatusText, 0, Button3, spawn, {.v = menucmd } }, */ };