@@ -20,13 +20,13 @@ check_user_sddm_theme_writable() {
20
20
return 1
21
21
}
22
22
fi
23
-
23
+
24
24
# Make the file writable by all users
25
25
SUPER chmod 666 " ${user_sddm_theme} " || {
26
26
print_prompt -r " Failed to change permissions of ${user_sddm_theme} "
27
27
return 1
28
28
}
29
-
29
+
30
30
print_prompt -y " Made ${user_sddm_theme} writable by all users"
31
31
print_prompt -g " Successfully made ${user_sddm_theme} writable by user"
32
32
fi
@@ -165,10 +165,10 @@ sddm_unset() {
165
165
166
166
if [ -f " ${user_sddm_theme} " ]; then
167
167
# Check if the file is empty or has only whitespace
168
- if [ -s " ${user_sddm_theme} " ] && [ " $( tr -d ' [:space:]' < " ${user_sddm_theme} " | wc -c) " -ne 0 ]; then
168
+ if [ -s " ${user_sddm_theme} " ] && [ " $( tr -d ' [:space:]' < " ${user_sddm_theme} " | wc -c) " -ne 0 ]; then
169
169
# File exists and is not empty
170
- line_count=$( wc -l < " ${user_sddm_theme} " )
171
- : > " ${user_sddm_theme} "
170
+ line_count=$( wc -l < " ${user_sddm_theme} " )
171
+ : > " ${user_sddm_theme} "
172
172
print_prompt -g " [success] " " User's SDDM theme configuration has been cleared (${line_count} lines removed)"
173
173
else
174
174
# File exists but is already empty
@@ -182,11 +182,11 @@ sddm_unset() {
182
182
}
183
183
184
184
sddm_info () {
185
- output=$( find /etc/sddm.conf.d/ -type f -name " *.conf" -exec grep -H " Current" {} \; | tail -n 1)
186
- theme=$( awk -F ' :Current=' ' {print $2}' <<< ${output} )
185
+ output=$( find /etc/sddm.conf.d/ -type f -name " *.conf" -exec grep -H " Current" {} \; | sort | tail -n 1)
186
+ theme=$( awk -F ' :Current=' ' {print $2}' <<< " ${output}" )
187
187
cat << STAT
188
188
Current theme: ${theme}
189
- Theme directory: $( awk -F ' :Current=' ' {print $1}' <<< ${output} )
189
+ Theme directory: $( awk -F ' :Current=' ' {print $1}' <<< " ${output}" )
190
190
Available themes:
191
191
$( find " ${sddm_theme_dir} " -maxdepth 2 -name " theme.conf" -exec dirname {} \; | awk -F " ${sddm_theme_dir} /" ' {print $2}' )
192
192
0 commit comments