config.h 7.8 K raw
1
/* See LICENSE file for copyright and license details. */
2
/* appearance */
3
static const unsigned int borderpx  = 2;        /* border pixel of windows */
4
static const unsigned int gappx     = 25;        /* gaps between windows */
5
static const unsigned int snap      = 32;       /* snap pixel */
6
static const int showbar            = 1;        /* 0 means no bar */
7
static const int topbar             = 1;        /* 0 means bottom bar */
8
static const char *fonts[]          = { "BerkeleyMono Nerd Font:size=16", "monospace:size=16" };
9
static const char dmenufont[]       = "BerkeleyMono Nerd Font:size=16";
10
static const char col_bg[]          = "#121113";  /* background */
11
static const char col_fg[]          = "#ffffff";  /* foreground */
12
static const char col_selection[]   = "#222222";  /* selection bg */
13
static const char col_gray[]        = "#888888";  /* muted gray */
14
static const char col_accent[]      = "#fbcb97";  /* accent color */
15
static const char *colors[][3]      = {
16
	/*               fg         bg         border   */
17
	[SchemeNorm] = { col_fg,    col_bg,    col_gray     },
18
	[SchemeSel]  = { col_accent,    col_bg, col_accent  },
19
};
20
21
/* tagging */
22
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
23
24
static const Rule rules[] = {
25
	/* xprop(1):
26
	 *	WM_CLASS(STRING) = instance, class
27
	 *	WM_NAME(STRING) = title
28
	 */
29
	/* class      instance    title       tags mask     isfloating   monitor */
30
	{ "floatterm", NULL,      NULL,       0,            1,           -1 },
31
	{ "Gimp",     NULL,       NULL,       0,            1,           -1 },
32
	{ "Firefox",  NULL,       NULL,       1 << 8,       0,           -1 },
33
};
34
35
/* layout(s) */
36
static const float mfact     = 0.5; /* factor of master area size [0.05..0.95] */
37
static const int nmaster     = 1;    /* number of clients in master area */
38
static const int resizehints = 1;    /* 1 means respect size hints in tiled resizals */
39
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
40
static const int refreshrate = 120;  /* refresh rate (per second) for client move/resize */
41
#include "fibonacci.c"
42
43
static const Layout layouts[] = {
44
	/* symbol     arrange function */
45
	{ "",      dwindle },
46
	{ "",      NULL },    /* no layout function means floating behavior */
47
	{ "",      monocle },
48
	// { "",      tile },    /* first entry is default */
49
	// 	{ "[@]",      spiral },
50
};
51
52
/* key definitions */
53
#define MODKEY Mod4Mask
54
#define TAGKEYS(KEY,TAG) \
55
	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
56
	{ MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
57
	{ MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
58
	{ MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },
59
60
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
61
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
62
63
/* commands */
64
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
65
static const char *dmenucmd[] = {"/home/stevedylandev/dwm/list-scripts"};
66
static const char *termcmd[]  = { "wezterm", NULL };
67
static const char *floattermcmd[]  = { "wezterm", "start", "--class", "floatterm", NULL };
68
static const char *browsercmd[]  = { "chromium", "--force-device-scale-factor=1.2", NULL };
69
static const char *clipmenucmd[]  = { "clipmenu", NULL };
70
71
static const Key keys[] = {
72
	/* modifier                     key        function        argument */
73
	{ MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
74
	{ MODKEY,                       XK_Return, spawn,          {.v = termcmd } },
75
	{ Mod1Mask,                     XK_j,      spawn,          {.v = floattermcmd } },
76
	{ MODKEY,                       XK_b,			 spawn,          {.v = browsercmd }},
77
	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
78
	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
79
	{ MODKEY,                       XK_h,      focusstack,     {.i = -1 } },
80
	{ MODKEY,                       XK_l,      focusstack,     {.i = +1 } },
81
	{ MODKEY,                       XK_i,      incnmaster,     {.i = +1 } },
82
	{ MODKEY,                       XK_d,      incnmaster,     {.i = -1 } },
83
	{ MODKEY|ShiftMask,             XK_j,      movestack,      {.i = +1 } },
84
	{ MODKEY|ShiftMask,             XK_k,      movestack,      {.i = -1 } },
85
	{ MODKEY|ShiftMask,             XK_h,      movestack,      {.i = -1 } },
86
	{ MODKEY|ShiftMask,             XK_l,      movestack,      {.i = +1 } },
87
	{ MODKEY|ShiftMask,             XK_d,      setmfact,       {.f = -0.05} },
88
	{ MODKEY|ShiftMask,             XK_i,      setmfact,       {.f = +0.05} },
89
	{ MODKEY|ShiftMask,             XK_c,      spawn,       {.v = clipmenucmd} },
90
	{ MODKEY,                       XK_Return, zoom,           {0} },
91
	{ MODKEY,                       XK_Tab,    view,           {0} },
92
	//{ MODKEY|ShiftMask,             XK_c,      killclient,     {0} },
93
	{ MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
94
	{ MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
95
	{ MODKEY,                       XK_z,      setlayout,      {.v = &layouts[2]} },
96
	// { MODKEY,                       XK_r,      setlayout,      {.v = &layouts[3]} },
97
	// { MODKEY|ShiftMask,             XK_r,      setlayout,      {.v = &layouts[4]} },
98
	{ MODKEY,                       XK_space,  setlayout,      {0} },
99
	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
100
	{ MODKEY,                       XK_0,      view,           {.ui = ~0 } },
101
	{ MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
102
	{ MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
103
	{ MODKEY,                       XK_period, focusmon,       {.i = +1 } },
104
	{ MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },
105
	{ MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },
106
	{ MODKEY,                       XK_minus,  setgaps,        {.i = -1 } },
107
	{ MODKEY,                       XK_equal,  setgaps,        {.i = +1 } },
108
	{ MODKEY|ShiftMask,             XK_equal,  setgaps,        {.i = 0  } },
109
	TAGKEYS(                        XK_1,                      0)
110
	TAGKEYS(                        XK_2,                      1)
111
	TAGKEYS(                        XK_3,                      2)
112
	TAGKEYS(                        XK_4,                      3)
113
	TAGKEYS(                        XK_5,                      4)
114
	TAGKEYS(                        XK_6,                      5)
115
	TAGKEYS(                        XK_7,                      6)
116
	TAGKEYS(                        XK_8,                      7)
117
	TAGKEYS(                        XK_9,                      8)
118
	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },
119
};
120
121
/* button definitions */
122
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
123
static const Button buttons[] = {
124
	/* click                event mask      button          function        argument */
125
	{ ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
126
	{ ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
127
	{ ClkWinTitle,          0,              Button2,        zoom,           {0} },
128
	{ ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
129
	{ ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
130
	{ ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
131
	{ ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
132
	{ ClkTagBar,            0,              Button1,        view,           {0} },
133
	{ ClkTagBar,            0,              Button3,        toggleview,     {0} },
134
	{ ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
135
	{ ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
136
};
137