-
Notifications
You must be signed in to change notification settings - Fork 0
/
user_input.sh
executable file
·102 lines (88 loc) · 2.67 KB
/
user_input.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
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
#!/bin/bash
. ./input_elements.sh
# ------------------------------------------Startup Apps
echo "Select Auto-Startup Applications"
echo "Dunst (Core), Polybar (Core), PulseAudio(Core), Nitroge (Core), Feh (Core), Clipit (Tool),Flameshot (Tool)"
echo "Select Application to be installed"
OPTIONS_VALUES=("JetBrains Toolbox" "Discord" "Signal" "Firefox" "Atom" "VSCode" "PavuControl" "BlueMan" "Alacritty" "Zathura")
OPTIONS_LABELS=("Development" "Social" "Social" "Browser" "Editor" "Editor" "Core" "Core" "Terminal" "Documents")
for i in "${!OPTIONS_VALUES[@]}"; do
OPTIONS_STRING+="${OPTIONS_VALUES[$i]} (${OPTIONS_LABELS[$i]});"
done
prompt_for_multiselect SELECTED "$OPTIONS_STRING"
for i in "${!SELECTED[@]}"; do
if [ "${SELECTED[$i]}" == "true" ]; then
CHECKED+=("${OPTIONS_VALUES[$i]}")
fi
done
echo "${CHECKED[@]}"
# ------------------------------------------BlueMan
read -p "Do you have a Bluetooth Adapter?(Y)es (N)o" BLANSWER
case "$BLANSWER" in
[yY] | [yY][eE][sS])
echo "Yes"
;;
[nN] | [nN][oO])
echo "No"
;;
*)
echo "Please enter Yes or No"
;;
esac
# ------------------------------------------Keyboard Layouts
echo Yes
read -p "Do you require extra keyboard layouts? Specify language codes seperated by ',' : ex: el,en " LANGANSWER
echo "el,en"
case "$BLANSWER" in
[yY] | [yY][eE][sS])
echo "Yes"
;;
[nN] | [nN][oO])
echo "No"
;;
*)
echo "Please enter Yes or No"
;;
esac
# ------------------------------------------ Wireless
read -p "Do you have a Wireless Adapter? (Y)es (N)o" WLANSWER
echo "Yes"
case "$BLANSWER" in
[yY] | [yY][eE][sS])
echo "Yes"
;;
[nN] | [nN][oO])
echo "No"
;;
*)
echo "Please enter Yes or No"
;;
esac
# ------------------------------------------ Install Packages
echo "Select Application to be installed"
OPTIONS_VALUES=("JetBrains Toolbox" "Discord" "Signal" "Firefox" "Atom" "VSCode" "PavuControl" "BlueMan" "Alacritty" "Zathura")
OPTIONS_LABELS=("Development" "Social" "Social" "Browser" "Editor" "Editor" "Core" "Core" "Terminal" "Documents")
for i in "${!OPTIONS_VALUES[@]}"; do
OPTIONS_STRING+="${OPTIONS_VALUES[$i]} (${OPTIONS_LABELS[$i]});"
done
prompt_for_multiselect SELECTED "$OPTIONS_STRING"
for i in "${!SELECTED[@]}"; do
if [ "${SELECTED[$i]}" == "true" ]; then
CHECKED+=("${OPTIONS_VALUES[$i]}")
fi
done
echo "${CHECKED[@]}"
# ------------------------------------------ Save as Config
read -p "Do you want to save your choices for an easy re-Sync in the future?(Y)es (N)o" MAKECONFIGANSWER
echo "Yes"
case "MAKECONFIGANSWER" in
[yY] | [yY][eE][sS])
echo "Yes"
;;
[nN] | [nN][oO])
echo "No"
;;
*)
echo "Please enter Yes or No"
;;
esac