/* See LICENSE file for copyright and license details. */ /* appearance */ static const char font[] = "-*-Terminus-medium-r-*-*-7-*-*-*-*-*-*-standard"; static const char normbordercolor[] = "#000000"; static const char normbgcolor[] = "#000000"; static const char normfgcolor[] = "#aaaaaa"; static const char selbordercolor[] = "#535d6c"; static const char selbgcolor[] = "#333333"; static const char selfgcolor[] = "#ffffff"; static const char urgbordercolor[] = "#fff600"; static const char urgfgcolor[] = "#fff600"; static const char urgbgcolor[] = "#000000"; static const char vlinecolor[] = "#535d6c"; static const unsigned int borderpx = 1; /* border pixel of windows */ static const unsigned int snap = 16; /* snap pixel */ static const Bool showbar = True; /* False means no bar */ static const Bool topbar = True; /* False means bottom bar */ /* tag names */ enum { TagNone = 0, TagMain, TagWeb, TagCode, TagReading, TagIm, TagMusic, TagGames, TagMovies, TagMail }; #define TAG_NONE 0 #define TAG_MAIN 1 << 0 #define TAG_WEB 1 << 1 #define TAG_CODE 1 << 2 #define TAG_READING 1 << 3 #define TAG_IM 1 << 4 #define TAG_MUSIC 1 << 5 #define TAG_GAMES 1 << 6 #define TAG_MOVIES 1 << 7 #define TAG_MAIL 1 << 8 static const char *tags[] = { "1", "2:web", "3:code", "4:reading", "5:im", "6:music", "7:games", "8:movies", "9:mail" }; static const Rule rules[] = { /* class instance title tags mask isfloating monitor */ { "Firefox", NULL, NULL, TAG_WEB, False, -1 }, { "Chromium", NULL, NULL, TAG_WEB, False, -1 }, { "Google-chrome", NULL, NULL, TAG_WEB, False, -1 }, { "surf", NULL, NULL, TAG_WEB, False, -1 }, { "Uzbl", NULL, NULL, TAG_WEB, False, -1 }, { "uzbl-browser-new-win", NULL, NULL, TAG_WEB, False, -1 }, { "Shiretoko", NULL, NULL, TAG_WEB, False, -1 }, { NULL, NULL, "mutt", TAG_MAIL, False, -1 }, { "dosbox", NULL, NULL, TAG_GAMES, False, -1 }, { "Zenity", NULL, NULL, TAG_NONE, True, -1 }, /* fullscreen flash */ { "", NULL, NULL, TAG_NONE, True, -1 } }; /* layout(s) */ static const float mfact = 0.5; /* 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 layoutaxis[] = { 1, /* layout axis: 1 = x, 2 = y; negative values mirror the layout, setting the master area to the right / bottom instead of left / top */ 2, /* master axis: 1 = x (from left to right), 2 = y (from top to bottom), 3 = z (monocle) */ 2, /* stack axis: 1 = x (from left to right), 2 = y (from top to bottom), 3 = z (monocle) */ }; /* layout names. */ enum { LayoutTile = 0, LayoutFloat, LayoutMonocle, LayoutFullscreen, LayoutSpiral, LayoutDwindle }; enum { LayoutDefault = LayoutTile }; static const Layout layouts[] = { /* symbol arrange function */ { .symbol = "[]=", .arrange = tile }, /* first entry is default */ { .symbol = "><>", .arrange = NULL }, /* no layout function means floating behavior */ { .symbol = "[M]", .arrange = monocle }, { .symbol = "[F]", .arrange = fullscreen }, { .symbol = NULL, .arrange = NULL }, }; /* Initialize some initial layouts per tag. */ #define SETUP_INITIAL_LAYOUTS(M) \ m->lts[TagWeb] = &layouts[LayoutMonocle]; \ m->lts[TagGames] = &layouts[LayoutMonocle]; \ m->lts[TagMovies] = &layouts[LayoutFullscreen]; /* key definitions */ #define MODKEY Mod4Mask #define ALTKEY 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} }, #define HOME "/home/hiltjo/" #define SCRIPTS_DIR HOME ".config/scripts/" /* commands */ static const char *dmenucmd[] = { SCRIPTS_DIR "/runmenu/runmenu.sh", NULL }; static const char *termcmd[] = { "xterm", NULL }; static const char *filemancmd[] = { SCRIPTS_DIR "filemanager.sh", NULL }; static const char *musiccmd[] = { SCRIPTS_DIR "mediakeys/play_pause.sh", NULL }; static const char *audiomediacmd[] = { SCRIPTS_DIR "mediakeys/media.sh", NULL }; static const char *audiomutecmd[] = { SCRIPTS_DIR "mediakeys/mute.sh", NULL }; static const char *audioraisecmd[] = { SCRIPTS_DIR "mediakeys/volume_up.sh", NULL }; static const char *audiolowercmd[] = { SCRIPTS_DIR "mediakeys/volume_down.sh", NULL }; static const char *favoritescmd[] = { SCRIPTS_DIR "mediakeys/favorites.sh", NULL }; static const char *mailcmd[] = { SCRIPTS_DIR "mediakeys/mail.sh", NULL }; static const char *homepagecmd[] = { SCRIPTS_DIR "mediakeys/www.sh", NULL }; static const char *printscreencmd[] = { SCRIPTS_DIR "printscreen.sh", NULL }; static const char *printscreenselectcmd[] = { SCRIPTS_DIR "printscreen.sh select", NULL }; static const char *lockscreencmd[] = { SCRIPTS_DIR "lock_screen.sh", NULL }; static const char *googlecmd[] = { SCRIPTS_DIR "google.sh", NULL }; static const char *searchcmd[] = { SCRIPTS_DIR "searchmenu/searchmenu.sh", NULL }; static const char *plumbcmd[] = { SCRIPTS_DIR "plumb.sh", NULL }; static Key keys[] = { /* modifier key function argument */ { 0, XF86XK_Music, spawn, {.v = musiccmd } }, { 0, XF86XK_AudioMedia, spawn, {.v = audiomediacmd } }, { 0, XF86XK_AudioMute, spawn, {.v = audiomutecmd } }, { 0, XF86XK_AudioRaiseVolume, spawn, {.v = audioraisecmd } }, { 0, XF86XK_AudioLowerVolume, spawn, {.v = audiolowercmd } }, { 0, XF86XK_Favorites, spawn, {.v = favoritescmd } }, { 0, XF86XK_Mail, spawn, {.v = mailcmd } }, { 0, XF86XK_HomePage, spawn, {.v = homepagecmd } }, { 0, XK_Print, spawn, {.v = printscreencmd } }, { ControlMask, XK_Print, spawn, {.v = printscreenselectcmd } }, { MODKEY, XK_s, spawn, {.v = searchcmd } }, { MODKEY, XK_x, spawn, {.v = lockscreencmd } }, { MODKEY, XK_e, spawn, {.v = filemancmd } }, { MODKEY, XK_p, spawn, {.v = dmenucmd } }, { MODKEY, XK_r, spawn, {.v = dmenucmd } }, { MODKEY, XK_z, spawn, {.v = plumbcmd } }, { MODKEY, XK_g, spawn, {.v = googlecmd } }, { MODKEY, XK_Return, spawn, {.v = termcmd } }, { MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } }, { ALTKEY, XK_Tab, focusstack, {.i = +1 } }, { ALTKEY|ShiftMask, XK_Tab, focusstack, {.i = -1 } }, { MODKEY, XK_Tab, focusmon, {.i = +1 } }, { MODKEY|ShiftMask, XK_Tab, focusmon, {.i = -1 } }, { MODKEY|ControlMask, XK_Tab, tagmon, {.i = +1 } }, { MODKEY|ControlMask|ShiftMask, XK_Tab, tagmon, {.i = -1 } }, { MODKEY, XK_h, setmfact, {.f = -0.01} }, { MODKEY, XK_l, setmfact, {.f = +0.01} }, { MODKEY, XK_BackSpace, zoom, {0} }, { MODKEY, XK_Tab, view, {0} }, { ALTKEY, XK_q, killclientfocus, {0} }, { MODKEY, XK_t, setlayout, {.v = &layouts[LayoutTile]} }, { MODKEY, XK_m, togglemax, {0} }, { MODKEY, XK_space, nextlayout, {0} }, { MODKEY|ControlMask, XK_space, prevlayout, {0} }, { MODKEY, XK_f, togglefullscreen, {0} }, { MODKEY|ShiftMask, XK_f, togglefloating, {0} }, { MODKEY, XK_0, view, {.ui = ~0 } }, { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, 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} }, }; /* button definitions */ /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ static Button buttons[] = { /* click event mask button function argument */ { ClkLtSymbol, 0, Button1, nextlayout, {0} }, { ClkLtSymbol, 0, Button2, setlayout, {.v = &layouts[LayoutMonocle]} }, { ClkLtSymbol, 0, Button3, prevlayout, {0} }, { ClkLtSymbol, 0, Button4, prevlayout, {0} }, { ClkLtSymbol, 0, Button5, nextlayout, {0} }, { ClkWinTitle, 0, Button1, focusonclick, {0} }, { ClkWinTitle, 0, Button2, killclientonclick, {0} }, { ClkWinTitle, 0, Button3, maxonclick, {0} }, { ClkWinTitle, 0, Button4, focusstack, {.i = +1 } }, { ClkWinTitle, 0, Button5, focusstack, {.i = -1 } }, { ClkClientWin, MODKEY, Button1, tilemovemouse, {0} }, { ClkClientWin, MODKEY, Button2, killclientfocus, {0} }, { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, { ClkTagBar, 0, Button1, view, {0} }, { ClkTagBar, 0, Button3, toggleview, {0} }, { ClkTagBar, ControlMask, Button1, toggleview, {0} }, { ClkTagBar, ControlMask, Button3, toggletag, {0} }, { ClkTagBar, MODKEY, Button1, toggleview, {0} }, { ClkTagBar, MODKEY, Button3, toggletag, {0} }, };