diff options
| author | Akshay Nair <phenax5@gmail.com> | 2020-06-17 19:20:55 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2020-06-17 19:20:55 +0530 |
| commit | 88d099c1ec921f84034689caf7e76a34a29b69b5 (patch) | |
| tree | 0aa52d1455aa9a650d54efabc4f587e55f58ab35 /config.h | |
| parent | 14f9b1be647e22418cc9d42b0081f779878cfb8d (diff) | |
| download | shotkey-88d099c1ec921f84034689caf7e76a34a29b69b5.tar.gz shotkey-88d099c1ec921f84034689caf7e76a34a29b69b5.zip | |
Migrated all key bindings
Diffstat (limited to '')
| -rw-r--r-- | config.h | 67 |
1 files changed, 52 insertions, 15 deletions
@@ -1,11 +1,14 @@ +#include <X11/XF86keysym.h> + // Shell static char shell[] = "/bin/sh"; -#define Super Mod1Mask +#define Super Mod4Mask + +#define SCRIPT(str) cmd("~/scripts/" #str) enum { - Music, - Bright, + MusicPlayer, // Declare modes above this MODE_SIZE, @@ -14,27 +17,61 @@ enum { // Define mode key bindings here // NOTE: "10" here is the maximum number of key bindings for each mode static Key modes[MODE_SIZE][10] = { - [Music] = { - { 0, XK_m, cmd("notify-send inside_music") }, - }, - [Bright] = { - { 0, XK_m, cmd("notify-send inside_bright") }, - { 0, XK_n, cmd("notify-send inside_bright_1") }, + [MusicPlayer] = { + { 0, XK_l, SCRIPT(spotify.sh next) }, + { 0, XK_h, SCRIPT(spotify.sh prev) }, + { 0, XK_space, SCRIPT(spotify.sh play_pause) }, }, }; // Define normal mode key bindings here static Key keys[] = { - { Super|ShiftMask, XK_y, cmd("notify-send hello") }, - { Super|ShiftMask, XK_z, mode(Music, False) }, - { Super|ShiftMask, XK_x, mode(Bright, True) }, + // 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) }, + { 0, XK_Print, SCRIPT(screenshot.sh full) }, + { ControlMask, XK_Print, SCRIPT(screenshot.sh part) }, + // }}} + + // Media controls {{{ + { Super, XK_m, mode(MusicPlayer, False) }, + { 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) }, + // }}} }; static ModeProperties mode_properties[MODE_SIZE] = { - [Music] = { "Music player" }, - [Bright] = { "Brightness" }, + [MusicPlayer] = { "Music player" }, }; // Call this script on mode change -static char* on_mode_change = "notify-send \"kadj [$MODE_ID] $MODE_LABEL\""; +static char* on_mode_change = "echo 1"; |
