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

View File

@ -1,11 +0,0 @@
# ------------------------------------------------------
# Create .config folder
# ------------------------------------------------------
if [ -d ~/.config ]; then
echo ".config folder already exists."
else
mkdir ~/.config
echo ".config folder created."
fi
echo ""

View File

@ -7,7 +7,7 @@ figlet "Display Manager"
echo -e "${NONE}"
if [[ $profile == *"Hyprland"* ]]; then
echo "IMPORTANT: Starting Hyprland works from tty (terminal) with command Hyprland (recommended)."
echo "or you can try the display manager SDDM (> 0.20.0 already installed) or the latest git version (yay -S sddm-git)."
echo "or you can try the display manager SDDM (> 0.20.0 already installed) or the latest git version (yay -S sddm)."
echo "Please check: https://wiki.hyprland.org/hyprland-wiki/pages/Getting-Started/Master-Tutorial/#launching-hyprland"
echo "Login with other display managers could fail and could have negative side effects on some devices."
echo "If you have issues with SDDM or other display managers, you can deactivate the display manager"
@ -29,35 +29,39 @@ if [ ! -d ~/dotfiles ];then
if [ -f /etc/systemd/system/display-manager.service ]; then
disman=0
echo "You have already installed a display manager on your system."
echo "How do you want to proceed? (ESC = Keep current setup)"
dmsel=$(gum choose "Keep current setup" "Deactivate current display manager" "Install sddm-git")
echo "How do you want to proceed?"
dmsel=$(gum choose "Keep current setup" "Deactivate current display manager" "Install sddm")
else
disman=1
echo "There is no display manager installed on your system."
echo "After the installation/update of the dotfiles, you can start Hyprland with command Hyprland and Qtile with commmand Qtile (or startx)."
echo "How do you want to proceed? (ESC = Keep current setup)"
dmsel=$(gum choose "Keep current setup" "Install sddm-git")
echo "How do you want to proceed?"
dmsel=$(gum choose "Keep current setup" "Install sddm")
fi
else
if [ -f /etc/systemd/system/display-manager.service ]; then
disman=0
echo "You have already installed a display manager. If your display manager is working fine, you can keep the current setup."
echo "How do you want to proceed? (ESC = Keep current setup)"
dmsel=$(gum choose "Keep current setup" "Deactivate current display manager" "Install sddm-git")
echo "How do you want to proceed?"
dmsel=$(gum choose "Keep current setup" "Deactivate current display manager" "Install sddm")
else
disman=1
echo "There is no display manager installed on your system. You're starting Hyprland/Qtile with commands on tty."
echo "How do you want to proceed? (ESC = Keep current setup)"
dmsel=$(gum choose "Keep current setup" "Install sddm-git")
echo "How do you want to proceed?"
dmsel=$(gum choose "Keep current setup" "Install sddm")
fi
fi
if [ "$dmsel" == "Install sddm-git" ] ;then
if [ -z "${dmsel}" ] ;then
echo "Installation canceled."
exit
fi
if [ "$dmsel" == "Install sddm" ] ;then
disman=0
# Try to force the installation of sddm-git
echo "Install sddm-git"
yay -S --noconfirm sddm-git sddm-sugar-candy-git --ask 4
echo "Install sddm"
yay -S --noconfirm sddm sddm-sugar-candy-git --ask 4
if [ -f /etc/systemd/system/display-manager.service ]; then
sudo rm /etc/systemd/system/display-manager.service

View File

@ -1,9 +0,0 @@
# ------------------------------------------------------
# DONE
# ------------------------------------------------------
echo -e "${GREEN}"
figlet "Done"
echo -e "${NONE}"
echo "Please reboot your system!"
echo ""

View File

