aboutsummaryrefslogblamecommitdiffstats
path: root/xorg-xrandr/Makefile
blob: 0968b2af2f26404ded4507f1cf9bf1b4403cb8b7 (plain) (tree)
1
2
3
4
5
6
7
8
9
10




                                                              
                                                                   
        


                                                     
                                                 

                                                                                  
                                                                                                          
                                




                                                                                         

          


                                               



                                                                             
                                               
                                     
                                         
.POSIX:

XINITRC_ORDER = 15

# Testing that xwallpaper is installed because setres calls it
# Testing that python3 is installed because setres is written in it
install:
	../check-in-path xwallpaper
	../check-in-path python3
	../check-installed-shebang resolution-changed
	mkdir -p -- ~/.config/X11/xinit/xinitrc.d
	test ! -e ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-xorg-xrandr || \
		test -L ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-xorg-xrandr
	ln -sf -- ~/.dotfiles/xorg-xrandr/xinit ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-xorg-xrandr
	mkdir -p -- ~/.local/bin
	cd setres && $(MAKE)
	test ! -e ~/.local/bin/setres || test -L ~/.local/bin/setres
	ln -sf -- ~/.dotfiles/xorg-xrandr/setres/setres ~/.local/bin/setres
	test ! -e ~/.config/resolution-changed || test -L ~/.config/resolution-changed
	ln -sf -- ~/.dotfiles/xorg-xrandr/resolution-changed ~/.config/resolution-changed

uninstall:
	+! ../check-installed xorg-xrandr
	+! ../check-installed xrandr
	+! ../check-installed x11-xserver-utils
	-unlink -- ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-xorg-xrandr
	-rmdir -- ~/.config/X11/xinit/xinitrc.d
	-rmdir -- ~/.config/X11/xinit
	-rmdir -- ~/.config/X11
	-unlink -- ~/.config/resolution-changed
	-rmdir -- ~/.local/bin/setres
	+cd setres && $(MAKE) reallyclean