summaryrefslogtreecommitdiff
path: root/config.def.h
blob: 2c53956a4458801983dd148c789c179649317ab6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
/* See LICENSE file for copyright and license details. */

/* appearance */
static const unsigned int borderpx  = 0;        /* border pixel of windows */
static const unsigned int gappx     = 3;       /* gap pixel between windows */
static const unsigned int snap      = 15;       /* snap pixel */
static const int swallowfloating    = 1;        /* 1 means swallow floating windows by default */
static const int showbar            = 1;        /* 0 means no bar */
static const int topbar             = 1;        /* 0 means bottom bar */
static const int user_bh            = 28;        /* 0 means that dwm will calculate bar height, >= 1 means dwm will user_bh as bar height */
static const char *fonts[]          = { "monospace:size=12" };
static const char dmenufont[]       = "monospace:size=12";
static const char col_norm_fg[]     = "#447a6c";
/* static const char col_norm_fg[]     = "#83969D"; */
static const char col_norm_bg[]     = "#1b1d1b";
static const char col_sel_fg[]      = "#1b1d1b";
static const char col_sel_bg[]      = "#7D4B23";
static const char col_norm_border[] = "#C0FFEE";
static const char col_sel_border[]  = "#BADA55";

/* static const char col_gray1[]       = "#222d32"; */
/* static const char col_gray2[]       = "#343e42"; */
/* static const char col_white[]       = "#f2f1f0"; */
/* static const char col_gray4[]       = "#aaccbb"; */
/* static const char col_cyan[]        = "#42717b"; */

#define baralpha 0xd0
#define borderalpha OPAQUE

static const char *colors[][3]      = {
	/*               fg           bg           border   */
	[SchemeNorm] = { col_norm_fg, col_norm_bg, col_norm_border },
	[SchemeSel]  = { col_sel_fg,  col_sel_bg,  col_sel_border },
};
/* static const char *colors[][3]      = { */
/* 	/1*               fg         bg         border   *1/ */
/* 	[SchemeNorm] = { col_white, col_gray1, col_gray2 }, */
/* 	[SchemeSel]  = { col_gray4, col_cyan,  col_cyan  }, */
/* }; */
static const unsigned int alphas[][3]      = {
	/*               fg      bg        border     */
	[SchemeNorm] = { OPAQUE, baralpha, borderalpha },
	[SchemeSel]  = { OPAQUE, baralpha, borderalpha },
};

/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static const char *montags[] = { " I ", "II", "III", "IV"};

static const Rule rules[] = {
	/* xprop(1):
	 *	WM_CLASS(STRING) = instance, class
	 *	WM_NAME(STRING) = title
	 */
	/* class     instance  title           tags mask  iscentered  isfloating  isterminal  noswallow  monitor canfocus */
	/* { "Gimp",    NULL,     NULL,           0,         0,          1,          0,           0,        -1,     1 }, */
	/* { "Firefox", NULL,     NULL,           1 << 8,    0,          0,          0,           0,        -1,     1 }, */
	{ NULL,      NULL,     "Picture-in-Picture",1,    0,          0,          0,           0,        -1,     1 },
	{ "St",      NULL,     NULL,           0,         0,          0,          1,           0,        -1,     1 },
	{ "dropdown",NULL,     NULL,           0,         1,          1,          0,           0,        -1,     1 },
	{ NULL,      NULL,     "Color Picker", 0,         1,          1,          0,           0,        -1,     1 },
	{ "youtube", NULL,     NULL,           0,         1,          1,          1,           0,        -1,     1 },
	{ "Nvim-R",  NULL,     NULL,           0,         0,          0,          1,           1,        -1,     1 },
	/* { NULL,      NULL,     "Event Tester", 0,         0,          1,          0,           1,        -1,     1 }, /1* xev *1/ */
	/* { "R_x11",   NULL,     NULL,           0,         0,          1,          0,           1,        -1,     0 }, /1* R popup *1/ */
	/* { "Matplotlib",NULL,   NULL,           0,         1,          1,          0,           1,        -1,     0 }, /1* Python popups *1/ */
	/* { NULL,NULL,"Subplot Configuration Tool",0,       1,          1,          0,           1,        -1,     0 }, /1* Python popups *1/ */

	/* { "Dropbox-cli",NULL,  NULL,           0,         0,          1,          0,           1,        -1,     1 }, */
	/* { NULL,      NULL,     "Kite",         0,         0,          0,          0,           1,        -1,     1 }, */
	/* { "Arandr",  NULL,     NULL,           0,         1,          1,          0,           0,        -1,     1 }, */
	/* { "Surf",    NULL,     NULL,           0,         1,          0,          0,           1,        -1,     1 }, */
	/* { "Zathura", NULL,     NULL,           0,         0,          0,          0,           1,        -1,     1 }, */
};

