-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h
105 lines (95 loc) · 5.46 KB
/
config.h
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
/*
Copyright 08/07/2024 https://github.com/su8/hellxcb
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA.
*/
#ifndef CONFIG_H
#define CONFIG_H
/** buttons **/
#define MOD1 Mod1Mask /* ALT key */
#define MOD4 Mod4Mask /* Super/Windows key */
#define CONTROL ControlMask /* Control key */
#define SHIFT ShiftMask /* Shift key */
/** generic settings **/
#define MASTER_SIZE 0.52
#define SHOW_PANEL True /* show panel by default on exec */
#define TOP_PANEL True /* False mean panel is on bottom */
#define PANEL_HEIGHT 18 /* 0 for no space for panel, thus no panel */
#define DEFAULT_MODE TILE /* TILE MONOCLE BSTACK GRID */
#define ATTACH_ASIDE True /* False means new window is master */
#define FOLLOW_MOUSE True /* Focus the window the mouse just entered */
#define FOLLOW_WINDOW False /* Follow the window when moved to a different desktop */
#define CLICK_TO_FOCUS False /* Focus an unfocused window when clicked */
#define BORDER_WIDTH 2 /* window border width */
#define FOCUS "#ff950e" /* focused window border color */
#define UNFOCUS "#444444" /* unfocused window border color */
#define DESKTOPS 4 /* number of desktops - edit DESKTOPCHANGE keys to suit */
#define DEFAULT_DESKTOP 0 /* the desktop to focus on exec */
#define MINWSZ 50 /* minimum window size in pixels */
#define HELLXCB_TAG_AND_MODE "/tmp/hellxcb.txt" /* file to output the current focused window and it's style e.g: tiled bstack monocle */
/* open applications to specified desktop with specified mode.
* if desktop is negative, then current is assumed */
static const AppRule rules[] = { \
/* class desktop follow float */
{ "MPlayer", 3, True, False },
{ "Gimp", 0, False, True },
};
/* helper for spawning shell commands */
#define SHCMD(cmd) {.com = (const char*[]){"/bin/sh", "-c", cmd, NULL}}
/** commands **/
static const char *termcmd[] = { "xterm", NULL };
static const char *menucmd[] = { "dmenu_run", NULL };
#define DESKTOPCHANGE(K,N) \
{ MOD1, K, change_desktop, {.i = N}}, \
{ MOD1|ShiftMask, K, client_to_desktop, {.i = N}},
/** Shortcuts **/
static key keys[] = {
/* modifier key function argument */
{ MOD1, XK_b, togglepanel, {NULL}},
{ MOD1, XK_BackSpace, focusurgent, {NULL}},
{ MOD1, XK_c, killclient, {NULL}},
{ MOD1, XK_j, next_win, {NULL}},
{ MOD1, XK_k, prev_win, {NULL}},
{ MOD1, XK_h, resize_master, {.i = -10}}, /* decrease size in px */
{ MOD1, XK_l, resize_master, {.i = +10}}, /* increase size in px */
{ MOD1, XK_m, mouse_aside, {NULL}},
{ MOD1, XK_o, resize_stack, {.i = -10}}, /* shrink size in px */
{ MOD1, XK_p, resize_stack, {.i = +10}}, /* grow size in px */
{ MOD1|CONTROL, XK_h, rotate, {.i = -1}},
{ MOD1|CONTROL, XK_l, rotate, {.i = +1}},
{ MOD1|SHIFT, XK_h, rotate_filled, {.i = -1}},
{ MOD1|SHIFT, XK_l, rotate_filled, {.i = +1}},
{ MOD1, XK_Tab, last_desktop, {NULL}},
{ MOD1, XK_Return, swap_master, {NULL}},
{ MOD1|SHIFT, XK_j, move_down, {NULL}},
{ MOD1|SHIFT, XK_k, move_up, {NULL}},
{ MOD1|SHIFT, XK_t, switch_mode, {.i = TILE}},
{ MOD1|SHIFT, XK_b, switch_mode, {.i = BSTACK}},
{ MOD1|SHIFT, XK_g, switch_mode, {.i = GRID}},
{ MOD1|SHIFT, XK_y, cycle_mode, {NULL}},
{ MOD1|CONTROL, XK_r, quit, {.i = 0}}, /* quit with exit value 0 */
{ MOD1|CONTROL, XK_q, quit, {.i = 1}}, /* quit with exit value 1 */
{ MOD1, XK_z, aDontStealFocus, {NULL}},
{ MOD1|SHIFT, XK_Return, spawn, {.com = termcmd}},
{ MOD4, XK_v, spawn, {.com = menucmd}},
DESKTOPCHANGE( XK_1, 0)
DESKTOPCHANGE( XK_2, 1)
DESKTOPCHANGE( XK_3, 2)
DESKTOPCHANGE( XK_4, 3)
};
static Button buttons[] = {
{ MOD1, Button1, mousemotion, {.i = MOVE}},
{ MOD1, Button3, mousemotion, {.i = RESIZE}},
{ MOD4, Button3, spawn, {.com = menucmd}},
};
#endif