summaryrefslogtreecommitdiff
path: root/src/usercfg.h
blob: 8bf6b3a11787397383fd525ce0fb1f3c82401956 (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
/*< You can ignore this >*/
#include <X11/keysym.h>
#include "defs.h"

/*
 * ——————————————< Appearance >—————————————— *
 *
 *	   In this section you can configure the
 *	   settings for sxwm. You can ignore the
 *	   #define as it is C specific syntax
 *
 *	   GAPS (px):
 *	   How many pixels between windows and
 *	   screen edges (including bar)
 *	   BORDER_WIDTH (px):
 *	   How thick your border is
 *
 *	   BORDER_FOC_COL (hex):
 *	   The colour of your border when the
 *	   window is focused
 *
 *	   BORDER_UFOC_COL (hex):
 *	   The colour of your border when the
 *	   window is unfocused
 *
 *	   MASTER_WIDTH (float):
 *	   % of the screen the master window
 *	   should take as a decimal value 0-1
 *
 *	   MOTION_THROTTLE (int):
 *	   Usually you should set this to your
 *	   screen refreshrate. This is set so
 *	   there is no exessive number of
 *	   requests being sent to the X server
 *
 *	   SNAP_DISTANCE (px):
 *	   How many pixels away from the screen
 *	   until the window *snaps* to the edge
 *
 * ———————————————————————————————————————————*
*/

#define GAPS			10
#define BORDER_WIDTH	5
#define BORDER_FOC_COL	"#AAFFFA"
#define BORDER_UFOC_COL	"#FF4439"
#define MASTER_WIDTH	0.6
#define MOTION_THROTTLE	144
#define SNAP_DISTANCE	10

/*
 * ———————————< Keys & Bindins >————————————— *
 *
 *	   This is where you set your keybinds to
 *	   open apps, kill apps, perform in-built
 *	   functions.
 *
 *	   How to make a command to run an app:
 *
 *	   1) Just write this:
 *	      'static const char *'
 *	   	  you don't have to understand this,
 *	   	  this is just how you make a string
 *	   	  in C
 *
 *	   2) Call it what the app is called or
 *	      anything you want really, eg. the
 *	      command to open a terminal is
 *	      termcmd. Also append a '[]' at the
 *	      end to show its an array. This is
 *	      for use of arguments eg 'ls -lah'.
 *
 *	   3) Construct the command by putting '='
 *	      then after that open '{' then put
 *	      the first arg in "arg0",. Repeat for
 *	      all your args and end it with NULL.
 *	      Strings in C are ended with a NULL
 *	      'terminator' which tells the program
 *	      that that is the end of the string.
 *
 *	   4) Finally, close the '}', then add
 *	   	  a semi-colon at the end.
 *
 *	   After doing all that, you should have
 *	   something like this:
 *
 *	   static const char *app = { "app", NULL };
 *
 * ——————————— —————————————————————————————— *
 *
*/

static const char *termcmd[] = 		{ "st", NULL };
static const char *browsercmd[] = 	{ "firefox", NULL };

/*< This is your modifier key (MOD/SUPER) >*/
#define MOD	ALT

/*
 * ———————————————< Bindings >————————————————*
 *
 *     This is where you assign keybinds to
 *     perform some actions.
 *
 *
 * ——————————— —————————————————————————————— *
*/

static const Binding binds[] =
{
/*		 Modifier(s)	Key			Function	*/
	CALL(MOD|SHIFT,		e,			quit),
	CALL(MOD|SHIFT,		q,			close_focused),

	CALL(MOD, 			j, 			focus_next),
	CALL(MOD, 			k, 			focus_prev),

	CALL(MOD|SHIFT, 	j, 			move_master_next),
	CALL(MOD|SHIFT, 	k, 			move_master_prev),

	CALL(MOD,			equal,		inc_gaps),
	CALL(MOD,			minus,		dec_gaps),

	CALL(MOD,			f,			toggle_floating),
	CALL(MOD,			space,		toggle_floating_global),

/*		Here are your executable functions 		*/
	BIND(MOD, 			Return,		termcmd),
	BIND(MOD,			b,			browsercmd),
};