2019-06-01 02:04:17 +00:00
|
|
|
SRC := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
|
|
|
|
|
|
|
include ../lib/shared.mk
|
|
|
|
TARGET := $(XDG_DIR)/i3
|
|
|
|
|
|
|
|
install: | init update
|
|
|
|
|
|
|
|
init:
|
|
|
|
ifeq ($(call cmd_exist,i3), true)
|
|
|
|
$(info => Setting up i3)
|
|
|
|
$(mk_link) $(SRC) $(TARGET)
|
2019-06-16 23:09:46 +00:00
|
|
|
else
|
|
|
|
$(report) warn "i3 not installed."
|
2019-06-01 02:04:17 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
update:
|
|
|
|
ifeq ($(call cmd_exist,i3-msg), true)
|
|
|
|
$(info => Reloading i3-msg)
|
2019-06-16 23:09:46 +00:00
|
|
|
$(MAKE) -C $(SRC) build_i3
|
2019-06-29 00:17:05 +00:00
|
|
|
i3-msg reload ; $(report) "i3 reload"
|
2019-06-16 23:09:46 +00:00
|
|
|
else
|
|
|
|
$(report) warn "i3 not installed."
|
2019-06-01 02:04:17 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
remove:
|
|
|
|
$(info => Remvoing sway)
|
|
|
|
$(rm_link) $(TARGET)
|
2019-06-16 23:09:46 +00:00
|
|
|
|
|
|
|
build_i3:
|
|
|
|
cat $(SRC)/config.d/* > $(SRC)/config
|