summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorJakub Trzeciak <jptrzy@gmail.com>2023-09-11 17:18:18 +0200
committerJakub Trzeciak <jptrzy@gmail.com>2023-09-11 17:18:18 +0200
commit2028e66f39b0b24b17c37a6b67cbb5e48ed06883 (patch)
treeb85a39399803a0f2c5f88c05db2f9c0a1dc67c1f /config.h
parente81f17d4c196aaed6893fd4beed49991caa3e2a4 (diff)
downloaddwm-2028e66f39b0b24b17c37a6b67cbb5e48ed06883.tar.gz
dwm-2028e66f39b0b24b17c37a6b67cbb5e48ed06883.tar.bz2
dwm-2028e66f39b0b24b17c37a6b67cbb5e48ed06883.zip
Jptrzy's patches
Diffstat (limited to 'config.h')
-rw-r--r--config.h193
1 files changed, 193 insertions, 0 deletions
diff --git a/config.h b/config.h
new file mode 100644
index 0000000..4d5a8fe
--- /dev/null
+++ b/config.h
@@ -0,0 +1,193 @@
+/* See LICENSE file for copyright and license details. */
+
+/* appearance */
+static const unsigned int borderpx = 1; /* border pixel of windows */
+static const unsigned int snap = 32; /* snap pixel */
+static const int swallowfloating = 0; /* 1 means swallow floating windows by default */
+
+static const unsigned int gappih = 10; /* horiz inner gap between windows */
+static const unsigned int gappiv = 10; /* vert inner gap between windows */
+static const unsigned int gappoh = 5; /* horiz outer gap between windows and screen edge */
+static const unsigned int gappov = 5; /* vert outer gap between windows and screen edge */
+static int smartgaps = 1; /* 1 means no outer gap when there is only one window */
+
+static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
+static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */
+static const unsigned int systrayspacing = 2; /* systray spacing */
+static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
+static const int showsystray = 1; /* 0 means no systray */
+
+static const int showbar = 1; /* 0 means no bar */
+static const int topbar = 1; /* 0 means bottom bar */
+static const char *fonts[] = {
+ "Neo Comic Mono:pixelsize=14",
+ //"Noto Sans Mono:pixelsize=12",
+ "Font Awesome 6 Free Solid:size=10",
+};
+static const char dmenufont[] = "Noto Sans Mono:size=12";
+static const char col_gray1[] = "#222222";
+static const char col_gray2[] = "#444444";
+static const char col_gray3[] = "#bbbbbb";
+static const char col_gray4[] = "#eeeeee";
+static const char col_cyan[] = "#af18db";
+static const char *colors[][3] = {
+ /* fg bg border */
+ [SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
+ [SchemeSel] = { col_gray4, col_cyan, col_cyan },
+};
+
+/* tagging */
+static const char *tags[] = { "\uf015", "\uf120", "3", "4", "5", "6", "7", "\uf8d7", "\uf269" };
+
+static const Rule rules[] = {
+ /* xprop(1):
+ * WM_CLASS(STRING) = instance, class
+ * WM_NAME(STRING) = title
+ */
+ /* class instance title tags mask isfloating isterminal noswallow monitor */
+ { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 },
+ { "Firefox", NULL, NULL, 1 << 8, 0, 0, -1, -1 },
+ { "Alacritty",NULL, NULL, 0, 0, 1, 1, -1 },
+ { "Z-Space", NULL, NULL, 0, 0, 0, -1, -1 },
+ { NULL, NULL, "Event Tester", 0, 0, 0, 1, -1 }, /* xev */
+};
+
+/* 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 */
+
+#define FORCE_VSPLIT 1 /* nrowgrid layout: force two clients to always split vertically */
+#include "vanitygaps.c"
+
+static const Layout layouts[] = {
+ /* symbol arrange function */
+ { "[]=", tile }, /* first entry is default */
+ { "><>", 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 } }
+
+#define STATUSBAR "dwmblocks"
+
+/* commands */
+static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
+static const char *dmenucmd[] = { "dmenu_run", "-l", "16", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
+static const char *passmenu_cmd[] = { "passmenu", "-l", "16", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
+static const char *emojis_cmd[] = { "dmenu-emoji", "-l", "16", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
+static const char *trans_cmd[] = { "translate", NULL };
+
+static const char *termcmd[] = { "alacritty", NULL };
+
+static const char *brupcmd[] = { "light", "-A", "10", NULL };
+static const char *brdowncmd[] = { "light", "-U", "10", NULL };
+
+static const char *fmcmd[] = { "dbus-launch", "nautilus", "-w", NULL };
+
+static const char *vol_up_cmd[] = { "pactl", "set-sink-volume", "@DEFAULT_SINK@", "+5%", NULL };
+static const char *vol_mute_cmd[] = { "pactl", "set-sink-mute", "@DEFAULT_SINK@", "toggle", NULL };
+static const char *vol_down_cmd[] = { "pactl", "set-sink-volume", "@DEFAULT_SINK@", "-5%", NULL };
+
+static const char *mic_down_cmd[] = { "pactl", "set-source-mute", "@DEFAULT_SOURCE@", "toggle", NULL };
+
+#include <X11/XF86keysym.h>
+
+static const Key keys[] = {
+ /* modifier key function argument */
+
+ { MODKEY, XK_u, spawn, {.v = trans_cmd } },
+ { MODKEY, XK_d, spawn, {.v = dmenucmd } },
+ { MODKEY, XK_p, spawn, {.v = passmenu_cmd } },
+ { MODKEY, XK_o, spawn, {.v = emojis_cmd } },
+ { MODKEY, XK_Return, spawn, {.v = termcmd } },
+
+ { MODKEY, XK_f, togglefullscr, {0} },
+
+ { MODKEY|ShiftMask, XK_q, killclient, {0} },
+ { MODKEY|ShiftMask, XK_e, quit, {0} },
+
+ { MODKEY, XK_m, spawn, {.v = fmcmd } },
+
+ { 0, XF86XK_MonBrightnessUp, spawn, {.v = brupcmd} },
+ { 0, XF86XK_MonBrightnessDown, spawn, {.v = brdowncmd} },
+
+ { 0, XF86XK_AudioRaiseVolume, spawn, {.v = vol_up_cmd} },
+ { 0, XF86XK_AudioMute, spawn, {.v = vol_mute_cmd} },
+ { 0, XF86XK_AudioLowerVolume, spawn, {.v = vol_down_cmd} },
+
+ { 0, XF86XK_AudioMicMute, spawn, {.v = mic_down_cmd} },
+
+
+ //{ 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, XK_b, togglebar, {0} },
+ //{ MODKEY, XK_Return, zoom, {0} },
+ //{ MODKEY, XK_Tab, view, {0} },
+ //{ MODKEY, XK_0, view, {.ui = ~0 } },
+ //{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
+
+// Monitors
+ //{ 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_space, zoom, {0} },
+ { MODKEY|ShiftMask, XK_space, togglefloating, {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} },
+
+ 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)
+};
+
+/* 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 } },
+
+ /* DwmBlocks Patch */
+ { ClkStatusText, 0, Button1, sigstatusbar, {.i = 1} },
+ { ClkStatusText, 0, Button2, sigstatusbar, {.i = 2} },
+ { ClkStatusText, 0, Button3, sigstatusbar, {.i = 3} },
+
+ { 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} },
+};
+
Software created with 💖