comparison default.config.h @ 3:3726f37deac1

Move config out of the main file
author Atarwn Gard <a@qwa.su>
date Sun, 12 Oct 2025 20:54:34 +0500
parents
children f1f332156693
comparison
equal deleted inserted replaced
2:3ad7c3ab949e 3:3726f37deac1
1 #ifndef CONFIG_H
2 #define CONFIG_H
3
4 #include <X11/Xlib.h>
5 #include <X11/keysym.h>
6
7 // Modifier
8 #define MOD Mod4Mask
9
10 // Grid layout
11 #define GRID_ROWS 4
12 #define GRID_COLS 7
13 static const char grid_chars[GRID_ROWS][GRID_COLS+1] = {
14 "1234567",
15 "qwertyu",
16 "asdfghj",
17 "zxcvbnm"
18 };
19
20 // Configuration
21 static const int padding = 8;
22 static const int border_width = 2;
23 static const char *col_border_normal = "#444444";
24 static const char *col_border_focused = "#4a90e2";
25 static const char *col_bg = "#000000";
26 static const char *col_fg = "#ffffff";
27 static const char *col_sel = "#4a90e2";
28 static const char *overlay_font = "LiberationMono:size=48";
29
30 // Commands
31 static const char *termcmd[] = { "st", NULL };
32 static const char *menucmd[] = { "dmenu_run", NULL };
33 static const char *scrotcmd[] = { "scrot", NULL };
34
35 // Key bindings
36 static Key keys[] = {
37 /* modifier key function argument */
38 { MOD, XK_a, enter_overlay, {0} },
39 { MOD, XK_Return, spawn, {.v = termcmd} },
40 { MOD, XK_p, spawn, {.v = menucmd} },
41 { 0, XK_Print, spawn, {.v = scrotcmd} },
42 { MOD, XK_q, killclient, {0} },
43 { MOD, XK_f, toggle_fullscreen, {0} },
44 { MOD, XK_Tab, cycle_focus, {0} },
45 { MOD|ShiftMask, XK_q, quit, {0} },
46
47 // Workspaces
48 { MOD, XK_1, switchws, {.i = 0} },
49 { MOD, XK_2, switchws, {.i = 1} },
50 { MOD, XK_3, switchws, {.i = 2} },
51 { MOD, XK_4, switchws, {.i = 3} },
52 { MOD, XK_5, switchws, {.i = 4} },
53 { MOD, XK_6, switchws, {.i = 5} },
54 { MOD, XK_7, switchws, {.i = 6} },
55 { MOD, XK_8, switchws, {.i = 7} },
56 { MOD, XK_9, switchws, {.i = 8} },
57
58 // Move window to workspace
59 { MOD|ShiftMask, XK_1, movewin_to_ws, {.i = 0} },
60 { MOD|ShiftMask, XK_2, movewin_to_ws, {.i = 1} },
61 { MOD|ShiftMask, XK_3, movewin_to_ws, {.i = 2} },
62 { MOD|ShiftMask, XK_4, movewin_to_ws, {.i = 3} },
63 { MOD|ShiftMask, XK_5, movewin_to_ws, {.i = 4} },
64 { MOD|ShiftMask, XK_6, movewin_to_ws, {.i = 5} },
65 { MOD|ShiftMask, XK_7, movewin_to_ws, {.i = 6} },
66 { MOD|ShiftMask, XK_8, movewin_to_ws, {.i = 7} },
67 { MOD|ShiftMask, XK_9, movewin_to_ws, {.i = 8} },
68 };
69
70 #endif /* CONFIG_H */