annotate default.config.h @ 19:71d1633609d5 default tip

change window closing and quit keys because you can misclick Mod+a with Mod+q (feat)
author Atarwn Gard <a@qwa.su>
date Wed, 15 Oct 2025 10:38:24 +0500
parents 7a779983be56
children
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 // Modifier
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
5 #define MOD Mod4Mask
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 // Grid layout
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
8 #define GRID_ROWS 4
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
9 #define GRID_COLS 7
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
10 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
11 "1234567",
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
12 "qwertyu",
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
13 "asdfghj",
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
14 "zxcvbnm"
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
15 };
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
16
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
17 // Configuration
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
18 static const int padding = 8;
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
19 static const int border_width = 2;
6
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
20 static const char col_border_normal[] = "#5a3f47";
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
21 static const char col_border_focused[] = "#ffb4a9";
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
22 static const char col_bg[] = "#1f1a1b";
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
23 static const char col_fg[] = "#ebe0e1";
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
24 static const char col_sel[] = "#5a3f47";
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
25 static const char overlay_font[] = "LiberationMono:size=48";
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
26 static const char dmenu_font[] = "LiberationMono:size=12"; // You can cut-out this line if you don't use dmenu
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
27 static const char root_bg[] = "#1f1a1b";
3
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
28
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
29 // Commands
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
30 static const char *termcmd[] = { "st", NULL };
6
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
31 static const char *menucmd[] = {
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
32 "dmenu_run",
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
33 "-fn", dmenu_font,
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
34 "-nb", col_bg,
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
35 "-nf", col_fg,
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
36 "-sb", col_sel,
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
37 "-sf", col_border_focused,
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
38 NULL
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
39 };
15
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
40 // static const char *upbrightness[] = { "brightnessctl", "set", "10%+", NULL };
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
41 // static const char *downbrightness[] = { "brightnessctl", "set", "10%-", NULL };
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
42 // static const char *incvol[] = {"wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@", "5%+", NULL};
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
43 // static const char *decvol[] = {"wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@", "5%-", NULL};
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
44 // static const char *mutevol[] = {"wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "toggle", NULL};
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
45 static const char *scrotcmd[] = { "/bin/sh", "-c", "scrot ~/Pictures/Screenshots/$(date +%Y.%m.%d_%H.%M).png", NULL };
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
46 // static const char *scrotselcmd[] = { "/bin/sh", "-c", "scrot -s ~/Pictures/Screenshots/$(date +%Y.%m.%d_%H.%M).png", NULL };
3
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
47
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
48 // Key bindings
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
49 static Key keys[] = {
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
50 /* modifier key function argument */
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
51 { MOD, XK_a, enter_overlay, {0} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
52 { MOD, XK_Return, spawn, {.v = termcmd} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
53 { MOD, XK_p, spawn, {.v = menucmd} },
15
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
54 // { 0, XF86XK_MonBrightnessUp, spawn, {.v = upbrightness } },
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
55 // { 0, XF86XK_MonBrightnessDown, spawn, {.v = downbrightness } },
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
56 // { 0, XF86XK_AudioLowerVolume, spawn, {.v = decvol} },
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
57 // { 0, XF86XK_AudioRaiseVolume, spawn, {.v = incvol} },
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
58 // { 0, XF86XK_AudioMute, spawn, {.v = mutevol} },
3
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
59 { 0, XK_Print, spawn, {.v = scrotcmd} },
15
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
60 // { 0|ShiftMask, XK_Print, spawn, {.v = scrotselcmd} },
19
71d1633609d5 change window closing and quit keys because you can misclick Mod+a with Mod+q (feat)
Atarwn Gard <a@qwa.su>
parents: 17
diff changeset
61 { MOD|ShiftMask, XK_q, killclient, {0} },
3
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
62 { MOD, XK_f, toggle_fullscreen, {0} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
63 { MOD, XK_Tab, cycle_focus, {0} },
19
71d1633609d5 change window closing and quit keys because you can misclick Mod+a with Mod+q (feat)
Atarwn Gard <a@qwa.su>
parents: 17
diff changeset
64 { MOD|ShiftMask, XK_Tab, cycle_focus_backward, {0} },
71d1633609d5 change window closing and quit keys because you can misclick Mod+a with Mod+q (feat)
Atarwn Gard <a@qwa.su>
parents: 17
diff changeset
65 { MOD|ShiftMask, XK_m, quit, {0} },
3
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
66
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
67 // Workspaces
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
68 { MOD, XK_1, switchws, {.i = 0} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
69 { MOD, XK_2, switchws, {.i = 1} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
70 { MOD, XK_3, switchws, {.i = 2} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
71 { MOD, XK_4, switchws, {.i = 3} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
72 { MOD, XK_5, switchws, {.i = 4} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
73 { MOD, XK_6, switchws, {.i = 5} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
74 { MOD, XK_7, switchws, {.i = 6} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
75 { MOD, XK_8, switchws, {.i = 7} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
76 { MOD, XK_9, switchws, {.i = 8} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
77
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
78 // Move window to workspace
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
79 { 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
80 { 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
81 { 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
82 { 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
83 { 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
84 { 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
85 { 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
86 { 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
87 { 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
88 };
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
89
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
90 #endif /* CONFIG_H */