aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2023-01-31 09:25:32 -0500
committerMitchell Riedstra <mitch@riedstra.dev>2023-01-31 09:25:32 -0500
commit3651d036607d8daff79da9997e88004fb5139252 (patch)
tree03f9f50b56391e3d4a06b024eac3ad0cc285276d
parent3ec03e61f49231502ca7e5e87d7895bea90f11bc (diff)
downloaddwm-3651d036607d8daff79da9997e88004fb5139252.tar.gz
dwm-3651d036607d8daff79da9997e88004fb5139252.tar.xz
Add my personal configuration
-rw-r--r--config.h184
1 files changed, 184 insertions, 0 deletions
diff --git a/config.h b/config.h
new file mode 100644
index 0000000..1d236bb
--- /dev/null
+++ b/config.h
@@ -0,0 +1,184 @@
+/* See LICENSE file for copyright and license details. */
+
+#define PROFONT_LARGE "ProfontOTB:pixelsize=13:antialias=false:autohint=false"
+#define PROFONT_SMALL "ProfontOTB:pixelsize=10:antialias=false:autohint=false"
+#define ROBOTO_XLARGE "RobotoMono-Regular:pixelsize=18:antialias=true:autohint=true"
+#define FONT_SCIENTIFICA "scientifica:style=Bold:pixelsize=10:antialias=false:autohint=false"
+#define FONT_CURIE "curieMedium:pixelsize=10:antialias=false:autohint=false"
+#define TERMINUS_XLARGE "Terminus (TTF):pixelsize=18:antialias=false:autohint=false"
+#define TERMINUS_LARGE "Terminus (TTF):pixelsize=16:antialias=false:autohint=false"
+#define TERMINUS "Terminus (TTF):pixelsize=12:antialias=false:autohint=false"
+
+/* appearance */
+static const unsigned int borderpx = 1; /* border pixel of windows */
+static const unsigned int snap = 32; /* snap pixel */
+static const int showbar = 1; /* 0 means no bar */
+static const int topbar = 1; /* 0 means bottom bar */
+static const char *fonts[] = { FONT_SCIENTIFICA };
+static const char dmenufont[] = FONT_SCIENTIFICA;
+static const char col_gray1[] = "#3b4252";
+static const char col_gray2[] = "#4c566a";
+static const char col_gray3[] = "#eeeff4";
+static const char col_gray4[] = "#eceff4";
+static const char col_cyan[] = "#5e81ac";
+
+static const char *colors[][3] = {
+ /* fg bg border */
+ [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
+ [SchemeSel] = { col_gray4, col_cyan, "#00FFFF" },
+};
+
+/* tagging */
+static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+
+static const Rule rules[] = {
+ /* xprop(1):
+ * WM_CLASS(STRING) = instance, class
+ * WM_NAME(STRING) = title
+ */
+ /* class instance title tags mask isfloating monitor */
+ { "^St$", NULL, NULL, 1<<0, 0, -1 },
+ { "^Gimp$", NULL, NULL, 1<<2, 0, -1 },
+ { "^Pavucontrol$", NULL, NULL, 1<<6, 0, -1 },
+ { "^Blueman-manager$",NULL, NULL, 1<<6, 0, -1 },
+ { "^Claws-mail$", NULL, NULL, 1<<7, 0, -1 },
+ { "^Evolution$", NULL, NULL, 1<<7, 0, -1 },
+ { "^Zotero$", NULL, NULL, 1<<7, 0, -1 },
+ { "^Google-chrome$", NULL, NULL, 1<<8, 0, -1 },
+ { "^Chromium", NULL, NULL, 1<<8, 0, -1 },
+ { "^Firefox$", NULL, NULL, 1<<8, 0, -1 },
+ { "^code-oss$", NULL, NULL, 1<<1, 0, -1 },
+ { "^jetbrains.*$", NULL, NULL, 1<<2, 0, -1 },
+};
+
+/* layout(s) */
+static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
+static const float cfact = 0.5; /* factor of center area size [0.05..0.95] */
+static const int nmaster = 1; /* number of clients in master area */
+static const int resizehints = 1; /* 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 },
+ { "|M|", centeredmaster },
+ { ">M>", centeredfloatingmaster },
+ { "HHH", grid },
+ { "[@]", spiral },
+ { "[\\]", dwindle },
+ { "[C]", layoutCenter },
+};
+
+/* 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 } }
+
+#define DMENU_FLAGS "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4
+/* commands */
+static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
+static const char *dmenucmd[] = { "dmenu_run", DMENU_FLAGS, NULL };
+static const char *ddmenucmd[] = { "ddmenu", DMENU_FLAGS, NULL };
+static const char *termcmd[] = { "st", NULL };
+static const char *termcmdLarge[] = { "st", "-f", PROFONT_LARGE, NULL };
+static const char *termcmdXLarge[] = { "st", "-f", TERMINUS_XLARGE, NULL };
+static const char *passcmd[] = { "dpw-menu", DMENU_FLAGS, NULL };
+static const char *passcmd_type[] = { "dpw-menu", "--type", DMENU_FLAGS, NULL };
+static const char *passcmd_otp_type[] = { "dpw-menu", "--type", "--otp", DMENU_FLAGS, NULL };
+static const char *pastemenu[] = { "pm", NULL };
+static const char *snip_cmd[] = { "snipmenu", DMENU_FLAGS, NULL };
+static const char *screenshot_cmd[] = { "xfce4-screenshooter", NULL };
+static const char *file_cmd[] = { "thunar", NULL };
+static const char *slock_cmd[] = { "slock", NULL };
+static const char *volup_cmd[] = { "vol", "up", NULL };
+static const char *voldn_cmd[] = { "vol", "down", NULL };
+static const char *monitor_cmd[] = { "sh", "monitor/laptop", NULL };
+
+static const Key keys[] = {
+ /* modifier key function argument */
+ { MODKEY, XK_d, spawn, {.v = dmenucmd } },
+ { MODKEY|ShiftMask, XK_d, spawn, {.v = ddmenucmd } },
+ { MODKEY, XK_Return, spawn, {.v = termcmd } },
+ { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmdLarge } },
+ { MODKEY|ControlMask|ShiftMask, XK_Return, spawn, {.v = termcmdXLarge } },
+ { MODKEY|ShiftMask, XK_p, spawn, {.v = screenshot_cmd } },
+ { MODKEY, XK_p, spawn, {.v = passcmd } },
+ { MODKEY, XK_o, spawn, {.v = passcmd_type } },
+ { MODKEY|ControlMask, XK_o, spawn, {.v = passcmd_otp_type } },
+ { MODKEY|ShiftMask, XK_s, spawn, {.v = snip_cmd } },
+ { MODKEY, XK_backslash, spawn, {.v = pastemenu } },
+ { MODKEY|ControlMask, XK_f, spawn, {.v = file_cmd } },
+ { MODKEY|ControlMask, XK_l, spawn, {.v = slock_cmd } },
+ { MODKEY|ControlMask, XK_m, spawn, {.v = monitor_cmd } },
+ { 0, XK_Scroll_Lock, spawn, {.v = slock_cmd } },
+ { MODKEY, XK_b, togglebar, {0} },
+ { MODKEY, XK_j, focusstack, {.i = +1 } },
+ { MODKEY, XK_k, focusstack, {.i = -1 } },
+ { MODKEY|ShiftMask, XK_k, incnmaster, {.i = +1 } },
+ { MODKEY|ShiftMask, XK_j, incnmaster, {.i = -1 } },
+ { MODKEY, XK_h, setmfact, {.f = -0.05} },
+ { MODKEY, XK_l, setmfact, {.f = +0.05} },
+ { MODKEY, XK_equal, setcfact, {.f = +0.05} },
+ { MODKEY, XK_minus, setcfact, {.f = -0.05} },
+ { MODKEY|ShiftMask, XK_f, zoom, {0} },
+ { MODKEY, XK_Tab, view, {0} },
+ { MODKEY|ShiftMask, XK_q, killclient, {0} },
+ /* This makes it impossible to switch to alt globally, oh well */
+ { MODKEY|Mod1Mask, XK_f, togglefullscr, {0} },
+ { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
+ { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
+ { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
+ { MODKEY, XK_u, setlayout, {.v = &layouts[3]} },
+ { MODKEY|ShiftMask, XK_o, setlayout, {.v = &layouts[4]} },
+ { MODKEY, XK_g, setlayout, {.v = &layouts[5]} },
+ { MODKEY, XK_v, setlayout, {.v = &layouts[6]} },
+ { MODKEY|ShiftMask, XK_v, setlayout, {.v = &layouts[7]} },
+ { MODKEY, XK_c, setlayout, {.v = &layouts[8]} },
+ { 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 } },
+ { MODKEY, XK_Down, spawn, {.v = voldn_cmd } },
+ { MODKEY, XK_Up, spawn, {.v = volup_cmd } },
+ 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_r, restart, {0} },
+ { MODKEY|ShiftMask, XK_e, quit, {0} },
+};
+
+/* 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, 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} },
+};
+