aboutsummaryrefslogtreecommitdiffstats
path: root/xorg-server
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--xorg-server/Makefile34
-rw-r--r--xorg-server/xkbdbind.config.h.gpp9
2 files changed, 28 insertions, 15 deletions
diff --git a/xorg-server/Makefile b/xorg-server/Makefile
index 72de69f..a4b433b 100644
--- a/xorg-server/Makefile
+++ b/xorg-server/Makefile
@@ -1,5 +1,6 @@
.POSIX:
-include ../common.mk
+
+XKBDBIND_GIT_HASH = 2ab5473fc48d91ecce1f11c49e5decdcf821e3d4
install:
if test -L ~/.config/backgrounds; then \
@@ -12,21 +13,36 @@ install:
if test ! -L ~/.config/background && test ! -e ~/.config/background; then \
ln -s backgrounds/default ~/.config/background; \
fi
- $(CHECK_INSTALLED) asroot
- $(CHECK_INSTALLED) xorg-setxkbmap
- $(CHECK_INSTALLED) xorg-xmodmap
+ ../check-installed-shebang setkeys
+ ../check-in-path sponge
+ ../check-any-installed asroot asroot-libpassphrase
+ ../check-any-installed xorg-setxkbmap x11-xkb-utils
+ ../check-any-installed xorg-xmodmap x11-xserver-utils
mkdir -p -- ~/.local/bin
- ln -sf -- ~/.dotfiles/xorg-server/setkeys ~/.local/bin/
- test -d xkbdbind || git clone 'git://git.maandree.se/xkbdbind'
+ test ! -e ~/.local/bin/setkeys || test -L ~/.local/bin/setkeys
+ ln -sf -- ~/.dotfiles/xorg-server/setkeys ~/.local/bin/setkeys
+ if test -d xkbdbind; then \
+ if test -d xkbdbind/.git; then \
+ if ! git log '--format=format:%H' | grep '^$(XKBDBIND_GIT_HASH)$$' >/dev/null; then \
+ (cd -- xkbdbind && git pull) || :; \
+ fi; \
+ fi; \
+ else \
+ git clone 'git://git.maandree.se/xkbdbind' || cp -r /usr/src/xkbdbind/ .; \
+ fi
gpp -s '%%' < xkbdbind.config.h.gpp > xkbdbind/config.h
- make -C xkbdbind
- ln -sf -- ~/.dotfiles/xorg-server/xkbdbind/xkbdbind ~/.local/bin/
+ cd xkbdbind && $(MAKE)
+ test ! -e ~/.local/bin/xkbdbind || test -L ~/.local/bin/xkbdbind
+ ln -sf -- ~/.dotfiles/xorg-server/xkbdbind/xkbdbind ~/.local/bin/xkbdbind
uninstall:
+ +! ../check-installed xorg-server
+ +! ../check-installed xserver-xorg-core
-unlink -- ~/.config/backgrounds
-unlink -- ~/.config/background
-unlink -- ~/.local/bin/setkeys
-unlink -- ~/.local/bin/xkdbind
-rm -rf -- xkbdbind
-.PHONY: install uninstall
+clean:
+ -rm -rf -- xkbdbind
diff --git a/xorg-server/xkbdbind.config.h.gpp b/xorg-server/xkbdbind.config.h.gpp
index 5e1d71c..4162b43 100644
--- a/xorg-server/xkbdbind.config.h.gpp
+++ b/xorg-server/xkbdbind.config.h.gpp
@@ -14,15 +14,13 @@ static struct hotkey hotkeys[] = {
{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")},
{XK_p, MOD | C, 0, CMD("plumb")},
-%%>fi
-%%>if test -x /usr/bin/terminator; then
+%%>if ../check-in-path terminator; then
{XK_Return, MOD | S, 0, CMD("terminator")},
-%%>elif test -x /usr/bin/st; then
+%%>elif ../check-in-path st; then
{XK_Return, MOD | S, 0, CMD("st")},
%%>else
{XK_Return, MOD | S, 0, CMD("xterm")},
@@ -31,11 +29,10 @@ static struct hotkey hotkeys[] = {
{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
+ {XK_Escape, MOD, 0, CMD("mate-screensaver-command", "-l")},
};
#undef MOD