-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·160 lines (142 loc) · 5.7 KB
/
install
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
158
159
160
#!/bin/bash
# ---------------------------------------------------------------------------
# Script to install these dotfiles into the current user's home.
#
# WARNING: This *will* overwrite existing files!
# ---------------------------------------------------------------------------
DO_CLEAN=${1:-n}
if [[ "${DO_CLEAN}" == "-c" ]]; then
RESPONSE="y"
else
echo -n "Perform clean install? [y/N] "
read RESPONSE
fi
cd
if [[ "${RESPONSE}" == "y" ]]; then
[ -d .irssi ] && rm -rf .irssi
[ -d .oh-my-zsh ] && rm -rf .oh-my-zsh
[ -d .zsh/perhost ] && rm -rf .zsh/perhost
[ -d .psql_history ] || mkdir .psql_history
[ -f .Xdefaults ] && rm .Xdefaults
[ -f .Xresources ] && rm .Xresources
[ -f .bashrc ] && rm .bashrc
[ -f .bashrc_BBS-goon ] && rm .bashrc_BBS-goon
[ -f .digrc ] && rm .digrc
[ -f .gitconfig ] && rm .gitconfig
[ -f .gitignore ] && rm .gitignore
[ -f .stignore ] && rm .stignore
[ -f .inputrc ] && rm .inputrc
[ -f .minttyrc ] && rm .minttyrc
[ -f .psql_history ] && mv -v .psql_history .psql_history.bak
[ -f .psql_history.bak ] && mv -v .psql_history.bak .psql_history/old-single-file-history
[ -f .psqlrc ] && rm .psqlrc
[ -f .pylintrc ] && rm .pylintrc
[ -f .Xmodmap ] && rm .Xmodmap
[ -f .pystartup ] && rm .pystartup
[ -f .tmux.conf ] && rm .tmux.conf
[ -f .zshrc ] && rm .zshrc
[ -f .zshrc_blackdragon ] && rm .zshrc_blackdragon
[ -f .zshrc_lillend ] && rm .zshrc_lillend
[ -f ${USERPROFILE}/AppData/Roaming/Code/User/settings.json ] && rm ${USERPROFILE}/AppData/Roaming/Code/User/settings.json
[ -s .xinitrc ] && rm .xinitrc
[ -s .xmodmaprc ] && rm .xmodmaprc
[ -s .i3 ] && rm -rf .i3
[ -d .config/sxhkd ] && rm -rf .config/sxhkd
[ -d .config/nvim ] && rm -rf .config/nvim
[ -d .config/bspwm ] && rm -rf .config/bspwm
[ -d .config/rofi ] && rm -rf .config/rofi
[ -f ~/.config/Code/User/settings.json ] && rm ~/.config/Code/User/settings.json
[ -f ~/.config/fontconfig/conf.d/99-emoji.conf ] && rm ~/.config/fontconfig/conf.d/99-emoji.conf
fi
mkdir -p ~/.zsh/perhost
mkdir -p ~/.gnupg
chmod 700 ~/.gnupg
cp -vs dotfiles/.gnupg/* ~/.gnupg
ln -vs dotfiles/.psqlrc
ln -vs dotfiles/.irssi
ln -vs dotfiles/.bashrc
ln -vs dotfiles/.bashrc_BBS-goon
ln -vs dotfiles/.digrc
ln -vs dotfiles/.gitconfig
ln -vs dotfiles/.gitignore_global .gitignore
ln -vs dotfiles/.stignore .stignore
ln -vs dotfiles/.inputrc
ln -vs dotfiles/.pylintrc
ln -vs dotfiles/.Xmodmap
ln -vs dotfiles/.pystartup
ln -vs dotfiles/.tmux.conf
ln -vs dotfiles/.Xresources
ln -vs dotfiles/.Xresources .Xdefaults
ln -vs dotfiles/.zshrc
ln -vs dotfiles/.zshrc_blackdragon
ln -vs dotfiles/.zshrc_lillend
ln -vs dotfiles/.minttyrc
ln -vs dotfiles/.xinitrc
ln -vs dotfiles/.i3
ln -vs dotfiles/bspwm .config/bspwm
ln -vs dotfiles/rofi .config/rofi
ln -vs dotfiles/sxhkd .config/sxhkd
ln -vs dotfiles/nvim .config/nvim
ln -vs ~/dotfiles/zsh-perhost/DESKTOP-BHQ0QLD.zsh ~/.zsh/perhost/DESKTOP-BHQ0QLD.zsh
ln -vs ~/dotfiles/zsh-perhost/basilisk.zsh ~/.zsh/perhost/basilisk.zsh
ln -vs ~/dotfiles/zsh-perhost/displacer2.zsh ~/.zsh/perhost/displacer2.zsh
mkdir -p ~/.config/Code/User
ln -vs ~/dotfiles/VsCode/settings.json ~/.config/Code/User/settings.json
mkdir -p ~/.config/fontconfig/conf.d
ln -vs ~/dotfiles/.config/fontconfig/conf.d/99-emoji.conf ~/.config/fontconfig/conf.d/99-emoji.conf
if [[ $(uname -s) == CYGWIN* ]]; then
mkdir -p ${USERPROFILE}/AppData/Roaming/Code/User
cp VsCode/settings.json ${USERPROFILE}/AppData/Roaming/Code/User/settings.json
fi
pip install --user cstop
mkdir -p ~/.config/i3status && ln -vs ~/dotfiles/i3status.config ~/.config/i3status/config
git clone https://github.com/exhuma/oh-my-zsh.git .oh-my-zsh
(cd .oh-my-zsh && git remote add upstream ssh://[email protected]/robbyrussell/oh-my-zsh)
if which irssi; then
read -sp "[IRSSI] FreeNode Password: " IRSSI_PASSWORD
cat dotfiles/.irssi/config.template | \
sed -e "s/{{password}}/${IRSSI_PASSWORD}/" \
> .irssi/config
echo
else
echo "irssi not installed"
fi
HOSTNAME=$(hostname -s)
echo Installing overlay for $HOSTNAME
if [ -d dotfiles/${HOSTNAME}/.kde/Autostart ]; then
rm -rf .kde/Autostart
ln -vs ~/dotfiles/${HOSTNAME}/.kde/Autostart ~/.kde/Autostart
fi
if [ -f dotfiles/${HOSTNAME}/.xmodmaprc ]; then
ln -vs dotfiles/${HOSTNAME}/.xmodmaprc
fi
# Install Konsole colour schemes
if [ -f /usr/bin/konsole ]; then
if [ ! -f ~/.kde/share/apps/konsole/base16-atelierforest.colorscheme ]; then
(cd /tmp && git clone https://github.com/chriskempson/base16-builder.git)
(cd /tmp/base16-builder && ./base16 -t konsole)
mkdir -p ~/.kde/share/apps/konsole
mv /tmp/base16-builder/output/konsole/* ~/.kde/share/apps/konsole
cat <<EOF > ~/.kde/share/apps/konsole/Shell.profile
[Appearance]
ColorScheme=base16-atelierforest
Font=Anonymous Pro for Powerline,18,-1,5,50,0,0,0,0,0
[General]
Name=Shell
Parent=FALLBACK/
ShowMenuBar=false
TabBarMode=1
[Scrolling]
HistorySize=10000
EOF
rm -rf /tmp/base16-builder
echo
echo ┌──────────────────────────────────────────────────────────────────────┐
echo │In order to get the new konsole colors, konsole needs to be restarted!│
echo └──────────────────────────────────────────────────────────────────────┘
echo
fi
fi
# tmux theme pack
git clone https://github.com/jimeh/tmux-themepack.git ~/.tmux-themepack || (cd ~/.tmux-themepack && git pull)
echo done!