aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.h73
1 files changed, 56 insertions, 17 deletions
diff --git a/config.h b/config.h
index d93a341..e57908d 100644
--- a/config.h
+++ b/config.h
@@ -5,9 +5,11 @@ char shell[] = "/bin/sh";
#define Super Mod4Mask
+#define SCRIPT(str) cmd("~/scripts/" #str)
+
enum {
- Music,
- Power,
+ MusicPlayer,
+ Screenshot,
// Declare modes above this
MODE_SIZE,
@@ -16,29 +18,66 @@ enum {
// Define mode key bindings here
// NOTE: "10" here is the maximum number of key bindings for each mode
Key modes[MODE_SIZE][10] = {
- [Music] = {
- { 0, XK_h, cmd("playerctl previous") },
- { 0, XK_l, cmd("playerctl next") },
- { 0, XK_space, cmd("playerctl play-pause") },
- },
- [Power] = {
- { 0, XK_s, cmd("notify-send shutting_down") },
- { 0, XK_r, cmd("notify-send restarting") },
- },
+ [MusicPlayer] = { // {{{
+ { 0, XK_l, SCRIPT(spotify.sh next) },
+ { 0, XK_h, SCRIPT(spotify.sh prev) },
+ { 0, XK_space, SCRIPT(spotify.sh play_pause) },
+ },// }}}
+ [Screenshot] = { // {{{
+ { 0, XK_f, SCRIPT(screenshot.sh full) },
+ { 0, XK_p, SCRIPT(screenshot.sh part) },
+ { 0, XK_w, SCRIPT(screenshot.sh window) },
+ },// }}}
};
// Define normal mode key bindings here
Key keys[] = {
- { Mod1Mask, XK_y, cmd("notify-send hello") },
- { Mod1Mask, XK_z, mode(Music, True) },
- { Mod1Mask, XF86XK_PowerOff, mode(Power, False) },
+ // Mod Key // Command
+
+ // Application {{{
+ { Super, XK_Return, cmd("sensible-terminal -d $(xcwd)") },
+ { Super|ShiftMask, XK_Return, cmd("~/.bin/tst -d $(xcwd)") },
+
+ { Super, XK_c, cmd("sensible-browser") },
+ { Super|ShiftMask, XK_c, cmd("sensible-private-browser") },
+
+ { Super|ShiftMask, XK_f, cmd("sensible-terminal -d $(xcwd) -e lf") },
+ // }}}
+
+ // Menus {{{
+ { Super, XK_d, cmd("dmenu_run") },
+ { Super, XK_semicolon, cmd("dmenu_run -it ':'") },
+
+ { Super|ShiftMask, XK_p, cmd("passmenu --type -p 'pass :: '") },
+ { Super|ShiftMask, XK_o, SCRIPT(open-project.sh) },
+ { Super|ShiftMask, XK_i, SCRIPT(bookmarks-menu/bookmarker.sh menu) },
+ { Super|ShiftMask, XK_g, SCRIPT(bookmarks-menu/gh-projects.sh menu) },
+ { Super|ShiftMask, XK_e, SCRIPT(fontawesome-menu/fa-menu.sh menu) },
+ { Super, XK_y, cmd("clipmenu") },
+ // }}}
+
+ // System {{{
+ { 0, XF86XK_PowerOff, SCRIPT(powercontrol.sh menu) },
+ { ControlMask|ShiftMask, XK_l, SCRIPT(powercontrol.sh lock) },
+ { 0, XF86XK_MonBrightnessUp, SCRIPT(brightness.sh inc 10) },
+ { 0, XF86XK_MonBrightnessDown, SCRIPT(brightness.sh dec 10) },
+ { Super, XK_Print, mode(Screenshot, True) },
+ // }}}
+
+ // Media controls {{{
+ { Super, XK_m, mode(MusicPlayer, True) },
+ { 0, XF86XK_AudioRaiseVolume, SCRIPT(sound.sh volume up) },
+ { 0, XF86XK_AudioLowerVolume, SCRIPT(sound.sh volume down) },
+ { 0, XF86XK_AudioMute, SCRIPT(sound.sh mute) },
+ { 0, XF86XK_AudioMicMute, SCRIPT(sound.sh mute-mic) },
+ // }}}
};
ModeProperties mode_properties[MODE_SIZE] = {
- [Music] = { "Music player" },
- [Power] = { "Power menu" },
+ [MusicPlayer] = { "Music player" },
+ [Screenshot] = { "Screeshot" },
};
// Call this script on mode change
-char* on_mode_change = "echo \"kadj [$SHOTKEY_MODE_ID] $SHOTKEY_MODE_LABEL\"";
+char* on_mode_change = "~/scripts/shotkey.sh on-mode-change";