This commit is contained in:
Stephan Raabe
2024-02-19 18:14:24 +01:00
parent b67525df47
commit cc5a6e7d4c
30 changed files with 92 additions and 236 deletions

11
sddm/scripts/disable.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
figlet "Disable SDDM"
if [ -f /etc/systemd/system/display-manager.service ]; then
if gum confirm "Do you want to disable the current display manager?" ;then
sudo rm /etc/systemd/system/display-manager.service
echo "Current display manager removed. Please reboot your system."
fi
else
echo "No display manager enabled."
fi
sleep 3

11
sddm/scripts/enable.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
figlet "Enable SDDM"
if [ -f /etc/systemd/system/display-manager.service ]; then
echo "Display Manager is already enabled."
else
if gum confirm "Do you want to enable SDDM as your display manager?" ;then
sudo systemctl enable sddm.service
echo "Display manager SDDM has been enabled. Please reboot your system."
fi
fi
sleep 3

View File

@@ -6,13 +6,15 @@
# \___/| .__/ \__,_|\__,_|\__\___| |___/\__,_|\__,_|_| |_| |_|
# |_|
#
# by Stephan Raabe (2023)
# by Stephan Raabe (2024)
# -----------------------------------------------------
cache_file="$HOME/.cache/current_wallpaper"
sleep 1
clear
echo "Update the background wallpaper of sddm to the current wallpaper."
echo ""
figlet "Set SDDM Wallpaper"
echo
echo "Set the current wallpaper as SDDM wallpaper."
echo
if [ ! -d /etc/sddm.conf.d/ ]; then
sudo mkdir /etc/sddm.conf.d
echo "Folder /etc/sddm.conf.d created."
@@ -27,10 +29,10 @@ extension="${current_wallpaper##*.}"
sudo cp $current_wallpaper /usr/share/sddm/themes/sugar-candy/Backgrounds/current_wallpaper.$extension
echo "Current wallpaper copied into /usr/share/sddm/themes/sugar-candy/Backgrounds/"
new_wall=$(echo $current_wallpaper | sed "s|$HOME/wallpaper/||g")
sudo cp theme.conf /usr/share/sddm/themes/sugar-candy/
sudo cp $HOME/dotfiles/sddm/theme.conf /usr/share/sddm/themes/sugar-candy/
sudo sed -i 's/CURRENTWALLPAPER/'"current_wallpaper.$extension"'/' /usr/share/sddm/themes/sugar-candy/theme.conf
echo "File theme.conf updated in /usr/share/sddm/themes/sugar-candy/"
echo ""
echo "DONE! Please logout to test sddm."
sleep 3