fixed sddm custom theme installation

This commit is contained in:
JaKooLit 2023-10-14 00:26:36 +09:00
parent 1dd86e0a0f
commit 823b4e8d02
2 changed files with 41 additions and 3 deletions

View File

@ -90,7 +90,6 @@ sudo ninja -C build install
- [X] ~~Use kitty in favor of foot~~ - Dropped the idea of kitty. Kitty is using twice memory compared to foot. - [X] ~~Use kitty in favor of foot~~ - Dropped the idea of kitty. Kitty is using twice memory compared to foot.
### ❗ some known issues ### ❗ some known issues
- Currently SDDM theme that I have set is broken... currently investigating
- reports from members of my discord, states that some users of nvidia are getting stuck on sddm login. credit to @Kenni Fix stated was - reports from members of my discord, states that some users of nvidia are getting stuck on sddm login. credit to @Kenni Fix stated was
``` ```

View File

@ -4,10 +4,18 @@
# WARNING! If you remove packages here, dotfiles may not work properly. # WARNING! If you remove packages here, dotfiles may not work properly.
# and also, ensure that packages are present in debian repo # and also, ensure that packages are present in debian repo
login=( sddm1=(
sddm sddm
) )
sddm2=(
qml-module-qtgraphicaleffects
qml-module-qtquick-controls
qml-module-qtquick-controls2
qml-module-qtquick-extras
qml-module-qtquick-layouts
)
# Determine the directory where the script is located # Determine the directory where the script is located
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@ -30,8 +38,29 @@ LOG="install-$(date +%d-%H%M%S)_sddm.log"
set -e set -e
# Function for installing packages on Debian/Ubuntu
install_package() {
# Checking if package is already installed
if dpkg -l | grep -q -w "$1"; then
echo -e "${OK} $1 is already installed. Skipping..."
else
# Package not installed
echo -e "${NOTE} Installing $1 ..."
sudo apt-get install -y "$1" >> "$LOG" 2>&1
# Check if the package was installed successfully
if dpkg -l | grep -q -w "$1"; then
echo -e "\e[1A\e[K${OK} $1 was installed."
else
# Something is missing, exiting to review the log
echo -e "\e[1A\e[K${ERROR} $1 failed to install :( , please check the install.log. You may need to install manually! Sorry, I have tried :("
exit 1
fi
fi
}
# Install SDDM and Tokyo-Night theme # Install SDDM and Tokyo-Night theme
for PKG1 in "${login[@]}" ; do printf "\n%s - Installing sddm.... \n" "${NOTE}"
for PKG1 in "${sddm1[@]}" ; do
sudo apt-get install --no-install-recommends -y "$PKG1" 2>&1 | tee -a "$LOG" sudo apt-get install --no-install-recommends -y "$PKG1" 2>&1 | tee -a "$LOG"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo -e "\e[1A\e[K${ERROR} - $PKG1 install had failed, please check the install.log" echo -e "\e[1A\e[K${ERROR} - $PKG1 install had failed, please check the install.log"
@ -39,6 +68,16 @@ for PKG1 in "${login[@]}" ; do
fi fi
done done
# Installation of additional sddm stuff
printf "\n%s - Installing sddm additional stuff.... \n" "${NOTE}"
for PKG2 in "${sddm2[@]}"; do
install_package "$PKG2" 2>&1 | tee -a "$LOG"
if [ $? -ne 0 ]; then
echo -e "\e[1A\e[K${ERROR} - $PKG2 install had failed, please check the install.log"
exit 1
fi
done
# Check if other login managers are installed and disabling their service before enabling sddm # Check if other login managers are installed and disabling their service before enabling sddm
for login_manager in lightdm gdm lxdm lxdm-gtk3; do for login_manager in lightdm gdm lxdm lxdm-gtk3; do
if sudo apt-get list installed "$login_manager" &>> /dev/null; then if sudo apt-get list installed "$login_manager" &>> /dev/null; then