1
0
mirror of https://github.com/pgrondek/config.git synced 2024-11-25 21:25:39 +00:00
config/i3/Makefile

95 lines
1.8 KiB
Makefile
Raw Normal View History

2019-11-19 08:53:28 +00:00
include *.mk
2019-08-21 14:42:28 +00:00
REQUIRED_BINS=\
2019-11-07 08:24:14 +00:00
/usr/bin/i3 \
/usr/bin/i3blocks \
/usr/bin/i3lock \
/usr/bin/xautolock \
/usr/bin/dunst \
/usr/bin/compton \
/usr/bin/numlockx \
/usr/bin/gedit \
2019-11-07 08:55:58 +00:00
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 \
/usr/bin/gsimplecal
2019-11-07 08:24:14 +00:00
PACKAGES=\
i3 \
i3blocks \
i3lock \
dunst \
compton \
numlockx \
gedit \
xautolock \
2019-11-07 08:55:58 +00:00
policykit-1-gnome \
gsimplecal
I3_CONFIG=config
I3_CONFIG_OUT=$(HOME)/.config/i3/config
I3_CONFIG_DIR=$(HOME)/.config/i3
DUNST_CONFIG=dunstrc
DUNST_CONFIG_OUT=$(HOME)/.config/dunst/dunstrc
DUNST_CONFIG_DIR=$(HOME)/.config/dunst
COMPTON_CONFIG=compton.conf
COMPTON_CONFIG_OUT=$(HOME)/.config/compton.conf
COMPTON_CONFIG_DIR=$(HOME)/.config
CUSTOM_BINS= $(wildcard bin/*)
CUSTOM_BINS_DIR=$(HOME)/bin
ROOT_APT=sudo aptitude
OUT=$(I3_CONFIG_OUT) $(DUNST_CONFIG_OUT)
.PHONY: clean_install
clean_install: clean install
2019-11-19 08:53:28 +00:00
clean: clean_i3 clean_dunst clean_compton clean_i3blocks clean_bins clean_playerctl
install: $(REQUIRED_BINS) install_i3 install_compton install_i3blocks install_bins clean_dunst install_playerctl
$(REQUIRED_BINS):
$(ROOT_APT) install $(PACKAGES)
# i3
clean_i3:
rm -f $(OUT)
2019-11-07 08:24:14 +00:00
install_i3: $(I3_CONFIG_DIR) $(REQUIRED_BINS)
cp $(I3_CONFIG) $(I3_CONFIG_OUT)
$(I3_CONFIG_DIR):
mkdir -p $(I3_CONFIG_DIR)
# i3blocks
install_i3blocks:
$(MAKE) -C i3blocks install
clean_i3blocks:
$(MAKE) -C i3blocks clean
# dunst
clean_dunst:
rm -f $(DUNST_CONFIG_OUT)
# compton
clean_compton:
rm -f $(COMPTON_CONFIG_OUT)
install_compton: $(COMPTON_CONFIG_DIR)
cp $(COMPTON_CONFIG) $(COMPTON_CONFIG_OUT)
$(COMPTON_CONFIG_DIR):
mkdir -p $(COMPTON_CONFIG_DIR)
# bins
install_bins: $(CUSTOM_BINS_DIR)
cp $(CUSTOM_BINS) $(CUSTOM_BINS_DIR)
clean_bins:
rm -f $(CUSTOM_BINS:bin%=$(CUSTOM_BINS_DIR)%)
$(CUSTOM_BINS_DIR):
2019-11-04 13:21:16 +00:00
mkdir -p $(CUSTOM_BINS_DIR)