-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-core.sh
executable file
·69 lines (48 loc) · 1.67 KB
/
install-core.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
68
#!/bin/bash
RELATIVE_PATH="`dirname \"$0\"`"
DIRNAME="`( cd \"$RELATIVE_PATH\" && pwd )`"
function copy_files () {
cp -r "$DIRNAME/src/." ~/
if [[ ! $(grep "source ~/.custom-profile" ~/.profile) ]]; then
echo "source ~/.custom-profile" >> ~/.profile
fi
}
function create_files () {
if [ ! -r ~/.zsh_custom ]; then
touch ~/.zsh_custom
fi
}
PKG_DESKTOP+="vim zsh htop powerline powerline-fonts yay"
function install_apps () {
sudo pacman -S --needed --noconfirm ${PKG_DESKTOP}
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
git clone https://github.com/zsh-users/antigen.git ~/antigen
chsh -s /bin/zsh
vim -c ":PlugInstall | qa"
$DIRNAME/install-wallpapers.sh
}
function create_directories () {
mkdir -p ~/projects
mkdir -p ~/bin
}
function apply_configuration () {
if [[ -f /etc/lightdm/lightdm.conf ]]; then
GREETER_SCRIPT_CONF="greeter-setup-script=xset b off"
if [[ ! $(cat /etc/lightdm/lightdm.conf | grep -v "^#" | grep greeter-setup-script) ]]; then
sudo sed -i "/^\[Seat\:\*\]/a${GREETER_SCRIPT_CONF}" /etc/lightdm/lightdm.conf
fi
fi
# Set color on pacman
sudo sed -i 's/#Color/Color/' /etc/pacman.conf
# make swap writes less frequent
sudo sh -c 'printf "vm.swappiness=10" > /etc/sysctl.d/8833-sysctl.conf'
if [[ -f /etc/lightdm/slick-greeter.conf ]]; then
BACKGROUND_LIGHTDM="background=\/usr\/share\/sirgallfrey-wallpapers\/yuriy-chemerys-1428481-unsplash.jpg"
sudo sed -i -e "s/background=.*$/$BACKGROUND_LIGHTDM/" /etc/lightdm/slick-greeter.conf
fi
}
copy_files
create_directories
create_files
install_apps
apply_configuration