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