diff --git a/i3/Makefile b/i3/Makefile new file mode 100644 index 0000000..caf5861 --- /dev/null +++ b/i3/Makefile @@ -0,0 +1,77 @@ +REQUIRED_BINS=/usr/bin/i3 /usr/bin/i3blocks /usr/bin/i3lock /usr/bin/dunst /usr/bin/compton +PACKAGES=i3 i3blocks i3lock dunst compton + +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 +clean: clean_i3 clean_dunst clean_compton clean_i3blocks clean_bins +install: $(REQUIRED_BINS) install_i3 install_dunst install_compton install_i3blocks install_bins + +$(REQUIRED_BINS): + $(ROOT_APT) install $(PACKAGES) + +# i3 +clean_i3: + rm -f $(OUT) + +install_i3: $(I3_CONFIG_DIR) + 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) + +install_dunst: $(DUNST_CONFIG_DIR) + cp $(DUNST_CONFIG) $(DUNST_CONFIG_OUT) + +$(DUNST_CONFIG_DIR): + mkdir -p $(DUNST_CONFIG_DIR) + +# 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): + mkdir -p $(CUSTOM_BINS) $(CUSTOM_BINS_DIR) \ No newline at end of file diff --git a/bin/lock b/i3/bin/lock similarity index 100% rename from bin/lock rename to i3/bin/lock diff --git a/compton.conf b/i3/compton.conf similarity index 100% rename from compton.conf rename to i3/compton.conf diff --git a/i3-config b/i3/config similarity index 100% rename from i3-config rename to i3/config diff --git a/dunstrc b/i3/dunstrc similarity index 100% rename from dunstrc rename to i3/dunstrc diff --git a/i3/i3blocks/Makefile b/i3/i3blocks/Makefile new file mode 100644 index 0000000..f68d8ff --- /dev/null +++ b/i3/i3blocks/Makefile @@ -0,0 +1,21 @@ +CONFIG=config +CONFIG_OUT=$(HOME)/.config/i3blocks/config +CONFIG_DIR=$(HOME)/.config/i3blocks +BLOCKS := $(wildcard blocks/*) + +OUT=$(I3_CONFIG_OUT) + +.PHONY: clean_install + +clean_install: clean install + +clean: + rm -rf $(CONFIG_OUT) + rm -rf $(CONFIG_DIR) + +install: $(CONFIG_DIR) + cp $(CONFIG) $(CONFIG_OUT) + cp $(BLOCKS) $(CONFIG_DIR) + +$(CONFIG_DIR): + mkdir -p $(CONFIG_DIR) diff --git a/i3blocks/brightness b/i3/i3blocks/blocks/brightness similarity index 100% rename from i3blocks/brightness rename to i3/i3blocks/blocks/brightness diff --git a/i3blocks/cpu b/i3/i3blocks/blocks/cpu similarity index 100% rename from i3blocks/cpu rename to i3/i3blocks/blocks/cpu diff --git a/i3blocks/date b/i3/i3blocks/blocks/date similarity index 100% rename from i3blocks/date rename to i3/i3blocks/blocks/date diff --git a/i3blocks/memory b/i3/i3blocks/blocks/memory similarity index 100% rename from i3blocks/memory rename to i3/i3blocks/blocks/memory diff --git a/i3blocks/volume b/i3/i3blocks/blocks/volume similarity index 100% rename from i3blocks/volume rename to i3/i3blocks/blocks/volume diff --git a/i3blocks/config b/i3/i3blocks/config similarity index 100% rename from i3blocks/config rename to i3/i3blocks/config diff --git a/install.sh b/install.sh index 2cb2421..1d2a243 100755 --- a/install.sh +++ b/install.sh @@ -1,29 +1,15 @@ #!/bin/sh -rm -f $HOME/.config/i3/config -rm -f $HOME/.config/dunst/dunstrc -rm -f $HOME/.config/i3blocks -rm -f $HOME/.config/compton.conf -rm -f $HOME/.i3status.conf -rm -f $HOME/bin/lock rm -f $HOME/bin/transmission-add rm -f $HOME/.local/share/applications/torrent.desktop rm -f $HOME/.ssh/authorized_keys -mkdir -p $HOME/.config/i3 -mkdir -p $HOME/.config/dunst mkdir -p $HOME/bin/ mkdir -p $HOME/.ssh mkdir -p $HOME/.local/share/applications -ln -s $(pwd)/i3-config $HOME/.config/i3/config -ln -s $(pwd)/i3blocks $HOME/.config/i3blocks -ln -s $(pwd)/compton.conf $HOME/.config/compton.conf -ln -s $(pwd)/dunstrc $HOME/.config/dunst/dunstrc - ln -s $(pwd)/ssh/authorized_keys $HOME/.ssh/authorized_keys -ln -s $(pwd)/bin/lock $HOME/bin/lock ln -s $(pwd)/bin/transmission-add $HOME/bin/transmission-add ln -s $(pwd)/local/share/applications/torrent.desktop $HOME/.local/share/applications/torrent.desktop