annotate default.config.h @ 15:9d6b34ed3a09

featured useful combinations for laptop users (commented)
author Atarwn Gard <a@qwa.su>
date Wed, 15 Oct 2025 08:28:40 +0500
parents 9a4656899644
children 7a779983be56
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;
6
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
23 static const char col_border_normal[] = "#5a3f47";
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
24 static const char col_border_focused[] = "#ffb4a9";
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
25 static const char col_bg[] = "#1f1a1b";
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
26 static const char col_fg[] = "#ebe0e1";
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
27 static const char col_sel[] = "#5a3f47";
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
28 static const char overlay_font[] = "LiberationMono:size=48";
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
29 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
30 static const char root_bg[] = "#1f1a1b";
3
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
31
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
32 // Commands
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
33 static const char *termcmd[] = { "st", NULL };
6
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
34 static const char *menucmd[] = {
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
35 "dmenu_run",
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
36 "-fn", dmenu_font,
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
37 "-nb", col_bg,
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
38 "-nf", col_fg,
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
39 "-sb", col_sel,
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
40 "-sf", col_border_focused,
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
41 NULL
49a8b21b0f95 opinionated defaults
Atarwn Gard <a@qwa.su>
parents: 4
diff changeset
42 };
15
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
43 // 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
44 // 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
45 // 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
46 // 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
47 // 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
48 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
49 // 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
50
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
51 // Key bindings
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
52 static Key keys[] = {
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
53 /* modifier key function argument */
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
54 { MOD, XK_a, enter_overlay, {0} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
55 { MOD, XK_Return, spawn, {.v = termcmd} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
56 { MOD, XK_p, spawn, {.v = menucmd} },
15
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
57 // { 0, XF86XK_MonBrightnessUp, spawn, {.v = upbrightness } },
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
58 // { 0, XF86XK_MonBrightnessDown, spawn, {.v = downbrightness } },
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
59 // { 0, XF86XK_AudioLowerVolume, spawn, {.v = decvol} },
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
60 // { 0, XF86XK_AudioRaiseVolume, spawn, {.v = incvol} },
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
61 // { 0, XF86XK_AudioMute, spawn, {.v = mutevol} },
3
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
62 { 0, XK_Print, spawn, {.v = scrotcmd} },
15
9d6b34ed3a09 featured useful combinations for laptop users (commented)
Atarwn Gard <a@qwa.su>
parents: 14
diff changeset
63 // { 0|ShiftMask, XK_Print, spawn, {.v = scrotselcmd} },
3
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
64 { MOD, XK_q, killclient, {0} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
65 { MOD, XK_f, toggle_fullscreen, {0} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
66 { MOD, XK_Tab, cycle_focus, {0} },
14
9a4656899644 add backward window cycling with Win+Shift+Tab
Atarwn Gard <a@qwa.su>
parents: 6
diff changeset
67 { MOD|ShiftMask, XK_Tab, cycle_focus_backward, {0} },
3
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
68 { MOD|ShiftMask, XK_q, quit, {0} },
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 // Workspaces
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
71 { MOD, XK_1, switchws, {.i = 0} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
72 { MOD, XK_2, switchws, {.i = 1} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
73 { MOD, XK_3, switchws, {.i = 2} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
74 { MOD, XK_4, switchws, {.i = 3} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
75 { MOD, XK_5, switchws, {.i = 4} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
76 { MOD, XK_6, switchws, {.i = 5} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
77 { MOD, XK_7, switchws, {.i = 6} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
78 { MOD, XK_8, switchws, {.i = 7} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
79 { MOD, XK_9, switchws, {.i = 8} },
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
80
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
81 // Move window to workspace
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
82 { 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
83 { 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
84 { 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
85 { 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
86 { 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
87 { 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
88 { 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
89 { 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
90 { 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
91 };
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
92
3726f37deac1 Move config out of the main file
Atarwn Gard <a@qwa.su>
parents:
diff changeset
93 #endif /* CONFIG_H */