2019-10-29 15:59:00 +01:00
|
|
|
CLI_PACKAGES := \
|
|
|
|
bash \
|
|
|
|
flake8 \
|
2019-12-04 11:55:10 +01:00
|
|
|
gdb \
|
2019-10-29 15:59:00 +01:00
|
|
|
git \
|
2020-04-07 17:45:00 +02:00
|
|
|
haskell \
|
2019-10-29 15:59:00 +01:00
|
|
|
isort \
|
2020-08-22 20:04:16 +02:00
|
|
|
mimetype \
|
2019-12-08 22:21:13 +01:00
|
|
|
mypy \
|
2020-04-07 17:56:51 +02:00
|
|
|
remind \
|
2019-10-29 15:59:00 +01:00
|
|
|
scripts \
|
|
|
|
shell \
|
2020-05-01 16:47:38 +02:00
|
|
|
ssh \
|
2020-02-04 14:43:49 +01:00
|
|
|
tin \
|
2020-08-21 18:02:25 +02:00
|
|
|
tmux \
|
2020-08-22 19:28:35 +02:00
|
|
|
vifm \
|
2019-10-29 15:59:00 +01:00
|
|
|
vim \
|
|
|
|
zsh \
|
|
|
|
|
|
|
|
VISUAL_PACKAGES := \
|
|
|
|
X \
|
|
|
|
desktop \
|
|
|
|
dunst \
|
2020-05-29 17:31:19 +02:00
|
|
|
fontconfig \
|
2019-10-29 15:59:00 +01:00
|
|
|
i3 \
|
|
|
|
i3blocks \
|
|
|
|
redshift \
|
|
|
|
rofi \
|
2020-06-24 11:33:05 +02:00
|
|
|
system-X \
|
2019-10-29 15:59:00 +01:00
|
|
|
termite \
|
|
|
|
tridactyl \
|
|
|
|
wallpapers \
|
2019-11-05 11:43:12 +01:00
|
|
|
zathura \
|
2019-10-29 15:59:00 +01:00
|
|
|
|
|
|
|
CLI_DEPENDENCIES := \
|
|
|
|
aur/bitwarden-cli \
|
|
|
|
aur/cppreference \
|
2020-08-15 20:25:51 +02:00
|
|
|
aur/git-absorb \
|
2020-08-22 20:02:53 +02:00
|
|
|
aur/handlr-bin \
|
2020-08-27 17:48:14 +02:00
|
|
|
aur/nodejs-markdownlint-cli \
|
2019-10-29 15:59:00 +01:00
|
|
|
aur/stdman \
|
2020-08-22 20:02:53 +02:00
|
|
|
aur/xdg-utils-handlr \
|
2019-10-29 15:59:00 +01:00
|
|
|
aur/zsh-fast-syntax-highlighting-git \
|
|
|
|
community/bat \
|
2020-05-12 12:03:06 +02:00
|
|
|
community/fd \
|
2020-06-20 18:13:28 +02:00
|
|
|
community/fzf \
|
2019-10-29 15:59:00 +01:00
|
|
|
community/git-lfs \
|
2020-07-14 21:35:24 +02:00
|
|
|
community/global \
|
2019-10-29 15:59:00 +01:00
|
|
|
community/lesspipe \
|
|
|
|
community/mosh \
|
2019-12-08 22:21:13 +01:00
|
|
|
community/mypy \
|
2019-10-29 15:59:00 +01:00
|
|
|
community/pandoc \
|
2020-05-12 12:03:06 +02:00
|
|
|
community/ripgrep \
|
2020-08-31 18:43:21 +02:00
|
|
|
community/rust-analyzer \
|
2020-08-22 18:32:40 +02:00
|
|
|
community/rustup \
|
2019-10-29 15:59:00 +01:00
|
|
|
community/shellcheck \
|
|
|
|
community/shfmt \
|
2020-04-06 18:37:47 +02:00
|
|
|
community/stack \
|
2019-10-29 15:59:00 +01:00
|
|
|
community/stow \
|
|
|
|
community/tig \
|
2020-08-21 18:02:25 +02:00
|
|
|
community/tmux \
|
2020-02-06 14:28:41 +01:00
|
|
|
community/udiskie \
|
2020-08-22 19:28:35 +02:00
|
|
|
community/vifm \
|
2019-10-29 15:59:00 +01:00
|
|
|
community/zsh-completions \
|
|
|
|
core/archlinux-keyring \
|
|
|
|
core/openssh \
|
|
|
|
extra/bash-completion \
|
|
|
|
extra/ctags \
|
|
|
|
extra/git \
|
|
|
|
extra/imagemagick \
|
|
|
|
extra/keychain \
|
|
|
|
extra/networkmanager \
|
2020-08-22 21:19:26 +02:00
|
|
|
extra/vim \
|
|
|
|
extra/vim-runtime \
|
2019-10-29 15:59:00 +01:00
|
|
|
extra/zsh \
|
|
|
|
|
|
|
|
VISUAL_DEPENDENCIES := \
|
|
|
|
aur/bitwarden-rofi \
|
2020-08-20 13:00:07 +02:00
|
|
|
aur/gnome-ssh-askpass3 \
|
2019-10-29 15:59:00 +01:00
|
|
|
aur/i3-battery-popup-git \
|
|
|
|
aur/i3blocks-contrib-git \
|
|
|
|
aur/networkmanager-dmenu-git \
|
2020-05-25 18:43:25 +02:00
|
|
|
aur/qsyncthingtray \
|
2019-12-14 15:56:58 +01:00
|
|
|
aur/rofi-dmenu \
|
2020-05-29 17:35:48 +02:00
|
|
|
aur/rofi-emoji \
|
2019-12-13 21:10:38 +01:00
|
|
|
community/acpi \
|
2019-10-29 15:59:00 +01:00
|
|
|
community/dunst \
|
2020-06-16 11:27:04 +02:00
|
|
|
community/flameshot \
|
2019-12-13 20:03:37 +01:00
|
|
|
community/i3lock-color \
|
2019-10-29 15:59:00 +01:00
|
|
|
community/playerctl \
|
|
|
|
community/redshift \
|
2020-05-25 18:43:25 +02:00
|
|
|
community/syncthing \
|
2019-12-13 21:10:38 +01:00
|
|
|
community/sysstat \
|
2019-12-13 17:18:18 +01:00
|
|
|
community/termite \
|
2019-10-29 15:59:00 +01:00
|
|
|
community/xautolock \
|
|
|
|
community/xsel \
|
|
|
|
community/zathura \
|
|
|
|
community/zathura-cb \
|
|
|
|
community/zathura-djvu \
|
|
|
|
community/zathura-pdf-poppler \
|
|
|
|
community/zathura-ps \
|
|
|
|
extra/firefox \
|
|
|
|
extra/nm-connection-editor \
|
2020-05-29 17:31:19 +02:00
|
|
|
extra/noto-fonts-emoji \
|
2019-10-29 15:59:00 +01:00
|
|
|
extra/thunderbird \
|
|
|
|
extra/vlc \
|
|
|
|
|
2020-04-06 18:37:47 +02:00
|
|
|
HASKELL_DEPENDENCIES := \
|
|
|
|
brittany \
|
|
|
|
hlint \
|
|
|
|
|
2019-10-29 15:59:00 +01:00
|
|
|
STOW_TARGET := $(HOME)
|
|
|
|
STOW = stow -t $(STOW_TARGET) -R -v
|
|
|
|
|
2020-08-22 20:27:46 +02:00
|
|
|
YAY := yay -S --noconfirm --needed
|
2020-08-22 20:47:33 +02:00
|
|
|
|
2019-10-29 15:59:00 +01:00
|
|
|
.PHONY: all
|
|
|
|
all: install
|
|
|
|
|
|
|
|
# Install packages and their dependencies
|
|
|
|
.PHONY: install-cli
|
|
|
|
install-cli: install-cli-deps
|
2019-10-29 16:30:30 +01:00
|
|
|
install-cli: link-cli
|
2020-04-06 18:37:47 +02:00
|
|
|
install-cli: rust haskell
|
2019-10-29 15:59:00 +01:00
|
|
|
|
|
|
|
.PHONY: install
|
|
|
|
install: install-cli
|
|
|
|
install: install-visual-deps
|
2019-10-29 16:30:30 +01:00
|
|
|
install: link-visual
|
2019-10-29 15:59:00 +01:00
|
|
|
|
|
|
|
.PHONY: install-cli-deps
|
|
|
|
install-cli-deps:
|
2020-08-22 20:47:33 +02:00
|
|
|
$(YAY) $(CLI_DEPENDENCIES)
|
2019-10-29 15:59:00 +01:00
|
|
|
|
|
|
|
.PHONY: install-visual-deps
|
|
|
|
install-visual-deps:
|
2020-08-22 20:47:33 +02:00
|
|
|
$(YAY) $(VISUAL_DEPENDENCIES)
|
2019-10-29 15:59:00 +01:00
|
|
|
|
2019-10-29 16:30:30 +01:00
|
|
|
# Linking packages
|
2019-12-17 18:22:43 +01:00
|
|
|
.PHONY: link-all
|
|
|
|
link-all: link-cli link-visual
|
|
|
|
|
2019-10-29 16:30:30 +01:00
|
|
|
.PHONY: link-cli
|
|
|
|
link-cli: $(addprefix stow-,$(CLI_PACKAGES))
|
|
|
|
|
|
|
|
.PHONY: link-visual
|
|
|
|
link-visual: $(addprefix stow-,$(VISUAL_PACKAGES))
|
|
|
|
|
2019-10-29 15:59:00 +01:00
|
|
|
# Installing configuration packages
|
2020-08-21 18:19:47 +02:00
|
|
|
.PHONY: $(addprefix stow-,$(CLI_PACKAGES))
|
|
|
|
.PHONY: $(addprefix stow-,$(VISUAL_PACKAGES))
|
2019-10-29 15:59:00 +01:00
|
|
|
stow-%: %
|
|
|
|
$(STOW) $<
|
|
|
|
|
|
|
|
stow-scripts: STOW_TARGET=~/.scripts
|
|
|
|
stow-scripts: scripts
|
|
|
|
mkdir -p $(STOW_TARGET)
|
|
|
|
$(STOW) $<
|
|
|
|
|
2020-06-24 11:33:05 +02:00
|
|
|
stow-system-X: STOW_TARGET=/
|
|
|
|
stow-system-X: system-X
|
|
|
|
sudo $(STOW) $<
|
|
|
|
|
2020-02-04 14:43:49 +01:00
|
|
|
stow-tin: tin
|
2020-05-01 16:46:51 +02:00
|
|
|
rm -rf $(STOW_TARGET)/.tin
|
2020-02-04 14:43:49 +01:00
|
|
|
ln -s $(realpath tin/.tin) $(STOW_TARGET)/.tin
|
|
|
|
|
2020-08-21 18:02:25 +02:00
|
|
|
stow-tmux: tmux
|
|
|
|
$(STOW) $<
|
|
|
|
[ -d ~/.config/tmux/plugins/tpm ] || \
|
|
|
|
git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm;
|
|
|
|
~/.config/tmux/plugins/tpm/bin/install_plugins
|
|
|
|
|
2019-10-29 15:59:00 +01:00
|
|
|
stow-vim: vim
|
|
|
|
$(STOW) $<
|
2020-08-21 18:19:47 +02:00
|
|
|
vim +PlugInstall +qa
|
2019-10-29 15:59:00 +01:00
|
|
|
|
2019-10-29 16:30:30 +01:00
|
|
|
# Removing packages
|
2020-08-21 18:19:47 +02:00
|
|
|
.PHONY: unlink-all
|
|
|
|
unlink-all: unlink-cli unlink-visual
|
2019-10-29 16:30:30 +01:00
|
|
|
|
2020-08-21 18:19:47 +02:00
|
|
|
.PHONY: unlink-cli
|
2019-10-29 16:30:30 +01:00
|
|
|
unlink-cli: $(addprefix unstow-,$(CLI_PACKAGES))
|
|
|
|
|
2020-08-21 18:19:47 +02:00
|
|
|
.PHONY: unlink-visual
|
2019-10-29 16:30:30 +01:00
|
|
|
unlink-visual: $(addprefix unstow-,$(VISUAL_PACKAGES))
|
|
|
|
|
2020-08-21 18:19:47 +02:00
|
|
|
.PHONY: $(addprefix unstow-,$(CLI_PACKAGES))
|
|
|
|
.PHONY: $(addprefix unstow-,$(VISUAL_PACKAGES))
|
2019-10-29 16:30:30 +01:00
|
|
|
unstow-%:
|
|
|
|
$(STOW) -D $*
|
|
|
|
|
|
|
|
unstow-scripts: STOW_TARGET=~/.scripts
|
|
|
|
unstow-scripts:
|
|
|
|
$(STOW) -D scripts
|
|
|
|
|
2020-06-24 11:33:05 +02:00
|
|
|
unstow-system-X: STOW_TARGET=/
|
|
|
|
unstow-system-X:
|
|
|
|
sudo $(STOW) -D system-X
|
|
|
|
|
2020-02-04 14:43:49 +01:00
|
|
|
unstow-tin:
|
|
|
|
rm -f $(STOW_TARGET)/.tin
|
|
|
|
|
2020-08-21 18:02:25 +02:00
|
|
|
unstow-tmux:
|
|
|
|
$(STOW) -D tmux
|
|
|
|
rm -rf ~/.config/tmux/plugins/
|
|
|
|
|
2020-08-22 18:32:40 +02:00
|
|
|
# The `rustup` package does not install a toolchain by default
|
2019-10-29 15:59:00 +01:00
|
|
|
.PHONY: rust
|
|
|
|
rust:
|
2020-08-22 18:32:40 +02:00
|
|
|
rustup default stable
|
2020-04-06 18:37:47 +02:00
|
|
|
|
|
|
|
.PHONY: haskell
|
|
|
|
haskell:
|
2020-08-22 22:06:06 +02:00
|
|
|
if [ -n "$(HASKELL_DEPENDENCIES)" ]; then \
|
|
|
|
stack build --copy-compiler-tool $(HASKELL_DEPENDENCIES); \
|
|
|
|
fi
|