forked from mklan/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·117 lines (81 loc) · 2.71 KB
/
install.sh
File metadata and controls
executable file
·117 lines (81 loc) · 2.71 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
#!/bin/bash
function main {
read -p "Do you want to install the required packages (arch only) [y/N]?" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
installList './arch-pkglist'
fi
# install theme
wpg-install.sh -g -i
wpg -s ${1}
cp scripts/* /usr/local/bin
createSymlinks
installZsh
./systemd/setup.sh
# disable lightdm to use startx at startup
systemctl disable lightdm.service
sudo systemctl enable --now acpid.service
# apply throttle fix (throttle pacman package)
sudo systemctl enable --now lenovo_fix.service
# add user to video group (for light control)
sudo usermod -aG video $USER
sudo usermod -aG wheel $USER
# get vscode pywal theme
# git clone https://github.com/Bluedrack28/vscode-wal.git ~/.vscode-oss/extensions/vscode-wal
# install additional apps
read -p "Do you want to install additional apps (arch only) [y/N]?" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
installList './apps_pkglist'
fi
}
function installList {
# install basic dependencies
sudo pacman -S --noconfirm --needed base-devel git wget yajl dialog
# TODO make optional
installYay
# install packages from passed list
selection=$(sudo ./install/list-select.sh $1 "Select to install")
yay -S --noeditmenu --nodiffmenu --nocleanmenu --noconfirm ${selection}
}
function installZsh {
# install oh my zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
# switch to zsh
chsh -s /usr/bin/zsh $USER
# install zsh plugins
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# themes
yay -S --noeditmenu --nodiffmenu --nocleanmenu --noconfirm zsh-theme-powerlevel10k-git
}
function createSymlinks {
# just in case
mv ~/.config/neofetch/config.conf ~/.config/neofetch/config.conf.bak
# create symlinks
stow config
# dunst pywal theming
ln -sf "${HOME}/.cache/wal/dunstrc" "${HOME}/.config/dunst/dunstrc"
# patch
ln -sf $(pwd)/_patches/mic_mute_external/lenovo-mutemic /etc/acpi/events/lenovo-mutemic
sudo mkdir -p /etc/X11/xorg.conf.d
sudo ln -sf $(pwd)/X11/xorg.conf.d/* /etc/X11/xorg.conf.d/
# profileFolder=$(ls $HOME/.mozilla/firefox/ | grep .default)
# ln -sf $(pwd)/firefox/* ~/.mozilla/firefox/$profileFolder/
# fusuma (touchpad gesture) needs this
sudo gpasswd -a $USER input
sudo ln -sf $(pwd)/bluetooth/51-blueman.rules /usr/share/polkit-1/rules.d/51-blueman.rules
}
function installYay {
if ! command -v "yay" &> /dev/null
then
echo "yay not found! will install ..."
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si --skipinteg --noconfirm --needed
cd ..
rm -rf yay
fi
}
main