aboutsummaryrefslogtreecommitdiffstats
path: root/xmonad/Makefile
blob: 527b6022a9084e4fd5662ae35b1bc8e9eda2ebde (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
.POSIX:

XINITRC_ORDER = 80

CC = gcc

install: xmonad-autofocus-output
	../check-in-path xwallpaper
	../check-in-path xcman
	../check-in-path pdeath
	../check-in-path mate-panel
	-../check-installed mate-settings-daemon
	mkdir -p -- ~/.config/X11/xinit/xinitrc.d
	test ! -e ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-xmonad || \
		test -L ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-xmonad
	ln -sf -- ~/.dotfiles/xmonad/xinit ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-xmonad
	../check-installed general-preprocessor
	../check-in-path xpybar
	mkdir -p -- ~/.xmonad
	test ! -e ~/.xmonad/xmonad.hs || test -L ~/.xmonad/xmonad.hs
	ln -sf -- ~/.dotfiles/xmonad/xmonad.hs ~/.xmonad/xmonad.hs
	$(MAKE) xmonad.hs
	mkdir -p ~/.local/bin
	test ! -e ~/.local/bin/xmonad-autofocus-output || \
		test -L ~/.local/bin/xmonad-autofocus-output
	ln -sf -- ~/.dotfiles/xmonad/xmonad-autofocus-output ~/.local/bin/xmonad-autofocus-output
	test ! -e ~/.xmonad/xmonad-session-rc || test -L ~/.xmonad/xmonad-session-rc
	ln -sf -- ~/.dotfiles/xmonad/xmonad-session-rc ~/.xmonad/xmonad-session-rc

xmonad-autofocus-output: xmonad-autofocus-output.c
	$(CC) -o $@ $@.c -Wall -s -lX11 -lXtst

include xmonad.mk

uninstall:
	+! ../check-installed xmonad
	-unlink -- ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-xmonad
	-rmdir -- ~/.config/X11/xinit/xinitrc.d
	-rmdir -- ~/.config/X11/xinit
	-rmdir -- ~/.config/X11
	-rm -rf -- ~/.xmonad
	-+$(MAKE) clean

clean:
	-rm -f xmonad.hs xmonad-autofocus-output