.dotfiles/.config/suckless/dwm-6.4/config.h
2023-11-12 11:53:36 +01:00

127 lines
7.4 KiB
C

/* See LICENSE file for copyright and license details. */
#include <X11/XF86keysym.h>
/* appearance */
static const unsigned int borderpx = 2; /* 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[] = { "monospace:size=10" };
static const char dmenufont[] = "monospace:size=10";
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { "#bbbbbb", "#222222", "#444444" },
[SchemeSel] = { "#eeeeee", "#005577", "#005577" },
};
/* tagging */
static const char *tags[] = {
"TTY", "WEB", "DEV",
"SBX", "GAM", "MED",
"SYS", "SRV", "ETC"
};
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating monitor */
{ NULL, NULL, NULL, 0, 0, -1 },
};
/* layout(s) */
static const float mfact = .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[] = {
/* arrange function */
{ tile }, /* first entry is default */
{ monocle },
};
/* key definitions */
#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
/* commands */
static const char *dmenucmd[] = { "dmenu_run", "-i", "-fn", dmenufont, NULL };
static const char *termcmd[] = { "alacritty", NULL };
static const char *calccmd[] = { "alacritty", "-epython", NULL };
static const char *wwwcmd[] = { "firefox", NULL };
static const char *pwwwcmd[] = { "firefox", "--private-window", NULL };
static const char *fmcmd[] = { "pcmanfm", NULL };
static const char *lockcmd[] = { "lock", NULL };
static const char *prtsccmd[] = { "flameshot", "full", "-c", NULL };
static const char *prtscrectcmd[] = { "flameshot", "gui", NULL };
static const char *lvolcmd[] = { "set-vol", "-5", NULL };
static const char *rvolcmd[] = { "set-vol", "+5", NULL };
static const char *mutecmd[] = { "set-vol", "m", NULL };
static const char *micmutecmd[] = { "wpctl", "set-mute", "@DEFAULT_SOURCE@", "toggle", NULL };
static const char *pausecmd[] = { "playerctl", "play-pause", NULL };
static const char *prevcmd[] = { "playerctl", "previous", NULL };
static const char *nextcmd[] = { "playerctl", "next", NULL };
static const char *stopcmd[] = { "playerctl", "stop", NULL };
static const char *lbrtcmd[] = { "set-light", "-10", NULL };
static const char *rbrtcmd[] = { "set-light", "+10", NULL };
static const Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_r, spawn, {.v = dmenucmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, spawn, {.v = wwwcmd } },
{ MODKEY|ShiftMask, XK_b, spawn, {.v = pwwwcmd } },
{ MODKEY, XK_e, spawn, {.v = fmcmd } },
{ MODKEY, XK_l, spawn, {.v = lockcmd } },
{ 0, XK_Print, spawn, {.v = prtsccmd } },
{ ShiftMask, XK_Print, spawn, {.v = prtscrectcmd } },
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = lvolcmd } },
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = rvolcmd } },
{ 0, XF86XK_AudioMute, spawn, {.v = mutecmd } },
{ 0, XF86XK_AudioMicMute, spawn, {.v = micmutecmd } },
{ ControlMask, XF86XK_AudioMute, spawn, {.v = micmutecmd } },
{ 0, XF86XK_AudioPlay, spawn, {.v = pausecmd } },
{ 0, XF86XK_AudioPrev, spawn, {.v = prevcmd } },
{ 0, XF86XK_AudioNext, spawn, {.v = nextcmd } },
{ 0, XF86XK_AudioStop, spawn, {.v = stopcmd } },
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = lbrtcmd } },
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = rbrtcmd } },
{ 0, XF86XK_Calculator, spawn, {.v = calccmd} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY|ShiftMask, XK_z, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0] } },
{ MODKEY, XK_m, setlayout, {.v = &layouts[1] } },
{ MODKEY, XK_space, togglefloating, {0} },
{ MODKEY, XK_f, togglefullscr, {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)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
};
/* button definitions */
/* click can be ClkTagBar, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static const Button buttons[] = {
/* click event mask button function argument */
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
};