ask user if thunar wants to be default. some formatting changes

This commit is contained in:
JaKooLit
2024-09-18 17:13:17 +09:00
parent f096714637
commit 0e876533c2
4 changed files with 20 additions and 3 deletions

View File

@@ -32,6 +32,20 @@ printf "${NOTE} Installing Thunar Packages...\n"
[ $? -ne 0 ] && { echo -e "\e[1A\e[K${ERROR} - $THUNAR Package installation failed, Please check the installation logs"; exit 1; }
done
printf "\n%.0s" {1..2}
# Ask the user if they want to use Thunar as the default file manager
read -p "${CAT} Do you want to set Thunar as the default file manager? (y/n): " choice
if [[ "$choice" == [Yy] ]]; then
# Setting Thunar as the default file manager
xdg-mime default thunar.desktop inode/directory
xdg-mime default thunar.desktop application/x-wayland-gnome-saved-search
echo "${OK} Thunar has been set as the default file manager." 2>&1 | tee -a "$LOG"
else
echo "${NOTE} you choose not to set Thunar file manager." 2>&1 | tee -a "$LOG"
fi
# Check for existing configs and copy if does not exist
for DIR1 in gtk-3.0 Thunar xfce4; do
DIRPATH=~/.config/$DIR1