/* See LICENSE file for copyright and license details. */ /* appearance */ static const unsigned int borderpx = 2; /* border pixel of windows */ static const unsigned int snap = 32; /* snap pixel */ static const unsigned int gappih = 7; /* horiz inner gap between windows */ static const unsigned int gappiv = 7; /* vert inner gap between windows */ static const unsigned int gappoh = 7; /* horiz outer gap between windows and screen edge */ static const unsigned int gappov = 7; /* vert outer gap between windows and screen edge */ static const int smartgaps_fact = 1; /* gap factor when there is only one client; 0 = no gaps, 3 = 3x outer gaps */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ static const int bar_height = 37; /* 0 means derive from font, >= 1 explicit height */ /* Status is to be shown on: -1 (all monitors), 0 (a specific monitor by index), 'A' (active monitor) */ static const int statusmon = 'A'; static const unsigned int ulinepad = 3; /* horizontal padding between the underline and tag */ static const unsigned int ulinestroke = 3; /* thickness / height of the underline */ static const unsigned int ulinevoffset = 0; /* how far above the bottom of the bar the line should appear */ static const int ulineall = 0; /* 1 to show underline on all tags, 0 for just the active ones */ /* Indicators: see patch/bar_indicators.h for options */ static int tagindicatortype = INDICATOR_NONE; static int tiledindicatortype = INDICATOR_NONE; static int floatindicatortype = INDICATOR_NONE; static const char *fonts[] = { "Iosevka Nerd Font:size=12:style=Regular", "Noto Color Emoji:size=12:antialias=true:autohint=true", "Material Design Icons Desktop:size=11"}; static char c000000[] = "#000000"; // placeholder value static char normfgcolor[] = "#bbbbbb"; static char normbgcolor[] = "#010101"; static char normbordercolor[] = "#212126"; static char normfloatcolor[] = "#212126"; static char selfgcolor[] = "#dbdbdf"; static char selbgcolor[] = "#bbbbbb"; static char selbordercolor[] = "#444444"; static char selfloatcolor[] = "#444444"; static char titlenormfgcolor[] = "#bbbbbb"; static char titlenormbgcolor[] = "#010101"; static char titlenormbordercolor[] = "#212126"; static char titlenormfloatcolor[] = "#212126"; static char titleselfgcolor[] = "#bbbbbb"; static char titleselbgcolor[] = "#010101"; static char titleselbordercolor[] = "#212126"; static char titleselfloatcolor[] = "#212126"; static char tagsnormfgcolor[] = "#dbdbdf"; static char tagsnormbgcolor[] = "#010101"; static char tagsnormbordercolor[] = "#dbdbdf"; static char tagsnormfloatcolor[] = "#dbdbdf"; static char tagsselfgcolor[] = "#656565"; static char tagsselbgcolor[] = "#010101"; static char tagsselbordercolor[] = "#656565"; static char tagsselfloatcolor[] = "#656565"; static char hidnormfgcolor[] = "#005577"; static char hidselfgcolor[] = "#227799"; static char hidnormbgcolor[] = "#222222"; static char hidselbgcolor[] = "#222222"; static char urgfgcolor[] = "#bbbbbb"; static char urgbgcolor[] = "#222222"; static char urgbordercolor[] = "#ff0000"; static char urgfloatcolor[] = "#db8fd9"; static char *colors[][ColCount] = { /* fg bg border float */ [SchemeNorm] = { normfgcolor, normbgcolor, normbordercolor, normfloatcolor }, [SchemeSel] = { selfgcolor, selbgcolor, selbordercolor, selfloatcolor }, [SchemeTitleNorm] = { titlenormfgcolor, titlenormbgcolor, titlenormbordercolor, titlenormfloatcolor }, [SchemeTitleSel] = { titleselfgcolor, titleselbgcolor, titleselbordercolor, titleselfloatcolor }, [SchemeTagsNorm] = { tagsnormfgcolor, tagsnormbgcolor, tagsnormbordercolor, tagsnormfloatcolor }, [SchemeTagsSel] = { tagsselfgcolor, tagsselbgcolor, tagsselbordercolor, tagsselfloatcolor }, [SchemeHidNorm] = { hidnormfgcolor, hidnormbgcolor, c000000, c000000 }, [SchemeHidSel] = { hidselfgcolor, hidselbgcolor, c000000, c000000 }, [SchemeUrg] = { urgfgcolor, urgbgcolor, urgbordercolor, urgfloatcolor }, }; static char *tagicons[][NUMTAGS] = { [DEFAULT_TAGS] = { " cmd ", " www ", " dev ", " chat ", " sys ", " med " }, [ALT_TAGS_DECORATION] = { "[cmd]", "[www]", "[dev]", "[chat]", "[sys]", "[med]" }, }; static const Rule rules[] = { RULE(.wintype = WTYPE "DIALOG", .isfloating = 1) RULE(.wintype = WTYPE "UTILITY", .isfloating = 1) RULE(.wintype = WTYPE "TOOLBAR", .isfloating = 1) RULE(.wintype = WTYPE "SPLASH", .isfloating = 1) RULE(.class = "Gimp", .tags = 1 << 4) RULE(.class = "Firefox", .tags = 1 << 7) }; static const BarRule barrules[] = { /* monitor bar alignment widthfunc drawfunc clickfunc hoverfunc name */ { -1, 0, BAR_ALIGN_LEFT, width_tags, draw_tags, click_tags, hover_tags, "tags" }, { -1, 0, BAR_ALIGN_LEFT, width_ltsymbol, draw_ltsymbol, click_ltsymbol, NULL, "layout" }, { statusmon, 0, BAR_ALIGN_RIGHT, width_status2d, draw_status2d, click_status2d, NULL, "status2d" }, { -1, 0, BAR_ALIGN_NONE, width_wintitle, draw_wintitle, click_wintitle, NULL, "wintitle" }, }; /* layout(s) */ static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ static const int nmaster = 1; /* number of clients in master area */ static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ static const Layout layouts[] = { /* symbol arrange function */ { "[]", tile }, /* first entry is default */ { "//", NULL }, /* no layout function means floating behavior */ { "[M]", monocle }, { "#", gaplessgrid }, }; /* 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 char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ static const char *dmenucmd[] = { "dmenu_run", "-h", "37", "-nf", "#bbbbbb", "-nb", "#010101", "-sf", "#dbdfdf", "-sb", "#010101", "-p", " | Search:", "-fn", "Iosevka Nerd Font:size=12:style=large", NULL }; static const char *termcmd[] = { "st", NULL }; static const char *screenshot_selectcmd[] = { "screenshot_select", NULL }; static const char *screenshotcmd[] = { "screenshot_fullscreen", NULL }; #include static const Key keys[] = { /* modifier key function argument */ { MODKEY, XK_d, spawn, {.v = dmenucmd } }, { MODKEY, XK_e, spawn, {.v = termcmd } }, { MODKEY, XK_Print, spawn, {.v = screenshotcmd} }, { MODKEY|ShiftMask, XK_Print, spawn, {.v = screenshot_selectcmd } }, { MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } }, { MODKEY|ShiftMask, XK_i, incnmaster, {.i = +1 } }, { MODKEY|ShiftMask, XK_d, incnmaster, {.i = -1 } }, { MODKEY, XK_h, setmfact, {.f = -0.05} }, { MODKEY, XK_l, setmfact, {.f = +0.05} }, { MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } }, { MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } }, { MODKEY, XK_Return, zoom, {0} }, { MODKEY|Mod1Mask, XK_u, incrgaps, {.i = +1 } }, { MODKEY|Mod1Mask|ShiftMask, XK_u, incrgaps, {.i = -1 } }, { MODKEY|Mod1Mask, XK_i, incrigaps, {.i = +1 } }, { MODKEY|Mod1Mask|ShiftMask, XK_i, incrigaps, {.i = -1 } }, { MODKEY|Mod1Mask, XK_o, incrogaps, {.i = +1 } }, { MODKEY|Mod1Mask|ShiftMask, XK_o, incrogaps, {.i = -1 } }, { MODKEY|Mod1Mask, XK_6, incrihgaps, {.i = +1 } }, { MODKEY|Mod1Mask|ShiftMask, XK_6, incrihgaps, {.i = -1 } }, { MODKEY|Mod1Mask, XK_7, incrivgaps, {.i = +1 } }, { MODKEY|Mod1Mask|ShiftMask, XK_7, incrivgaps, {.i = -1 } }, { MODKEY|Mod1Mask, XK_8, incrohgaps, {.i = +1 } }, { MODKEY|Mod1Mask|ShiftMask, XK_8, incrohgaps, {.i = -1 } }, { MODKEY|Mod1Mask, XK_9, incrovgaps, {.i = +1 } }, { MODKEY|Mod1Mask|ShiftMask, XK_9, incrovgaps, {.i = -1 } }, { MODKEY|Mod1Mask, XK_0, togglegaps, {0} }, { MODKEY|Mod1Mask|ShiftMask, XK_0, defaultgaps, {0} }, { MODKEY, XK_Tab, view, {0} }, { MODKEY, XK_w, killclient, {0} }, { MODKEY|ShiftMask, XK_q, quit, {0} }, { MODKEY|ControlMask|ShiftMask, XK_q, quit, {1} }, { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, { MODKEY, XK_z, setlayout, {.v = &layouts[1]} }, { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, { MODKEY, XK_x, setlayout, {.v = &layouts[3]} }, { MODKEY, XK_space, setlayout, {0} }, { MODKEY, XK_s, togglefloating, {0} }, { MODKEY, XK_f, togglefullscreen, {0} }, { MODKEY|ShiftMask, XK_f, fullscreen, {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) }; /* button definitions */ /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ static const Button buttons[] = { /* click event mask button function argument */ { ClkLtSymbol, 0, Button1, setlayout, {0} }, { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, { ClkWinTitle, 0, Button2, zoom, {0} }, { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, { ClkClientWin, MODKEY, Button1, moveorplace, {.i = 1} }, { 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} }, };