forked from gsouf/cub-linux-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
67 lines (51 loc) · 2.02 KB
/
run.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
SCRIPTFILE=$(readlink -f "$0")
SCRIPTDIR=$(dirname "$SCRIPTFILE")
sh $SCRIPTDIR/packages.sh
echo "Setting up alternatives"
sudo update-alternatives --install /usr/bin/g-edit graphical-text-editor /usr/bin/subl 90
sudo update-alternatives --set editor /usr/bin/vim.basic
sudo update-alternatives --install /usr/bin/file-manager file-manager /usr/bin/gnome-commander 90
echo "Preparing composer command"
curl -sS https://getcomposer.org/installer | php -- --install-dir=$HOME/bin
mv $HOME/bin/composer.phar $HOME/bin/composer
chmod +x $HOME/bin/composer
echo "Initializing git bash prompt"
git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt
echo "replacing default desktop"
sudo apt-get remove plank --purge -y
sudo apt-get remove nautilus --purge -y
sudo apt-get remove lxpanel --purge -y
# free apt cache
sudo apt-get clean
echo "removing useless documents"
rmdir ~/Music
rmdir ~/Public
rmdir ~/Videos
rm -Rf ~/Templates
echo "setting up new environment"
# Nitrogen
mkdir ~/Pictures/wallpapers
cp $SCRIPTDIR/.config/wallpaper.jpg ~/Pictures/wallpapers
rm ~/.config/nitrogen/*
envsubst < $SCRIPTDIR/.config/nitrogen/bg-saved.cfg | tee ~/.config/nitrogen/bg-saved.cfg
envsubst < $SCRIPTDIR/.config/nitrogen/nitrogen.cfg | tee ~/.config/nitrogen/nitrogen.cfg
nitrogen --restore
# Tint2
sudo cp $SCRIPTDIR/.config/cardapio.desktop /usr/share/applications/cardapio.desktop
sudo cp $SCRIPTDIR/.config/magnifying-glass-icon.png /usr/share/applications/magnifying-glass-icon.png
mkdir ~/.config/tint2
cp $SCRIPTDIR/.config/tint2/tint2rc ~/.config/tint2/tint2rc
# gnome-commander
cp $SCRIPTDIR/.gnome2/gnome-commander ~/.gnome2/gnome-commander
# ob autostart
cp $SCRIPTDIR/.config/ob-autostart/config ~/.config/ob-autostart/config
# openbox
cp $SCRIPTDIR/.config/openbox/menu.xml ~/.config/openbox/menu.xml
# Bash
cp $SCRIPTDIR/.custombashrc ~/.custombashrc
cp $SCRIPTDIR/.inputrc ~/.inputrc
echo "source ~/.custombashrc" >> ~/.bashrc
echo "Updating mlocate database"
sudo updatedb
echo "Restarting now..."
sudo shutdown -r now