-
Notifications
You must be signed in to change notification settings - Fork 0
/
stow.sh
executable file
·48 lines (43 loc) · 1.41 KB
/
stow.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
rm_if_link() { [ ! -L "$1" ] || rm -v "$1"; }
rm_if_not_link() { [ -L "$1" ] || rm -rfv "$1"; }
mkdir -p ~/.local/share/lf
mkdir -p ~/.local/share/gnupg
mkdir -p ~/.config/systemd/user
# remove existing files/dirs
rm_if_not_link ~/.bin
rm_if_not_link ~/.bashrc
rm_if_not_link ~/.ideavimrc
rm_if_not_link ~/.bash_logout
rm_if_not_link ~/.bash_profile
rm_if_not_link ~/.xinitrc
rm_if_not_link ~/.inputrc
rm_if_not_link ~/.config/redshift
rm_if_not_link ~/.config/lazygit
rm_if_not_link ~/.config/tmuxinator
rm_if_not_link ~/.config/picom
rm_if_not_link ~/.config/autorandr
rm_if_not_link ~/.config/ranger
rm_if_not_link ~/.config/lazygit
rm_if_not_link ~/.config/nvim/lua/user
rm_if_not_link ~/.config/user-dirs.dirs
rm_if_not_link ~/.config/mimeapps.list
rm_if_not_link ~/.local/share/lf/marks
rm_if_not_link ~/.local/share/gnupg/gpg.conf
rm_if_not_link ~/.local/share/gnupg/gpg-agent.conf
stow home -v -t ~ 2>&1
if [ ! $(find dotfiles-personal -maxdepth 0 -empty) ]; then
cd dotfiles-personal || exit 1
stow home -v -t ~
cd ..
fi
# Init themes if they do not exist
if [ ! -f ~/.config/themes/dwm/theme ]; then
cp ~/.config/themes/dwm/gruvbox ~/.config/themes/dwm/theme
fi
if [ ! -f ~/.config/themes/dmenu/theme ]; then
cp ~/.config/themes/dmenu/gruvbox ~/.config/themes/dmenu/theme
fi
if [ ! -f ~/.config/themes/luastatus/theme ]; then
cp ~/.config/themes/luastatus/gruvbox.lua ~/.config/themes/luastatus/color.lua
fi