REPO_CHANGES := $(shell git status --porcelain | wc -l) IS_FEDORA := $(shell command -v dnf > /dev/null && test -f /etc/fedora-release; echo $$?) include environment.mk .PHONY: console console: ifneq ($(REPO_CHANGES),0) $(error will not run with a dirty repo. stash or commit changes, or re-run forcing REPO_CHANGES=0.) endif git submodule update --init --recursive cp --update=none local/vimrc-local stow/vim/.vimrc-local cp --update=none local/gitconfig-local stow/git/.config/git/config-local cp --update=none local/local.zsh stow/zsh/.config/zsh/00-local.zsh mkdir -p ${HOME}/.local/share/zsh stow --adopt --dir=stow --target=$(HOME) console-utils stow --adopt --dir=stow --target=$(HOME) dircolors stow --adopt --dir=stow --target=$(HOME) git stow --adopt --dir=stow --target=$(HOME) vim stow --adopt --dir=stow --target=$(HOME) zsh .PHONY: fedora-packages fedora-packages: ifneq ($(IS_FEDORA),0) $(warning not fedora workstation, skipping.) else sudo dnf install \ "https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(shell rpm -E %fedora).noarch.rpm" \ "https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(shell rpm -E %fedora).noarch.rpm" sudo dnf install \ sway waybar rofi-wayland foot mako intel-one-mono-fonts \ udiskie libappindicator-gtk3 python3-b2sdk pass passmenu \ vlc unzip vim wget git zsh stow dnf-automatic \ grimshot pulseaudio-utils thunar pavucontrol-qt \ network-manager-applet sway-config-fedora blueman endif .PHONY: fedora fedora: console ifneq ($(IS_FEDORA),0) $(warning not fedora workstation, skipping.) else ifeq ($(COMPUTER_IDENTITY),desktop) ln -sfr stow/swaylock/.config/swaylock/config.4k stow/swaylock/.config/swaylock/config ln -sfr stow/foot/.config/foot/foot.4k.ini stow/foot/.config/foot/foot-environment.ini ln -sfr stow/waybar/.config/waybar/config.4k stow/waybar/.config/waybar/config else ln -sfr stow/swaylock/.config/swaylock/config.1k stow/swaylock/.config/swaylock/config ln -sfr stow/foot/.config/foot/foot.1k.ini stow/foot/.config/foot/foot-environment.ini ln -sfr stow/waybar/.config/waybar/config.1k stow/waybar/.config/waybar/config endif stow --adopt --dir=stow --target=$(HOME) foot stow --adopt --dir=stow --target=$(HOME) mako stow --adopt --dir=stow --target=$(HOME) rofi stow --adopt --dir=stow --target=$(HOME) sway stow --adopt --dir=stow --target=$(HOME) swaylock stow --adopt --dir=stow --target=$(HOME) udiskie stow --adopt --dir=stow --target=$(HOME) waybar stow --adopt --dir=stow --target=$(HOME) xdg-names ifeq ($(shell systemctl --user is-active sway-session.target),active) systemctl --user enable --now udiskie.service systemctl --user enable --now xdg-names.service else systemctl --user enable udiskie.service systemctl --user enable xdg-names.service endif sudo systemctl enable --now dnf-automatic.timer mkdir -p ${HOME}/.local/share/backgrounds ln -sf /usr/share/backgrounds/default.png ${HOME}/.local/share/backgrounds/default ln -sf /usr/share/backgrounds/default.png ${HOME}/.local/share/backgrounds/locked endif .PHONY: restore restore: git restore stow