2020-03-19 19:55:20 +00:00
|
|
|
# -*- mode: makefile-gmake; -*-
|
2019-04-27 22:21:33 +00:00
|
|
|
SRC := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
|
|
|
|
|
|
|
include ../lib/shared.mk
|
|
|
|
TARGET := $(XDG_DIR)/sway
|
|
|
|
|
|
|
|
install: | init update
|
|
|
|
|
|
|
|
init:
|
2020-03-09 17:30:45 +00:00
|
|
|
if (( ! $$+commands[sway] )) ; then
|
|
|
|
$(report) debug "Sway not installed. Skipping."
|
|
|
|
else
|
|
|
|
$(report) header "Setting up sway"
|
|
|
|
$(mk_link) $(SRC) $(TARGET)
|
|
|
|
fi
|
2019-04-27 22:21:33 +00:00
|
|
|
|
|
|
|
update:
|
2020-03-09 17:30:45 +00:00
|
|
|
if (( ! $$+commands[swaymsg] )) ; then
|
|
|
|
$(report) debug "swaymsg not installed. Skipping."
|
|
|
|
else
|
|
|
|
$(report) header "Reloading sway"
|
|
|
|
swaymsg reload ; $(report) "sway reload"
|
|
|
|
fi
|
2019-04-27 22:21:33 +00:00
|
|
|
|
|
|
|
remove:
|
2020-03-09 17:30:45 +00:00
|
|
|
$(report) header "Removing sway"
|
2019-04-27 22:21:33 +00:00
|
|
|
$(rm_link) $(TARGET)
|