-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·158 lines (126 loc) · 4.26 KB
/
setup.sh
File metadata and controls
executable file
·158 lines (126 loc) · 4.26 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
#!/usr/bin/env bash
# arg number check
if [ $# -lt 1 ]
then
echo "Usage: $0 /absolute/path/to/conf/git [--force]"
exit 1
fi
# absolute directory path check
case $1 in
/*)
if [ ! -d "$1" ]
then
echo "$1 is not a directory"
exit 1
fi
;;
*)
echo "$1 is not an absolute path"
exit 1
;;
esac
rmflags="-ivr"
if [ "$2" = "--force" ]
then
rmflags="-fvr"
fi
# dir
echo "Link: ~/.paps -> $1"
rm $rmflags ~/.paps
ln -sT "$1" ~/.paps
# ssh
mkdir -v -p ~/.ssh
echo "Link: ~/.ssh/config -> ~/.paps/ssh/config"
rm $rmflags ~/.ssh/config
ln -sT ~/.paps/ssh/config ~/.ssh/config
chmod -v og-rwx ~/.ssh/config
# X11
echo "Link: ~/.Xresources -> ~/.paps/x/Xresources"
rm $rmflags ~/.Xresources
ln -sT ~/.paps/x/Xresources ~/.Xresources
echo "Link: ~/.xsession -> ~/.paps/x/xsession"
rm $rmflags ~/.xsession
ln -sT ~/.paps/x/xsession ~/.xsession
echo "Link: ~/.Xmodmap -> ~/.paps/x/Xmodmap"
rm $rmflags ~/.Xmodmap
ln -sT ~/.paps/x/Xmodmap ~/.Xmodmap
# gtk 3
mkdir -v -p ~/.config/gtk-3.0
echo "Link: ~/.config/gtk-3.0/settings.ini -> ~/.paps/gtk/settings3.ini"
rm $rmflags ~/.config/gtk-3.0/settings.ini
ln -sT ~/.paps/gtk/settings3.ini ~/.config/gtk-3.0/settings.ini
# gtk 2
mkdir -v -p ~/.config/gtk-2.0
echo "Link: ~/.config/gtk-2.0/settings.ini -> ~/.paps/gtk/settings2.ini"
rm $rmflags ~/.config/gtk-2.0/settings.ini
ln -sT ~/.paps/gtk/settings2.ini ~/.config/gtk-2.0/settings.ini
echo "Link: ~/.gtkrc-2.0 -> ~/.paps/gtk/settings2.ini"
rm $rmflags ~/.gtkrc-2.0
ln -sT ~/.paps/gtk/settings2.ini ~/.gtkrc-2.0
# qt
mkdir -v -p ~/.qt
echo "Link: ~/.qt/qtrc -> ~/.paps/qt/qtrc"
rm $rmflags ~/.qt/qtrc
ln -sT ~/.paps/qt/qtrc ~/.qt/qtrc
echo "Link: ~/.config/Trolltech.conf -> ~/.paps/qt/Trolltech.conf"
rm $rmflags ~/.config/Trolltech.conf
ln -sT ~/.paps/qt/Trolltech.conf ~/.config/Trolltech.conf
echo "Link: ~/.config/QtProject.conf -> ~/.paps/qt/QtProject.conf"
rm $rmflags ~/.config/QtProject.conf
ln -sT ~/.paps/qt/QtProject.conf ~/.config/QtProject.conf
# icons
echo "Link: ~/.icons -> ~/.paps/icons"
rm $rmflags ~/.icons
ln -sT ~/.paps/icons ~/.icons
# fonts
echo "Link: ~/.fonts.conf -> ~/.paps/fonts/fonts.conf"
rm $rmflags ~/.fonts.conf
ln -sT ~/.paps/fonts/fonts.conf ~/.fonts.conf
echo "Link: ~/.fonts -> ~/.paps/fonts"
rm $rmflags ~/.fonts
ln -sT ~/.paps/fonts ~/.fonts
# openbox
mkdir -v -p ~/.config/openbox
echo "Link: ~/.config/openbox/menu.xml -> ~/.paps/openbox/menu.xml"
rm $rmflags ~/.config/openbox/menu.xml
ln -sT ~/.paps/openbox/menu.xml ~/.config/openbox/menu.xml
echo "Link: ~/.config/openbox/rc.xml -> ~/.paps/openbox/rc.xml"
rm $rmflags ~/.config/openbox/rc.xml
ln -sT ~/.paps/openbox/rc.xml ~/.config/openbox/rc.xml
echo "Link: ~/.config/openbox/autostart.sh -> ~/.paps/openbox/autostart.sh"
rm $rmflags ~/.config/openbox/autostart.sh
ln -sT ~/.paps/openbox/autostart.sh ~/.config/openbox/autostart.sh
mkdir -v -p ~/.themes
echo "Link: ~/.themes/retrosmart-openbox-themes-gold -> ~/.paps/openbox/retrosmart-openbox-themes-gold"
rm $rmflags ~/.themes/retrosmart-openbox-themes-gold
ln -sT ~/.paps/openbox/retrosmart-openbox-themes-gold ~/.themes/retrosmart-openbox-themes-gold
# parcellite
mkdir -v -p ~/.config/parcellite
echo "Link: ~/.config/parcellite/parcelliterc -> ~/.paps/parcellite/parcelliterc"
rm $rmflags ~/.config/parcellite/parcelliterc
ln -sT ~/.paps/parcellite/parcelliterc ~/.config/parcellite/parcelliterc
# nvim
mkdir -v -p ~/.config/nvim
echo "Link: ~/.config/nvim/init.lua -> ~/.paps/nvim/init.lua"
rm $rmflags ~/.config/nvim/init.lua
ln -sT ~/.paps/nvim/init.lua ~/.config/nvim/init.lua
# alacritty
mkdir -v -p ~/.config/alacritty
echo "Link: ~/.config/alacritty/alacritty.toml -> ~/.paps/alacritty/alacritty.toml"
rm $rmflags ~/.config/alacritty/alacritty.toml
ln -sT ~/.paps/alacritty/alacritty.toml ~/.config/alacritty/alacritty.toml
# zsh
echo "Link: ~/.zshrc -> ~/.paps/zsh/zshrc"
rm $rmflags ~/.zshrc
ln -sT ~/.paps/zsh/zshrc ~/.zshrc
echo "Link: ~/.inputrc -> ~/.paps/zsh/inputrc"
rm $rmflags ~/.inputrc
ln -sT ~/.paps/zsh/inputrc ~/.inputrc
# git
echo "Link: ~/.gitconfig -> ~/.paps/git/gitconfig"
rm $rmflags ~/.gitconfig
ln -sT ~/.paps/git/gitconfig ~/.gitconfig
# tmux
echo "Link: ~/.tmux.conf -> ~/.paps/tmux/tmux.conf"
rm $rmflags ~/.tmux.conf
ln -sT ~/.paps/tmux/tmux.conf ~/.tmux.conf