dotfiles/waybar/makefile
2021-11-28 16:33:24 -05:00

26 lines
584 B
Makefile

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