-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·64 lines (55 loc) · 1.07 KB
/
setup.sh
File metadata and controls
executable file
·64 lines (55 loc) · 1.07 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env bash
# https://dev.to/writingcode/how-i-manage-my-dotfiles-using-gnu-stow-4l59
# make sure we have pulled in and updated any submodules
git submodule init
git submodule update
# what directories should be installable by all users including the root user
base=(
bash
compton
)
# folders that should, or only need to be installed for a locla user
useronly=(
bash
bspwm
dunst
git
gtk
#i3wm
ideavim
polybar
ranger
rofi
scripts
#tmux
vim
nvim
X
zsh
)
# run the stow command foor the passed in directory ($2) in location $1
stowit() {
usr=$1
app=$2
# -v verbose
# -R recursive
# -t target
stow -v -R -t ${usr} ${app}
}
echo ""
echo "Stowing apps for user: ${whoami}"
# install apps available to local users and root
for app in ${base[@]}; do
stowit "${HOME}" $app
done
# install only user space folders
for app in ${useronly[@]}; do
if [[ ! "$(whoami)" = *"root"* ]]; then
stowit "${HOME}" $app
fi
done
# copy xorg settings
echo "copying xorg.conf.d config..."
sudo cp ./xorg.conf.d/* /etc/X11/xorg.conf.d/
echo ""
echo "##### ALL DONE"