mirror of
https://github.com/pgrondek/config.git
synced 2024-11-22 12:03:43 +00:00
[i3] Move all config to separate folder
This commit is contained in:
parent
7954a0d9d6
commit
1ef8df42e6
77
i3/Makefile
Normal file
77
i3/Makefile
Normal file
@ -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)
|
21
i3/i3blocks/Makefile
Normal file
21
i3/i3blocks/Makefile
Normal file
@ -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)
|
14
install.sh
14
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user