forked from adi1090x/rofi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.sh
executable file
·67 lines (57 loc) · 1.17 KB
/
setup.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
#!/usr/bin/env bash
# Install script for rofi themes
# Dirs
DIR=`pwd`
FONT_DIR="$HOME/.local/share/fonts"
ROFI_DIR="$HOME/.config/rofi"
# Install Fonts
install_fonts() {
echo -e "\n[*] Installing fonts..."
if [[ -d "$FONT_DIR" ]]; then
cp -rf $DIR/fonts/* "$FONT_DIR"
else
mkdir -p "$FONT_DIR"
cp -rf $DIR/fonts/* "$FONT_DIR"
fi
}
# Install Themes
install_themes() {
if [[ -d "$ROFI_DIR" ]]; then
echo -e "[*] Creating a backup of your rofi configs..."
mv "$ROFI_DIR" "${ROFI_DIR}.old"
{ mkdir -p "$ROFI_DIR"; cp -rf $DIR/$RES/* "$ROFI_DIR"; }
else
{ mkdir -p "$ROFI_DIR"; cp -rf $DIR/$RES/* "$ROFI_DIR"; }
fi
if [[ -f "$ROFI_DIR/config.rasi" ]]; then
echo -e "[*] Successfully Installed.\n"
exit 0
else
echo -e "[!] Failed to install.\n"
exit 1
fi
}
# Main
main() {
clear
cat <<- EOF
[*] Installing Rofi Themes...
[*] Choose your screen resolution -
[1] 1920x1080
[2] 1366x768
EOF
read -p "[?] Select Option : "
if [[ $REPLY == "1" ]]; then
RES='1080p'
install_fonts
install_themes
elif [[ $REPLY == "2" ]]; then
RES='720p'
install_fonts
install_themes
else
echo -e "\n[!] Invalid Option, Exiting...\n"
exit 1
fi
}
main