summaryrefslogtreecommitdiff
path: root/Makefile
blob: 8b55b318ed29bf7ca23858eb4e2c69f7f608ff11 (plain)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
SCRIPTS_DIR := ~/.local/bin/scripts
AMBIG_SCRIPTS := barmenu barmenu_run slockd
WM_SCRIPTS := bspt herbsttags hwinmv
INTER_SCRIPTS := browser bsc dmpv fdc ffc lwc mprisctl qbc
BLOCKS_SCRIPTS := battery clock cpu disk internet memory mpdup music sigdwmb volume
GENERAL_SCRIPTS := crcparse gettags notify-fw notify-sound.sh songgrab sortsongs startvm startxw tagimg tagmp3 todo toggle
XORG_SCRIPTS := launch_polybar.sh liberclip monattach mondetach toggletouchpad tsoff tson xidlechk xidletog
WAY_SCRIPTS := swayidlechk swayidletog waytoggle
RUNIT_SCRIPTS := svlogc

all:

install: ambig-scripts wm-scripts inter-scripts blocks-scripts general-scripts xorg-scripts way-scripts runit-scripts
	@echo "Copying scripts to the appropriate dir..."

ambig-scripts: $(AMBIG_SCRIPTS)
ifdef AMBIG_SCRIPTS
	@echo "Installing 'ambiguous' scripts (scripts that run one option or the other, depending on display server)..."
	@mkdir -p $(SCRIPTS_DIR)
	@$(foreach script,$(AMBIG_SCRIPTS),\
		$(shell cp $(script) $(SCRIPTS_DIR)))
	@echo "Done."
endif

wm-scripts: $(WM_SCRIPTS)
ifdef WM_SCRIPTS
	@echo "Installing wm scripts, which are specific to window managers..."
	@mkdir -p $(SCRIPTS_DIR)
	@$(foreach script,$(WM_SCRIPTS),\
		$(shell cp $(script) $(SCRIPTS_DIR)))
	@echo "Done."
endif

inter-scripts: $(INTER_SCRIPTS)
ifdef INTER_SCRIPTS
	@echo "Installing 'interface' scripts (scripts that use barmenu as an interface to open another application)..."
	@mkdir -p $(SCRIPTS_DIR)
	@$(foreach script,$(INTER_SCRIPTS),\
		$(shell cp $(script) $(SCRIPTS_DIR)))
	@echo "Done."
endif

blocks-scripts: $(BLOCKS_SCRIPTS)
ifdef BLOCKS_SCRIPTS
	@echo "Installing 'dwmblocks' scripts (scripts that are modules for dwmblocks)..."
	@mkdir -p $(SCRIPTS_DIR)
	@$(foreach script,$(BLOCKS_SCRIPTS),\
		$(shell cp $(script) $(SCRIPTS_DIR)))
	@echo "Done."
endif

general-scripts: $(GENERAL_SCRIPTS)
ifdef GENERAL_SCRIPTS
	@echo "Installing 'general' scripts (scripts that don't depend on my other scripts)..."
	@mkdir -p $(SCRIPTS_DIR)
	@$(foreach script,$(GENERAL_SCRIPTS),\
		$(shell cp $(script) $(SCRIPTS_DIR)))
	@echo "Done."
endif

xorg-scripts: $(XORG_SCRIPTS)
ifdef XORG_SCRIPTS
	@echo "Installing 'xorg' scripts (scripts designed for use with xorg)..."
	@mkdir -p $(SCRIPTS_DIR)
	@$(foreach script,$(XORG_SCRIPTS),\
		$(shell cp $(script) $(SCRIPTS_DIR)))
	@echo "Done."
endif

way-scripts: $(WAY_SCRIPTS)
ifdef WAY_SCRIPTS
	@echo "Installing 'Wayland' scripts (scripts designed for use with Wayland)..."
	@mkdir -p $(SCRIPTS_DIR)
	@$(foreach script,$(WAY_SCRIPTS),\
		$(shell cp $(script) $(SCRIPTS_DIR)))
	@echo "Done."
endif

runit-scripts: $(RUNIT_SCRIPTS)
ifdef RUNIT_SCRIPTS
	@echo "Installing 'runit' scripts (scripts designed for use with the Runit init system)..."
	@mkdir -p $(SCRIPTS_DIR)
	@$(foreach script,$(RUNIT_SCRIPTS),\
		$(shell cp $(script) $(SCRIPTS_DIR)))
	@echo "Done."
endif