2019-04-27 22:21:33 +00:00
|
|
|
SRC := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
|
|
|
|
|
|
|
include ../lib/shared.mk
|
|
|
|
TARGET := $(XDG_DIR)/waybar
|
|
|
|
|
|
|
|
install: | init update
|
|
|
|
|
|
|
|
init:
|
|
|
|
ifeq ($(call cmd_exist,waybar), true)
|
|
|
|
$(info => Setting up waybar)
|
|
|
|
$(mk_link) $(SRC) $(TARGET)
|
2019-06-16 22:58:36 +00:00
|
|
|
else
|
|
|
|
$(report) warn "waybar not installed. Skipping."
|
2019-04-27 22:21:33 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
update:
|
|
|
|
ifeq ($(call cmd_exist,swaymsg), true)
|
|
|
|
$(info => Reloading sway)
|
|
|
|
swaymsg reload ; $(report) "sway reload"
|
2019-06-16 22:58:36 +00:00
|
|
|
else
|
|
|
|
$(report) warn "swaymsg not installed. Skipping."
|
2019-04-27 22:21:33 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
remove:
|
|
|
|
$(info => Removing waybar)
|
2019-12-13 17:00:11 +00:00
|
|
|
$(rm_link) $(TARGET)
|
2019-04-27 22:21:33 +00:00
|
|
|
|
|
|
|
.PHONY: install update init remove
|