-
Notifications
You must be signed in to change notification settings - Fork 0
/
rice-cfg2
103 lines (77 loc) · 2.71 KB
/
rice-cfg2
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
download () {
pkg=$1
if [ -x "$(command -v apk)" ]; then sudo apk add --no-cache $pkg
elif [ -x "$(command -v apt-get)" ]; then sudo apt-get install $pkg
elif [ -x "$(command -v dnf)" ]; then sudo dnf install $pkg
elif [ -x "$(command -v zypper)" ]; then sudo zypper install $pkg
elif [ -x "$(command -v pacman)" ]; then sudo pacman -S $pkg
elif [ -x "$(command -v emerge)" ]; then sudo emerge --ask $pkg
else echo "Couldn't find proper package manager, please install $pkg manually">&2; fi
}
downloadPip () {
if [ -x "$(command -v apk)" ]; then sudo apk add --no-cache python3-pip
elif [ -x "$(command -v apt-get)" ]; then sudo apt-get install python3-pip
elif [ -x "$(command -v dnf)" ]; then sudo dnf install python3-pip
elif [ -x "$(command -v zypper)" ]; then sudo zypper install python3-pip
elif [ -x "$(command -v pacman)" ]; then sudo pacman -S python3-pip
elif [ -x "$(command -v emerge)" ]; then sudo emerge --ask dev-python/pip
else echo "Couldn't find proper package manager, please install $pkg manually">&2; fi
}
cat ~/.zshrc | sed -e "s/robbyrussell/alanpeabody/" > temp_zshrc
cat temp_zshrc
correct='n'
read -p "Is that .zshrc configuration correct (Y/n): " correct
if test correct = 'n'
then
echo "Leaving script.."
exit 0
elif test correct = 'N'
then
echo "Leaving script.."
exit 0
fi
mv temp_zshrc ~/.zshrc
clear
echo "Installing xdotool"
download 'xdotool'
sleep 5
clear
echo "Installing python-pywal"
downloadPip
pip3 install pywal
sudo mv ~/.local/bin/wal /usr/bin
sleep 5
clear
echo "Installing imagemagick"
download 'imagemagick'
sleep 5
clear
echo "All installations done. Configuring path & scripts..."
echo "Searching for display manager..."
displaymgr=$(grep 'ExecStart=' /etc/systemd/system/display-manager.service)
echo "Found display manager: "
echo $displaymgr
if test "$displaymgr" = "ExecStart=/usr/bin/sddm"
then
echo "Using installation process for sddm..."
sudo cp Exec/sddm_newtheme /usr/bin/newtheme
elif test "$displaymgr" = "ExecStart=/usr/bin/mdm"
then
echo "Using instalalation process for mdm (Mint display manager)..."
sudo cp Exec/mint_newtheme /usr/bin/newtheme
else
echo "Your display manager is not currently supported, trying with KDE Plasma/sddm installation...."
sudo cp Exec/sddm_newtheme /usr/bin/newtheme
fi
echo "Downloading zsh-syntax-highlighting..."
download 'zsh-syntax-highlighting'
gen0=$(cat gen_file0)
gen1=$(cat gen_file1)
echo $gen0 >> ~/.zshrc
echo $gen1 >> ~/.zshrc
clear
sudo chmod +x /usr/bin/newtheme
echo "Installation done!"
echo "To add new themes, add .jpg and .png files to ~/Themes directory."
echo "To change themes, use newtheme command"
zsh