/* include functions  */
#include "gaplessgrid.c"
#include "focusmaster.c"

/* layout(s) */
static const float mfact     = 0.50; /* factor of master area size [0.05..0.95] */
static const int nmaster     = 1;    /* number of clients in master area */
<<<<<<< HEAD
static const int resizehints = 0;    /* 1 means respect size hints in tiled resizals */
=======
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 */
>>>>>>> origin/master

static const Layout layouts[] = {
	/* symbol   arrange function */
	{ " []= ",  tile },    /* first entry is default */
	{ "     ",  NULL },    /* no layout function means floating behavior */
	{ " <o> ",  monocle },
	{ " |_| ",  centeredmaster },
	{ " |=| ",  centeredfloatingmaster },
	{ " [+] ",  gaplessgrid },
};

/* 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} },
#define MONKEYS(KEY,TAG) \
	{ MODKEY,                  KEY,      focusmon,    {.i = TAG+1} }, \
	{ MODKEY|ShiftMask,        KEY,      tagmon,      {.i = TAG+1} }, \
	{ MODKEY|ControlMask,      KEY,      swapmon,     {.i = TAG+1} },

/* 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_norm_bg, "-nf", col_norm_fg, "-sb", col_sel_fg, "-sf", col_sel_bg, NULL };
/* static const char *termcmd[]  = { "st", NULL }; */

#include "movestack.c"
static Key keys[] = {

  /* All keybindings are managed by sxhkd. */
	/* The only reason a keybinding is uncommented is to prevent
	 * dwm from handling an empty array.*/

	/* modifier                     key        function        argument */
	{ MODKEY,                       XK_b,      togglebar,      {0} },
};

/* button definitions */
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static 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,              Button1,        sigdwmblocks,   {.i = 1} },
	{ ClkStatusText,        0,              Button2,        sigdwmblocks,   {.i = 2} },
	{ ClkStatusText,        0,              Button3,        sigdwmblocks,   {.i = 3} },
	{ ClkStatusText,        ShiftMask,      Button3,        sigdwmblocks,   {.i = 6} },
	{ 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} },
};

void
setlayoutex(const Arg *arg)
{
	setlayout(&((Arg) { .v = &layouts[arg->i] }));
}

void
viewex(const Arg *arg)
{
	view(&((Arg) { .ui = 1 << arg->ui }));
}

void
viewall(const Arg *arg)
{
	view(&((Arg){.ui = ~0}));
}

void
toggleviewex(const Arg *arg)
{
	toggleview(&((Arg) { .ui = 1 << arg->ui }));
}

void
tagex(const Arg *arg)
{
	tag(&((Arg) { .ui = 1 << arg->ui }));
}

void
toggletagex(const Arg *arg)
{
	toggletag(&((Arg) { .ui = 1 << arg->ui }));
}

void
tagall(const Arg *arg)
{
	tag(&((Arg){.ui = ~0}));
}

/* signal definitions */
/* signum must be greater than 0 */
/* trigger signals using `xsetroot -name "fsignal:<signame> [<type> <value>]"` */
static Signal signals[] = {
	/* signum           function */
	{ "focusstack",     focusstack },
	{ "rotatestack",    rotatestack },
	{ "setmfact",       setmfact },
	{ "togglebar",      togglebar },
	{ "incnmaster",     incnmaster },
	{ "togglefloating", togglefloating },
	{ "focusmon",       focusmon },
	{ "focusmaster",    focusmaster },
	{ "fullscreen",     fullscreen },
	{ "movestack",      movestack },
	{ "tagmon",         tagmon },
	{ "swapmon",        swapmon },
	{ "zoom",           zoom },
	{ "view",           view },
	{ "viewall",        viewall },
	{ "viewex",         viewex },
	{ "toggleview",     view },
	{ "toggleviewex",   toggleviewex },
	{ "tag",            tag },
	{ "tagall",         tagall },
	{ "tagex",          tagex },
	{ "toggletag",      tag },
	{ "toggletagex",    toggletagex },
	{ "killclient",     killclient },
	{ "quit",           quit },
	{ "setmastermon",   setmastermon },
	{ "setlayout",      setlayout },
	{ "setlayoutex",    setlayoutex },
};