@ -1,61 +0,0 @@
# ------------------------------------------------------
# Select installation profile
# ------------------------------------------------------
echo -e "${GREEN}"
figlet "Hyprland"
echo -e "${NONE}"
hyprland_installed=0
hyprlandgit_installed=0
hyprland_package=""
echo "Hyprland is available in two different versions: "
echo "hyprland with the lastest official release "
echo "hyprland-git compiled from latest source."
echo
echo "Check for installed hyprland package..."
if [[ $(_isInstalledYay "hyprland-git") == 0 ]]; then
echo "hyprland-git already installed!"
hyprlandgit_installed=1
elif [[ $(_isInstalledPacman "hyprland") == 0 ]]; then
echo "hyprland already installed!"
hyprland_installed=1
else
echo "hyprland NOT installed!"
fi
echo
if [ $hyprland_installed == "1" ] ;then
echo "Hyprland is already installed with the package hyprland on your system. How do you want to proceed?"
echo "RETURN = confirm. ESC = Keep hyprland"
hyprsel=$(gum choose "KEEP hyprland" "Replace with hyprland-git")
if [ "$hyprsel" == "Replace with hyprland-git" ] ;then
echo "Replace hyprland with hyprland-git."
yay --noconfirm -R hyprland
_forcePackagesYay "hyprland-git";
else
echo "Keep current hyprland installation."
fi
elif [ $hyprlandgit_installed == "1" ] ;then
echo "Hyprland is already installed with the package hyprland-git on your system. How do you want to proceed?"
echo "RETURN = confirm. ESC = Keep hyprland-git"
hyprsel=$(gum choose "KEEP hyprland-git" "Replace with hyprland")
if [ "$hyprsel" == "Replace with hyprland" ] ;then
echo "Replace hyprland-git with hyprland."
yay --noconfirm -R hyprland-git
_forcePackagesYay "hyprland";
else
echo "Keep current hyprland installation."
fi
else
# No hyprland found on the system
echo "RETURN = confirm. No selection = CANCEL"
hypr_version=$(gum choose "hyprland" "hyprland-git")
if [ -z $hypr_version ] ;then
echo "No profile selected. Installation canceled."
exit
fi
if [ "$hypr_version" == "hyprland" ] ;then
_installPackagesYay "hyprland";
else
_installPackagesYay "hyprland-git";
fi
fi

View File

@ -1,3 +0,0 @@
echo -e "${GREEN}"
figlet "Hyprland"
echo -e "${NONE}"

View File

@ -1,10 +1,10 @@
if [[ "$force_install" == "1" ]] ;then
echo "Force installation of all packages..."
_forcePackagesPacman "${packagesPacman[@]}";
_forcePackagesYay "${packagesYay[@]}";
echo "Force installation of all packages..."
_forcePackagesPacman "${packagesPacman[@]}";
_forcePackagesYay "${packagesYay[@]}";
else
echo "Install only missing packages..."
_installPackagesPacman "${packagesPacman[@]}";
_installPackagesYay "${packagesYay[@]}";
echo "Install only missing packages..."
_installPackagesPacman "${packagesPacman[@]}";
_installPackagesYay "${packagesYay[@]}";
fi
echo ""
echo

View File

@ -1,27 +0,0 @@
# ------------------------------------------------------
# Monitor
# ------------------------------------------------------
if [[ $profile == *"Hyprland"* ]]; then
echo -e "${GREEN}"
figlet "Monitor"
echo -e "${NONE}"
if [ "$monitorrestored" == "1" ]; then
echo "Monitor settings could already be restored".
echo ""
else
echo "Hyprland will use the following monitor setup from ~/dotfiles/hypr/conf/monitors/default.conf"
echo "monitor=,preferred,auto,1"
echo ""
echo "You can create your own monitor configuration by adding a new variation file ~/dotfiles/hypr/conf/monitors/mymonitor.conf"
echo "Add there your monitor configuration."
echo ""
echo "After starting Hyprland, you can select your custom monitor variation with SUPER+CMD+S (or by clicking on the settings icon in WayBar)."
echo "Select Monitors and then your custom monitor variation: ~/dotfiles/hypr/conf/monitors/mymonitor.conf"
echo ""
echo "Or overwrite the path on ~/dotfiles/hypr/conf/monitor.conf and replace it with your custom variation."
echo ""
echo "More information on how to setup your monitor in the Hyprland Wiki: https://wiki.hyprland.org/Configuring/Monitors/"
echo ""
fi
fi

