diff options
Diffstat (limited to '')
-rw-r--r-- | xorg-server/Makefile | 6 | ||||
-rw-r--r-- | xorg-server/xkbdbind.config.h.gpp | 43 |
2 files changed, 49 insertions, 0 deletions
diff --git a/xorg-server/Makefile b/xorg-server/Makefile index 29edef7..72de69f 100644 --- a/xorg-server/Makefile +++ b/xorg-server/Makefile @@ -17,10 +17,16 @@ install: $(CHECK_INSTALLED) xorg-xmodmap mkdir -p -- ~/.local/bin ln -sf -- ~/.dotfiles/xorg-server/setkeys ~/.local/bin/ + test -d xkbdbind || git clone 'git://git.maandree.se/xkbdbind' + gpp -s '%%' < xkbdbind.config.h.gpp > xkbdbind/config.h + make -C xkbdbind + ln -sf -- ~/.dotfiles/xorg-server/xkbdbind/xkbdbind ~/.local/bin/ uninstall: -unlink -- ~/.config/backgrounds -unlink -- ~/.config/background -unlink -- ~/.local/bin/setkeys + -unlink -- ~/.local/bin/xkdbind + -rm -rf -- xkbdbind .PHONY: install uninstall diff --git a/xorg-server/xkbdbind.config.h.gpp b/xorg-server/xkbdbind.config.h.gpp new file mode 100644 index 0000000..479dad9 --- /dev/null +++ b/xorg-server/xkbdbind.config.h.gpp @@ -0,0 +1,43 @@ +/* -*- c -*- */ + +#define MOD MOD_SUPER +#define S MOD_SHIFT +#define C MOD_CTRL +#define A MOD_ALT +#define H MOD_HYPER + +static struct hotkey hotkeys[] = { + {XK_F1, MOD | S, 0, CMD("c")}, + {XK_F2, MOD | S, 0, CMD("brave")}, + {XK_F4, MOD | S, 0, CMD("xkill")}, + {XK_F9, MOD | S, 0, CMD("sh", "-c", "amixer -c \"${MAIN_ALSA_CARD}\" -- set \"${MAIN_ALSA_MIXER}\" 0%")}, + {XK_F10, MOD | S, 1, CMD("sh", "-c", "amixer -c \"${MAIN_ALSA_CARD}\" -- set \"${MAIN_ALSA_MIXER}\" 5%-")}, + {XK_F11, MOD | S, 1, CMD("sh", "-c", "amixer -c \"${MAIN_ALSA_CARD}\" -- set \"${MAIN_ALSA_MIXER}\" 5%+")}, + {XK_F12, MOD | S, 0, CMD("sh", "-c", "amixer -c \"${MAIN_ALSA_CARD}\" -- set \"${MAIN_ALSA_MIXER}\" 100%")}, +%%>if test -x /usr/bin/dmenu; then + {XK_u, MOD, 0, CMD("unicode")}, + {XK_i, MOD, 0, CMD("ipa")}, + {XK_p, MOD, 0, CMD("dmenu_run", "-fn", "schumacher clean-8")}, + {XK_p, MOD | C, 0, CMD("plumb")}, +%%>fi +%%>if test -x /usr/bin/terminator; then + {XK_Return, MOD | S, 0, CMD("terminator")}, +%%>elif test -x /usr/bin/st; then + {XK_Return, MOD | S, 0, CMD("st")}, +%%>else + {XK_Return, MOD | S, 0, CMD("xterm")}, +%%>fi + {XK_F12, MOD | S | C, 0, CMD("setkeys")}, + {XK_g, H, 0, CMD("setkeys", "greek")}, + {XK_s, H, 0, CMD("setkeys", "swedish")}, + {XK_t, H, 0, CMD("setkeys", "toggle")}, +%%>if test -x /usr/bin/mocp; then + {XK_b, MOD, 0, CMD("mocp", "--next")}, + {XK_b, MOD | S, 0, CMD("mocp", "--previous")}, + {XK_o, MOD | S, 0, CMD("mocp", "--toggle-pause")}, +%%>fi +}; + +#undef MOD +#undef S +#undef C |