-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtumbleweed_base.sh
More file actions
143 lines (128 loc) · 3.9 KB
/
tumbleweed_base.sh
File metadata and controls
143 lines (128 loc) · 3.9 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#!/bin/bash
# Script by Farid Zellipour
# https://github.com/FaridZelli
# Last updated 2025-12-19 11:01 PM
# Check the current user
USER=$(whoami)
if [ "$USER" == "root" ]; then
# Welcome text
echo -e "
--------------------------------------------------
\033[32mYou are logged in as root.\033[0m
--------------------------------------------------"
else
# Non-root user detected
echo -e "
--------------------------------------------------
\033[31mWARNING: You do not seem to be logged in as root!\033[0m
--------------------------------------------------"
fi
# Ask whether to proceed
echo -e "
https://github.com/FaridZelli/LinuxScripts
This script will reconfigure your \033[32mopenSUSE Tumbleweed\033[0m environment.
Please ensure your system is already up-to-date.
By typing Y and pressing Enter, you agree that the author
bears no liability for any loss, damage or data corruption,
whether direct, indirect, incidental, consequential or punitive,
that may result from its use.
Continued use assumes your acceptance of these terms.
\033[33mDo you wish to continue? (Y/N)\033[0m
"
# User input
read -p "Your choice:" ANSWER
# Read input
case $ANSWER in
Y|y )
# Proceed with the rest of the script
;;
* )
# Stop the script for any other input
echo "Stopping the script..."
exit 1
;;
esac
# Ask whether to install codecs
echo -e "
\033[33mWould you like to install non-free multimedia codecs from Packman? (Recommended)\033[0m
1) Yes, install proprietary codecs
2) No, skip this step
0) Exit
"
# User input
read -p "Your choice:" ANSWER
# Read input
case $ANSWER in
1 )
# Adding packman-essentials repository
zypper ar -cfp 90 'https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/Essentials/' packman-essentials
zypper dup --from packman-essentials --allow-vendor-change
# Installing codecs
zypper in alsa alsa-oss alsa-plugins pipewire pipewire-alsa pipewire-pulseaudio pipewire-jack pipewire-aptx wireplumber wireplumber-audio ffmpeg libavcodec-full gstreamer-plugin-{openh264,pipewire} gstreamer-plugins-{base,good,good-extra,bad,ugly,libav} gstreamer-plugins-{bad,ugly}-codecs
;;
2 )
# Proceed with the rest of the script
echo "Skipping..."
;;
0 )
# Exit the script
echo "Stopping the script..."
exit 1
;;
* )
# Stop the script for any other input
echo "Invalid input, stopping the script..."
exit 1
;;
esac
# Ask whether to install Flatpak
echo -e "
\033[33mWould you like to install Flatpak and setup Flathub?\033[0m
1) Yes, install Flatpak and only add Flathub
2) Yes, install Flatpak and add Flathub along with Flathub Beta
3) No, skip this step
0) Exit
"
# User input
read -p "Your choice:" ANSWER
# Read input
case $ANSWER in
1 )
# Installing Flatpak
zypper in flatpak
# Adding Flathub
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak remote-modify --enable flathub
;;
2 )
# Installing Flatpak
zypper in flatpak
# Adding Flathub and Flathub Beta
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --if-not-exists flathub-beta https://dl.flathub.org/beta-repo/flathub-beta.flatpakrepo
flatpak remote-modify --enable flathub
flatpak remote-modify --enable flathub-beta
;;
3 )
# Proceed with the rest of the script
echo "Skipping..."
;;
0 )
# Exit the script
echo "Stopping the script..."
exit 1
;;
* )
# Stop the script for any other input
echo "Invalid input, stopping the script..."
exit 1
;;
esac
# (REMOVED) Ask whether to remove web browsers
# Removing web_browser providers (zypper se --provides web_browser)
# (REMOVED) Ask whether to install zypper-unjammed
# End of script
echo -e "
--------------------------------------------------
\033[32mIt's time to reboot!\033[0m
--------------------------------------------------"