-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
75 lines (51 loc) · 2.15 KB
/
Makefile
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
SHELL := /usr/bin/env bash
etc := $(foreach e, $(shell find etc/ -type f), /$(e))
system_services := tlp apparmor docker NetworkManager lightdm lm_sensors \
systemd-netns@wireguard bluetooth
user_services := at-spi-dbus-bus autorandr-launcher dropbox dunst \
gnome-keyring gpaste keybase nm-applet picom polybar pulseaudio-x11 \
redshift rumno udiskie xfce-polkit xfce-power-manager xfsettingsd \
xss-lock
.DEFAULT_GOAL = rcup
install: rcup-with-hooks etc zoom system-services user-services
.PHONY: rcup
rcup:
env RCRC=$(PWD)/rcrc rcup -K -v -d $(HOME)/.dotfiles
.PHONY: rcup-with-hooks
rcup-with-hooks:
env RCRC=$(PWD)/rcrc rcup -v -d $(HOME)/.dotfiles
.PHONY: etc
etc: $(etc)
@ sudo systemctl daemon-reload
/etc/%: etc/%
@ echo sudo install --backup=simple --suffix .bak -D -p -m644 $< $@
.PHONY: system-services
system-services: $(system_services)
$(system_services):
@ sudo systemctl is-enabled [email protected] &> /dev/null || sudo systemctl enable [email protected] --now
.PHONY: user-services
user-services: $(user_services)
$(user_services):
@ systemctl --user is-enabled [email protected] &> /dev/null || systemctl --user enable [email protected]
zoom: /usr/local/bin/zoom
/usr/local/bin/zoom: /usr/bin/firejail
sudo ln --symbolic /usr/bin/firejail /usr/local/bin/zoom
/usr/local/bin/dmenu:
sudo ln --symbolic /usr/bin/rofi /usr/local/bin/dmenu
pictures = wallpapers lockscreens screenshots
pictures: $(foreach p, $(pictures), $(HOME)/pictures/$(p))
$(HOME)/pictures/%: $(HOME)/Dropbox/%
@ test -L $@ || ln --verbose --symbolic --no-target-directory ../Dropbox/$* $@
fish-completions: $(XDG_CONFIG_HOME)/fish/completions/vault.fish $(XDG_CONFIG_HOME)/fish/completions/rustup.fish
$(XDG_CONFIG_HOME)/fish/completions/vault.fish:
vault -autocomplete-install
$(XDG_CONFIG_HOME)/fish/completions/rustup.fish:
rustup completions fish > $(XDG_CONFIG_HOME)/fish/completions/rustup.fish
clean-fish-completions:
rm -f $(XDG_CONFIG_HOME)/fish/completions/vault.fish
rm -f $(XDG_CONFIG_HOME)/fish/completions/rustup.fish
# rust-related targets
rust-update:
@ rustup update
rust-stable:
@ rustup toolchain install stable