View File

@ -48,6 +48,7 @@ packagesPacman=(
"fuse2"
"gtk4"
"libadwaita"
"python-pywal"
);
packagesYay=(
@ -56,7 +57,3 @@ packagesYay=(
"trizen"
"pacseek"
);
# Removed packages
# "xfce4-power-manager"
# "ttf-font-awesome"

View File

@ -4,6 +4,13 @@
echo -e "${GREEN}"
figlet "Preparation"
echo -e "${NONE}"
if [ -d ~/.config ]; then
echo ".config folder already exists."
else
mkdir ~/.config
echo ".config folder created."
fi
echo
echo ":: Preparing temporary folders for the installation."
if [ ! -d ~/dotfiles-versions ]; then
mkdir ~/dotfiles-versions
@ -18,11 +25,11 @@ else
mkdir ~/dotfiles-versions/$version
echo ":: Clean build prepared for the installation."
fi
rsync -a -I --exclude-from=.install/excludes.txt . ~/dotfiles-versions/$version/
rsync -a -I --exclude-from=.install/includes/excludes.txt . ~/dotfiles-versions/$version/
if [[ $(_isFolderEmpty ~/dotfiles-versions/$version/) == 0 ]] ;then
echo "AN ERROR HAS OCCURED. Preparation of ~/dotfiles-versions/$version/ failed"
echo "Please check that rsync is installad on your system."
echo "Execution of rsync -a -I --exclude-from=.install/excludes.txt . ~/dotfiles-versions/$version/ is required."
echo "Execution of rsync -a -I --exclude-from=.install/includes/excludes.txt . ~/dotfiles-versions/$version/ is required."
exit
fi
echo ":: dotfiles $version successfully prepared in ~/dotfiles-versions/$version/"

View File

@ -1,14 +0,0 @@
# ------------------------------------------------------
# Install pywal
# ------------------------------------------------------
echo -e "${GREEN}"
figlet "Pywal"
echo -e "${NONE}"
if [ -f /usr/bin/wal ]; then
echo "pywal already installed. Trying to force the installation with python-pywal"
yay -S --noconfirm python-pywal --ask 4
else
yay -S --noconfirm python-pywal
echo "Pywal installed."
fi
echo ""

View File

@ -1,3 +0,0 @@
echo -e "${GREEN}"
figlet "Qtile"
echo -e "${NONE}"

View File

@ -43,7 +43,6 @@ _showRestoreOptions() {
if [ -f ~/dotfiles/hypr/conf/monitor.conf ] && [ -d ~/dotfiles/hypr/conf/monitors/ ]; then
restorelist+="~/dotfiles/hypr/conf/monitor.conf "
selectedlist+="~/dotfiles/hypr/conf/monitor.conf,"
monitorrestored=1
fi
if [ -f ~/dotfiles/hypr/conf/animation.conf ] && [ -d ~/dotfiles/hypr/conf/animations/ ]; then
restorelist+="~/dotfiles/hypr/conf/animation.conf "
@ -81,6 +80,10 @@ _showRestoreOptions() {
else
echo "No files selected to restore."
confirmrestore=$(gum choose "Change restore" "Cancel restore")
if [ -z "${confirmrestore}" ] ;then
echo "Installation canceled."
exit
fi
if [ "$confirmrestore" == "Change restore" ]; then
echo ""
_showRestoreOptions

View File

@ -4,11 +4,20 @@ echo -e "${GREEN}"
figlet "KVM VM"
echo -e "${NONE}"
echo "The script has detected that you run the installation in a KVM virtual machine."
if grep -Fxq "kvm.conf" ~/dotfiles-versions/$version/hypr/conf/environment.conf
then
echo ":: KVM Environment already set."
else
if gum confirm "Do you want to install the KVM environment variables?" ;then
echo "source = ~/dotfiles/hypr/conf/environments/kvm.conf" > ~/dotfiles-versions/$version/hypr/conf/environment.conf
echo "Environment set to KVM."
fi
fi
if [[ $(_isInstalledPacman "${pkg}") == 0 ]]; then
echo ":: Qemu Guest Agent already installed"
else
if gum confirm "Do you want to install the QEMU guest agent?" ;then
_installPackagesPacman "qemu-guest-agent";
fi
fi
fi

Binary file not shown.

View File

@ -1,2 +0,0 @@
name="Wallpaper"
order=1

View File

@ -1,4 +0,0 @@
#!/bin/bash
_getHeader "$name" "$author"
setsid $HOME/dotfiles/hypr/scripts/wallpaper.sh select 1>/dev/null 2>&1 &
_goBack

View File

@ -1,4 +0,0 @@
name="Background Image"
desxription="Update the background wallpaper of sddm to the current wallpaper."
order=50
author="Stephan Raabe ML4W"

View File

@ -1,30 +0,0 @@
#!/bin/bash
_getHeader "$name" "$author"
if gum confirm "Do you want to update the SDDM background image with the current wallpaper?" ;then
cache_file="$HOME/.cache/current_wallpaper"
if [ ! -d /etc/sddm.conf.d/ ]; then
sudo mkdir /etc/sddm.conf.d
echo "Folder /etc/sddm.conf.d created."
fi
sudo cp ~/dotfiles/sddm/sddm.conf /etc/sddm.conf.d/
echo "File /etc/sddm.conf.d/sddm.conf updated."
current_wallpaper=$(cat "$cache_file")
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 ~/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 ""
echo "SDDM background successfully updated!"
sleep 2
fi
_goBack

View File

@ -1,2 +0,0 @@
name="SDDM"
order=40

View File

@ -1,3 +0,0 @@
name="Enable Disable DM"
order=50
author="Stephan Raabe ML4W"

View File

@ -1,2 +0,0 @@
#!/bin/bash
_getHeader "$name"

View File

@ -1,7 +1,7 @@
#!/bin/bash
version=$(cat .version/name)
source .install/colors.sh
source .install/library.sh
source .install/includes/colors.sh
source .install/includes/library.sh
clear
# Set installation mode
@ -38,32 +38,33 @@ source .install/confirm-start.sh
source .install/yay.sh
source .install/backup.sh
source .install/preparation.sh
source .install/profile.sh
source .install/installer.sh
source .install/general.sh
source .install/general-packages.sh
source .install/packages/general-packages.sh
source .install/install-packages.sh
source .install/profile.sh
if [[ $profile == *"Hyprland"* ]]; then
source .install/hyprland.sh
source .install/hyprland-packages.sh
echo -e "${GREEN}"
figlet "Hyprland"
echo -e "${NONE}"
source .install/packages/hyprland-packages.sh
source .install/install-packages.sh
fi
if [[ $profile == *"Qtile"* ]]; then
source .install/qtile.sh
source .install/qtile-packages.sh
echo -e "${GREEN}"
figlet "Qtile"
echo -e "${NONE}"
source .install/packages/qtile-packages.sh
source .install/install-packages.sh
fi
source .install/pywal.sh
source .install/wallpaper.sh
source .install/displaymanager.sh
source .install/issue.sh
source .install/restore.sh
source .install/vm.sh
source .install/keyboard.sh
source .install/vm.sh
source .install/hook.sh
source .install/copy.sh
source .install/config-folder.sh
source .install/init-pywal.sh
if [[ $profile == *"Hyprland"* ]]; then
source .install/hyprland-dotfiles.sh
@ -73,6 +74,10 @@ if [[ $profile == *"Qtile"* ]]; then
fi
source .install/gtk.sh
source .install/bashrc.sh
source .install/monitor.sh
source .install/cleanup.sh
source .install/done.sh
echo -e "${GREEN}"
figlet "Done"
echo -e "${NONE}"
echo "Please reboot your system!"
echo

View File

@ -1,18 +1,11 @@
#!/bin/bash
_getHeader "$name" "$author"
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."
sleep 2
fi
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."
sleep 2
fi
echo "No display manager enabled."
fi
_goBack
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