From 649fa377d564755ec9060fb798e06fbd0b608774 Mon Sep 17 00:00:00 2001 From: pryazha Date: Wed, 1 Jan 2025 22:01:03 +0500 Subject: initial commit --- config.h | 141 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 config.h (limited to 'config.h') diff --git a/config.h b/config.h new file mode 100644 index 0000000..b2872b8 --- /dev/null +++ b/config.h @@ -0,0 +1,141 @@ +static const unsigned int borderpx = 3; +static const unsigned int gappx = 10; +static const unsigned int snap = 32; +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; +static const int showbar = 0; +static const int topbar = 1; +static const char *fonts[] = { "Iosevka:size=16" }; +static const char dmenufont[] = "Iosevka:size=16"; +/* +static const char *fonts[] = { "DepartureMono Nerd Font:size=15" }; +static const char dmenufont[] = "DepartureMono Nerd Font:size=15"; +*/ + +/* + * Gruvbox +static const char col_bg[] = "#282828"; +static const char col_gray2[] = "#444444"; +static const char col_bg3[] = "#665c54"; +static const char col_fg[] = "#ebdbb2"; +static const char col_purple[] = "#b16286"; +*/ +static const char col_bg[] = "#242829"; +static const char col_gray2[] = "#7b8b99"; +static const char col_bg3[] = "#4a4b4b"; +static const char col_fg[] = "#fcfcdf"; +static const char col_purple[] = "#13868c"; + +static const char *colors[][3] = { + [SchemeNorm] = { col_fg, col_bg, col_bg3 }, + [SchemeSel] = { col_fg, col_purple, col_purple }, +}; + +static const char *tags[] = { "1", "2", "3", "4", "5", }; + +static const Rule rules[] = { + /* class instance title tags mask isfloating monitor */ + { "feh", NULL, NULL, 0, 1, -1 }, + { "steam", NULL, NULL, 0, 1, -1 }, +}; + +static const float mfact = 0.5; /* factor of master 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[] = { + { "[]=", tile }, + { "><>", NULL }, + { "[M]", monocle }, +}; + +#include +#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", "-m", dmenumon, "-fn", dmenufont, "-nb", col_bg, "-nf", col_fg, "-sb", col_purple, "-sf", col_fg, NULL }; +static const char *termcmd[] = { "st", NULL }; + +static const Key keys[] = { + /* modifier key function argument */ + { MODKEY, XK_p, spawn, {.v = dmenucmd } }, + { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, + { MODKEY, XK_b, togglebar, {0} }, + { MODKEY, XK_j, focusstack, {.i = +1 } }, + { MODKEY, XK_k, focusstack, {.i = -1 } }, + { MODKEY, XK_i, incnmaster, {.i = +1 } }, + { MODKEY, XK_d, incnmaster, {.i = -1 } }, + { MODKEY, XK_h, setmfact, {.f = -0.05} }, + { MODKEY, XK_l, setmfact, {.f = +0.05} }, + { MODKEY, XK_Return, zoom, {0} }, + { MODKEY, XK_Tab, view, {0} }, + { MODKEY|ShiftMask, XK_c, killclient, {0} }, + { 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|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_minus, setgaps, {.i = -1 } }, + { MODKEY, XK_equal, setgaps, {.i = +1 } }, + { MODKEY|ShiftMask, XK_equal, setgaps, {.i = 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} }, + + /* custom */ + { 0, XF86XK_AudioMute, spawn, SHCMD("pactl set-sink-mute @DEFAULT_SINK@ toggle && kill -35 $(pidof dwmblocks)") }, + { 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pactl set-sink-volume @DEFAULT_SINK@ -5% && kill -35 $(pidof dwmblocks)") }, + { 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pactl set-sink-volume @DEFAULT_SINK@ +5% && kill -35 $(pidof dwmblocks)") }, + { 0, XF86XK_AudioPlay, spawn, SHCMD("playerctl play-pause") }, + { 0, XF86XK_AudioPause, spawn, SHCMD("playerctl play-pause") }, + { 0, XF86XK_AudioNext, spawn, SHCMD("playerctl next") }, + { 0, XF86XK_AudioPrev, spawn, SHCMD("playerctl previous") }, + { 0, XF86XK_MonBrightnessUp, spawn, SHCMD("brightnessctl s +10%") }, + { 0, XF86XK_MonBrightnessDown, spawn, SHCMD("brightnessctl s 10%-") }, + { MODKEY, XK_z, spawn, SHCMD("boomer") }, + { MODKEY, XK_s, spawn, SHCMD("maim_screenshot") }, +}; + +/* button definitions */ +/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ +static const Button buttons[] = { + /* click event mask button function argument */ + { ClkTagBar, MODKEY, Button1, tag, {0} }, + { ClkTagBar, MODKEY, Button3, toggletag, {0} }, + { 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} }, +}; + -- cgit v1.2.3