dotfiles/waybar/makefile

28 lines
609 B
Makefile

# -*- mode: makefile-gmake; -*-
SRC := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
include ../lib/shared.mk
TARGET := $(XDG_DIR)/waybar
install: | init update
init:
if (( $$+commands[waybar] )) ; then
$(report) header "Setting up waybar"
$(mk_link) $(SRC) $(TARGET)
else
$(report) debug "waybar not installed. Skipping."
fi
update:
if (( $$+commands[swaymsg] )) ; then
$(report) header "Reloading waybar"
swaymsg reload ; $(report) "sway reload"
else
$(report) debug "swaymsg not installed. Skipping."
fi
remove:
$(report) header "Removing waybar"
$(rm_link) $(TARGET)