aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilip Wandzio <contact@philw.dev>2025-12-30 03:05:52 +0100
committerFilip Wandzio <contact@philw.dev>2025-12-30 03:05:52 +0100
commit10e09252e99335d4d084f3a92dffb9367da14bea (patch)
tree8857e3b2b87229272571fc456ebca82f877ad53e
parent4c90d1d9e4092f9ee0106d316829144653a276ea (diff)
downloaddwm-10e09252e99335d4d084f3a92dffb9367da14bea.tar.gz
dwm-10e09252e99335d4d084f3a92dffb9367da14bea.zip
Implement shortcuts for basic programs
Signed-off-by: Filip Wandzio <contact@philw.dev>
-rw-r--r--src/config/config.h35
1 files changed, 24 insertions, 11 deletions
diff --git a/src/config/config.h b/src/config/config.h
index 9c372da..799a262 100644
--- a/src/config/config.h
+++ b/src/config/config.h
@@ -58,8 +58,8 @@ static const int lockfullscreen = 1;
58static const Layout layouts[] = { 58static const Layout layouts[] = {
59 /* symbol arrange function */ 59 /* symbol arrange function */
60 {"[]=", tile}, /* first entry is default */ 60 {"[]=", tile}, /* first entry is default */
61 {"><>", NULL}, /* no layout function means floating behavior */ 61 // {"><>", NULL}, /* no layout function means floating behavior */
62 // {"[M]", monocle}, 62 // {"[M]", monocle},
63}; 63};
64 64
65/* key definitions */ 65/* key definitions */
@@ -78,22 +78,35 @@ static char dmenumon[2] = "0";
78 78
79static const char *dmenucmd[] = {"dmenu_run", NULL}; 79static const char *dmenucmd[] = {"dmenu_run", NULL};
80static const char *termcmd[] = {"st", NULL}; 80static const char *termcmd[] = {"st", NULL};
81static const char *screenshotcmd[] = {"screenshotsel.sh", NULL}; 81static const char *webcmd[] = {"firefox", NULL};
82static const char *calendarcmd[] = {"st", "-e", "calcurse", NULL};
83static const char *mailcmd[] = {"st", "-e", "neomutt", NULL};
84static const char *audiomixercmd[] = {"st", "-e", "pulsemixer", NULL};
85static const char *filebrowsercmd[] = {"st", "-e", "joshuto", NULL};
86static const char *processcmd[] = {"st", "-e", "htop", NULL};
87// static const char *screenshotcmd[] = {"screenshotsel.sh", NULL};
82 88
83static const Key keys[] = { 89static const Key keys[] = {
84 /* modifier key function argument */ 90 /* modifier key function argument */
85 {MODKEY, XK_space, spawn, {.v = dmenucmd}}, 91 {MODKEY, XK_space, spawn, {.v = dmenucmd}},
86 {MODKEY, XK_Return, spawn, {.v = termcmd}}, 92 {MODKEY, XK_Return, spawn, {.v = termcmd}},
87 {MODKEY | ShiftMask, XK_s, spawn, {.v = screenshotcmd}}, 93 {MODKEY, XK_m, spawn, {.v = mailcmd}},
94 {MODKEY, XK_c, spawn, {.v = calendarcmd}},
95 {MODKEY, XK_p, spawn, {.v = processcmd}},
96 {MODKEY | ShiftMask, XK_b, spawn, {.v = webcmd}},
97 {MODKEY | ShiftMask, XK_e, spawn, {.v = filebrowsercmd}},
98 {MODKEY | ShiftMask, XK_m, spawn, {.v = audiomixercmd}},
99 // {MODKEY | ShiftMask, XK_s, spawn, {.v = screenshotcmd}},
88 {MODKEY, XK_b, togglebar, {0}}, 100 {MODKEY, XK_b, togglebar, {0}},
89 {MODKEY, XK_q, killclient, {0}}, 101 {MODKEY, XK_q, killclient, {0}},
90 {MODKEY, XK_r, restart, {0}}, 102 {MODKEY, XK_r, restart, {0}},
91 {MODKEY, XK_f, togglefullscr, {0}}, 103 {MODKEY, XK_f, togglefullscr, {0}},
92 {MODKEY, XK_l, setlayout, {0}}, 104 // {MODKEY, XK_l, setlayout, {0}},
93 {MODKEY | ShiftMask, XK_space, togglefloating, {0}}, 105 // {MODKEY | ShiftMask, XK_space, togglefloating, {0}},
94 TAGKEYS(XK_1, 0) TAGKEYS(XK_2, 1) TAGKEYS(XK_3, 2) TAGKEYS(XK_4, 3) 106 TAGKEYS(XK_1, 0) TAGKEYS(XK_2, 1) TAGKEYS(XK_3, 2) TAGKEYS(XK_4, 3)
95 TAGKEYS(XK_5, 4) TAGKEYS(XK_6, 5) TAGKEYS(XK_7, 6) TAGKEYS(XK_8, 7) 107 TAGKEYS(XK_5, 4) TAGKEYS(XK_6, 5) TAGKEYS(XK_7, 6) TAGKEYS(XK_8, 7)
96 TAGKEYS(XK_9, 8){MODKEY | ShiftMask, XK_q, quit, {0}}, 108 TAGKEYS(XK_9, 8)
109 // {MODKEY | ShiftMask, XK_q, quit, {0}},
97 {0, 110 {0,
98 XF86XK_AudioMute, 111 XF86XK_AudioMute,
99 spawn, 112 spawn,
@@ -121,11 +134,11 @@ static const Button buttons[] = {
121 {ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]}}, 134 {ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]}},
122 {ClkTagBar, MODKEY, Button1, tag, {0}}, 135 {ClkTagBar, MODKEY, Button1, tag, {0}},
123 {ClkTagBar, MODKEY, Button3, toggletag, {0}}, 136 {ClkTagBar, MODKEY, Button3, toggletag, {0}},
124 {ClkWinTitle, 0, Button2, zoom, {0}}, 137 // {ClkWinTitle, 0, Button2, zoom, {0}},
125 {ClkStatusText, 0, Button2, spawn, {.v = termcmd}}, 138 {ClkStatusText, 0, Button2, spawn, {.v = termcmd}},
126 {ClkClientWin, MODKEY, Button1, movemouse, {0}}, 139 // {ClkClientWin, MODKEY, Button1, movemouse, {0}},
127 {ClkClientWin, MODKEY, Button2, togglefloating, {0}}, 140 // {ClkClientWin, MODKEY, Button2, togglefloating, {0}},
128 {ClkClientWin, MODKEY, Button3, resizemouse, {0}}, 141 // {ClkClientWin, MODKEY, Button3, resizemouse, {0}},
129 {ClkTagBar, 0, Button1, view, {0}}, 142 {ClkTagBar, 0, Button1, view, {0}},
130 {ClkTagBar, 0, Button3, toggleview, {0}}, 143 {ClkTagBar, 0, Button3, toggleview, {0}},
131 {ClkTagBar, MODKEY, Button1, tag, {0}}, 144 {ClkTagBar, MODKEY, Button1, tag, {0}},