James Patrick
6c3787ef1b
This makes it a hell of a lot simpler but will lose support for BSD make. All effected machines are running gnu-make, so the cost benefit ratio ways heavily in favor of doing this.
27 lines
577 B
Makefile
27 lines
577 B
Makefile
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)
|