Commit 2.5.1

This commit is contained in:
Stephan Raabe 2023-11-17 13:48:02 +01:00
parent 1dbbe07adf
commit 308e1f70ec
48 changed files with 296 additions and 288 deletions

View File

@ -4,7 +4,7 @@
datets=$(date '+%Y%m%d%H%M%S') datets=$(date '+%Y%m%d%H%M%S')
if [ -d ~/dotfiles ] || [ -f ~/.bashrc ]; then if [ -d ~/dotfiles ] || [ -f ~/.bashrc ]; then
echo -e "${GREEN}"
cat <<"EOF" cat <<"EOF"
____ _ ____ _
| __ ) __ _ ___| | ___ _ _ __ | __ ) __ _ ___| | ___ _ _ __
@ -14,13 +14,17 @@ ____ _
|_| |_|
EOF EOF
echo -e "${NONE}"
if [ -d ~/dotfiles ]; then if [ -d ~/dotfiles ]; then
echo "The script has detected an existing dotfiles folder and will try to create a backup into the folder ~/dotfiles-versions/backups/$datets" echo "The script has detected an existing dotfiles folder and will try to create a backup into the folder:"
echo "~/dotfiles-versions/backups/$datets"
echo ""
fi fi
if [ -f ~/.bashrc ]; then if [ ! -L ~/.bashrc ] && [ -f ~/.bashrc ]; then
echo "The script has detected an existing .bashrc file and will try to create a backup ~/dotfiles-versions/backups/$datets/.bashrc-old" echo "The script has detected an existing .bashrc file and will try to create a backup to:"
echo "~/dotfiles-versions/backups/$datets/.bashrc-old"
echo ""
fi fi
echo ""
while true; do while true; do
read -p "Do you want to proceed? (Yy/Nn): " yn read -p "Do you want to proceed? (Yy/Nn): " yn
case $yn in case $yn in
@ -38,7 +42,7 @@ EOF
echo "~/dotfiles-versions/backups/$datets created" echo "~/dotfiles-versions/backups/$datets created"
fi fi
if [ -d ~/dotfiles ]; then if [ -d ~/dotfiles ]; then
cp -r ~/dotfiles ~/dotfiles-versions/backups/$datets rsync -a ~/dotfiles/ ~/dotfiles-versions/backups/$datets/
echo "Backup of your current dotfiles in ~/dotfiles-versions/backups/$datets created." echo "Backup of your current dotfiles in ~/dotfiles-versions/backups/$datets created."
fi fi
if [ -f ~/.bashrc ]; then if [ -f ~/.bashrc ]; then

View File

@ -1,6 +1,7 @@
# ------------------------------------------------------ # ------------------------------------------------------
# Install .bashrc # Install .bashrc
# ------------------------------------------------------ # ------------------------------------------------------
echo -e "${GREEN}"
cat <<"EOF" cat <<"EOF"
_ _ _ _
| |__ __ _ ___| |__ _ __ ___ | |__ __ _ ___| |__ _ __ ___
@ -9,17 +10,19 @@ cat <<"EOF"
(_)_.__/ \__,_|___/_| |_|_| \___| (_)_.__/ \__,_|___/_| |_|_| \___|
EOF EOF
echo -e "${NONE}"
while true; do while true; do
if [ -f ~/.bashrc ]; then if [ ! -L ~/.bashrc ] && [ -f ~/.bashrc ]; then
echo "The script has detected an existing .bashrc file. " echo "PLEASE NOTE AGAIN: The script has detected an existing .bashrc file."
fi fi
if [ -f ~/dotfiles-versions/backups/$datets/.bashrc-old ]; then if [ -f ~/dotfiles-versions/backups/$datets/.bashrc-old ]; then
echo "Backup is available here ~/dotfiles-versions/backups/$datets/.bashrc-old" echo "Backup is already available here ~/dotfiles-versions/backups/$datets/.bashrc-old"
fi fi
if [ -f ~/.bashrc ]; then if [ ! -L ~/.bashrc ] && [ -f ~/.bashrc ]; then
echo ""
echo "Do you want to replace your existing .bashrc file with the dotfiles .bashrc file?" echo "Do you want to replace your existing .bashrc file with the dotfiles .bashrc file?"
else else
echo ""
echo "Do you want to install the dotfiles .bashrc file now?" echo "Do you want to install the dotfiles .bashrc file now?"
fi fi
read -p "Please confirm (Yy/Nn): " yn read -p "Please confirm (Yy/Nn): " yn
@ -28,7 +31,7 @@ while true; do
_installSymLink .bashrc ~/.bashrc ~/dotfiles/.bashrc ~/.bashrc _installSymLink .bashrc ~/.bashrc ~/dotfiles/.bashrc ~/.bashrc
break;; break;;
[Nn]* ) [Nn]* )
echo "Installation skipped." echo "Installation of the .bashrc file skipped."
break;; break;;
* ) echo "Please answer yes or no.";; * ) echo "Please answer yes or no.";;
esac esac

6
.install/colors.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/bash
RED='\033[0;31m' #'0;31' is Red
GREEN='\033[0;32m' #'0;32' is Green
YELLOW='\033[1;32m' #'1;32' is Yellow
BLUE='\033[0;34m' #'0;34' is Blue
NONE='\033[0m' # NO COLOR

View File

@ -5,7 +5,6 @@
echo "IMPORTANT: Please make sure that your system and your packages are up to date." echo "IMPORTANT: Please make sure that your system and your packages are up to date."
echo "You can cancel the installation at any time with CMD + C" echo "You can cancel the installation at any time with CMD + C"
echo "" echo ""
SCRIPT=$(realpath "$0") SCRIPT=$(realpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT") SCRIPTPATH=$(dirname "$SCRIPT")
if [ $SCRIPTPATH = "/home/$USER/dotfiles" ]; then if [ $SCRIPTPATH = "/home/$USER/dotfiles" ]; then

View File

@ -1,6 +1,8 @@
# ------------------------------------------------------ # ------------------------------------------------------
# Copy dotfiles # Copy dotfiles
# ------------------------------------------------------ # ------------------------------------------------------
if [ ! -d ~/dotfiles ]; then
echo -e "${GREEN}"
cat <<"EOF" cat <<"EOF"
___ _ _ _ _ _ __ _ _ ___ _ _ _ _ _ __ _ _
|_ _|_ __ ___| |_ __ _| | | __| | ___ | |_ / _(_) | ___ ___ |_ _|_ __ ___| |_ __ _| | | __| | ___ | |_ / _(_) | ___ ___
@ -8,24 +10,54 @@ cat <<"EOF"
| || | | \__ \ || (_| | | | | (_| | (_) | |_| _| | | __/\__ \ | || | | \__ \ || (_| | | | | (_| | (_) | |_| _| | | __/\__ \
|___|_| |_|___/\__\__,_|_|_| \__,_|\___/ \__|_| |_|_|\___||___/ |___|_| |_|___/\__\__,_|_|_| \__,_|\___/ \__|_| |_|_|\___||___/
EOF
echo -e "${NONE}"
else
echo -e "${GREEN}"
cat <<"EOF"
_ _ _ _ _ _ __ _ _
| | | |_ __ __| | __ _| |_ ___ __| | ___ | |_ / _(_) | ___ ___
| | | | '_ \ / _` |/ _` | __/ _ \ / _` |/ _ \| __| |_| | |/ _ \/ __|
| |_| | |_) | (_| | (_| | || __/ | (_| | (_) | |_| _| | | __/\__ \
\___/| .__/ \__,_|\__,_|\__\___| \__,_|\___/ \__|_| |_|_|\___||___/
|_|
EOF EOF
echo -e "${NONE}"
fi
if [ ! -d ~/dotfiles ]; then
echo "The script will now remove existing directories and files from ~/.config/" echo "The script will now remove existing directories and files from ~/.config/"
echo "and copy your prepared configuration from ~/dotfiles-versions/$version to ~/dotfiles" echo "and copy your prepared configuration from ~/dotfiles-versions/$version to ~/dotfiles"
echo "Symbolic links will then be created from ~/dotfiles into your ~/.config/ directory."
echo "PLEASE BACKUP YOUR EXISTING CONFIGURATIONS IF NEEDED in .config"
echo "" echo ""
echo "Symbolic links will then be created from ~/dotfiles into your ~/.config/ directory."
echo ""
fi
if [[ ! $(tty) == *"pts"* ]] && [ -d ~/dotfiles ]; then
echo "You're running the script in tty. You can delete the existing ~/dotfiles folder now for a clean installation."
echo "If not, the script will overwrite existing files but will not remove additional files or folders of your custom configuration."
echo ""
else
if [ -d ~/dotfiles ]; then
echo "The script will overwrite existing files but will not remove additional files or folders of your custom configuration."
fi
fi
if [ ! -d ~/dotfiles ]; then
echo "PLEASE BACKUP YOUR EXISTING CONFIGURATIONS in .config IF NEEDED!"
echo ""
fi
while true; do while true; do
read -p "Do you want to install the dotfiles now? (Yy/Nn): " yn read -p "Do you want to install the prepared dotfiles now? (Yy/Nn): " yn
case $yn in case $yn in
[Yy]* ) [Yy]* )
if [ ! $mode == "dev" ]; then if [ ! $mode == "dev" ]; then
echo "Copy started" echo "Copy started"
if [ ! -d ~/dotfiles ]; then if [ ! -d ~/dotfiles ]; then
mkdir ~/dotfiles mkdir ~/dotfiles
echo "~/dotfiles folder created."
fi fi
cp -rf ~/dotfiles-versions/$version/. ~/dotfiles/ rsync -a ~/dotfiles-versions/$version/ ~/dotfiles/
echo "All files from ~/dotfiles-versions/$version/ to ~/dotfiles/ copied."
else else
echo "Skipped: DEV MODE!" echo "Skipped: DEV MODE!"
fi fi
@ -37,4 +69,3 @@ while true; do
esac esac
done done
echo "" echo ""

View File

@ -3,7 +3,7 @@
# ------------------------------------------------------ # ------------------------------------------------------
disman=0 disman=0
if [ -f /etc/systemd/system/display-manager.service ]; then if [ -f /etc/systemd/system/display-manager.service ]; then
echo -e "${GREEN}"
cat <<"EOF" cat <<"EOF"
___ _ _ ___ _ _
|_ _|_ __ ___ _ __ ___ _ __| |_ __ _ _ __ | |_ |_ _|_ __ ___ _ __ ___ _ __| |_ __ _ _ __ | |_
@ -13,7 +13,7 @@ cat <<"EOF"
|_| |_|
EOF EOF
echo -e "${NONE}"
echo "An active display manager has been dedected." echo "An active display manager has been dedected."
echo "" echo ""
if [ $profile == "Hyprland" ]; then if [ $profile == "Hyprland" ]; then

7
.install/excludes.txt Normal file
View File

@ -0,0 +1,7 @@
.gitignore
.git
.install
README.md
CHANGELOG
LICENSE
install.sh

View File

@ -20,4 +20,6 @@ if [ ! $mode == "dev" ]; then
_installSymLink gtk-4.0 ~/.config/gtk-4.0 ~/dotfiles/gtk/gtk-4.0/ ~/.config/ _installSymLink gtk-4.0 ~/.config/gtk-4.0 ~/dotfiles/gtk/gtk-4.0/ ~/.config/
else else
echo "Skipped: DEV MODE!" echo "Skipped: DEV MODE!"
fi fi
echo "Symbolic links created."
echo ""

View File

@ -32,7 +32,6 @@ packagesPacman=(
"polkit-gnome" "polkit-gnome"
"hyprland" "hyprland"
"xdg-desktop-portal" "xdg-desktop-portal"
"xdg-desktop-portal-wlr"
"xdg-desktop-portal-hyprland" "xdg-desktop-portal-hyprland"
"waybar" "waybar"
"grim" "grim"

View File

@ -1,3 +1,4 @@
echo -e "${GREEN}"
cat <<"EOF" cat <<"EOF"
_ _ _ _ _ _ _ _
| | | |_ _ _ __ _ __| | __ _ _ __ __| | | | | |_ _ _ __ _ __| | __ _ _ __ __| |
@ -7,3 +8,4 @@ cat <<"EOF"
|___/|_| |___/|_|
EOF EOF
echo -e "${NONE}"

View File

@ -2,7 +2,12 @@
# init pywal with default wallpaper # init pywal with default wallpaper
# ------------------------------------------------------ # ------------------------------------------------------
_installSymLink wal ~/.config/wal ~/dotfiles/wal/ ~/.config if [ ! -f ~/.cache/wal/colors-hyprland.conf ]; then
wal -i ~/dotfiles/wallpapers/default.jpg _installSymLink wal ~/.config/wal ~/dotfiles/wal/ ~/.config
echo "Pywal and templates initiated!" wal -i ~/dotfiles/wallpapers/default.jpg
echo "" echo "Pywal and templates activated."
echo ""
else
echo "Pywal already activated."
echo ""
fi

View File

@ -1,7 +1,7 @@
# ------------------------------------------------------ # ------------------------------------------------------
# Install required packages # Install required packages
# ------------------------------------------------------ # ------------------------------------------------------
echo -e "${GREEN}"
cat <<"EOF" cat <<"EOF"
___ _ _ _ _ ___ _ _ _ _
|_ _|_ __ ___| |_ __ _| | | _ __ __ _ ___| | ____ _ __ _ ___ ___ |_ _|_ __ ___| |_ __ _| | | _ __ __ _ ___| | ____ _ __ _ ___ ___
@ -11,7 +11,7 @@ cat <<"EOF"
|_| |___/ |_| |___/
EOF EOF
echo -e "${NONE}"
_installPackagesPacman "${packagesPacman[@]}"; _installPackagesPacman "${packagesPacman[@]}";
_installPackagesYay "${packagesYay[@]}"; _installPackagesYay "${packagesYay[@]}";
echo "" echo ""

View File

@ -3,6 +3,7 @@
# ------------------------------------------------------ # ------------------------------------------------------
if [ $disman == 1 ]; then if [ $disman == 1 ]; then
echo -e "${GREEN}"
cat <<"EOF" cat <<"EOF"
_____ _______ __ _ _ _____ _______ __ _ _
|_ _|_ _\ \ / / | | ___ __ _(_)_ __ |_ _|_ _\ \ / / | | ___ __ _(_)_ __
@ -12,6 +13,7 @@ cat <<"EOF"
|___/ |___/
EOF EOF
echo -e "${NONE}"
while true; do while true; do
read -p "Do you want to install the custom tty login issue (Yy/Nn): " yn read -p "Do you want to install the custom tty login issue (Yy/Nn): " yn
case $yn in case $yn in

View File

@ -1,7 +1,7 @@
# ------------------------------------------------------ # ------------------------------------------------------
# Prepare dotfiles # Prepare dotfiles
# ------------------------------------------------------ # ------------------------------------------------------
echo -e "${GREEN}"
cat <<"EOF" cat <<"EOF"
____ _ _ ____ _ _
| _ \ _ __ ___ _ __ __ _ _ __ __ _| |_(_) ___ _ __ | _ \ _ __ ___ _ __ __ _ _ __ __ _| |_(_) ___ _ __
@ -11,7 +11,7 @@ cat <<"EOF"
|_| |_|
EOF EOF
echo -e "${NONE}"
echo "Preparing temporary folders for the installation." echo "Preparing temporary folders for the installation."
echo "" echo ""
if [ ! -d ~/dotfiles-versions ]; then if [ ! -d ~/dotfiles-versions ]; then
@ -22,47 +22,13 @@ if [ ! -d ~/dotfiles-versions/$version ]; then
mkdir ~/dotfiles-versions/$version mkdir ~/dotfiles-versions/$version
echo "~/dotfiles-versions/$version folder created." echo "~/dotfiles-versions/$version folder created."
else else
echo "The folder ~/dotfiles-versions/$version already exists." echo "The folder ~/dotfiles-versions/$version already exists from previous installations."
echo "Do you want to create a clean build of version $version and " echo ""
while true; do rm -fr ~/dotfiles-versions/$version
read -p "and replace all files? (Yy/Nn): " yn mkdir ~/dotfiles-versions/$version
case $yn in echo "Clean build prepared for the installation."
[Yy]* )
rm -fr ~/dotfiles-versions/$version
mkdir ~/dotfiles-versions/$version
break;;
[Nn]* )
break;;
* ) echo "Please answer yes or no.";;
esac
done
echo "" echo ""
fi
cp -rf . ~/dotfiles-versions/$version/
if [ -d ~/dotfiles-versions/$version/.git ]; then
rm -rf ~/dotfiles-versions/$version/.git
fi fi
rsync -a --exclude-from=.install/excludes.txt . ~/dotfiles-versions/$version/
if [ -f ~/dotfiles-versions/$version/.gitignore ]; then
rm ~/dotfiles-versions/$version/.gitignore
fi
if [ -f ~/dotfiles-versions/$version/CHANGELOG ]; then
rm ~/dotfiles-versions/$version/CHANGELOG
fi
if [ -f ~/dotfiles-versions/$version/README.md ]; then
rm ~/dotfiles-versions/$version/README.md
fi
if [ -f ~/dotfiles-versions/$version/install.sh ]; then
rm ~/dotfiles-versions/$version/install.sh
fi
if [ -d ~/dotfiles-versions/$version/.install ]; then
rm -rf ~/dotfiles-versions/$version/.install
fi
echo "dotfiles $version successfully prepared in ~/dotfiles-versions/$version/" echo "dotfiles $version successfully prepared in ~/dotfiles-versions/$version/"
echo "" echo ""

View File

@ -1,6 +1,7 @@
# ------------------------------------------------------ # ------------------------------------------------------
# Select installation profile # Select installation profile
# ------------------------------------------------------ # ------------------------------------------------------
echo -e "${GREEN}"
cat <<"EOF" cat <<"EOF"
____ _ _ ____ __ _ _ ____ _ _ ____ __ _ _
| _ \ ___ ___| | _| |_ ___ _ __ | _ \ _ __ ___ / _(_) | ___ | _ \ ___ ___| | _| |_ ___ _ __ | _ \ _ __ ___ / _(_) | ___
@ -10,7 +11,7 @@ cat <<"EOF"
|_| |_|
EOF EOF
echo -e "${NONE}"
echo "Please select the Desktop Profile for your installation:" echo "Please select the Desktop Profile for your installation:"
echo "1 - Hyprland" echo "1 - Hyprland"
echo "2 - Qtile" echo "2 - Qtile"

View File

@ -1,17 +1,17 @@
# ------------------------------------------------------ # ------------------------------------------------------
# Install pywal # Install pywal
# ------------------------------------------------------ # ------------------------------------------------------
echo -e "${GREEN}"
cat <<"EOF" cat <<"EOF"
___ _ _ _ _ _
|_ _|_ __ ___| |_ __ _| | | _ __ _ ___ ____ _| | _ __ _ ___ ____ _| |
| || '_ \/ __| __/ _` | | | | '_ \| | | \ \ /\ / / _` | | | '_ \| | | \ \ /\ / / _` | |
| || | | \__ \ || (_| | | | | |_) | |_| |\ V V / (_| | | | |_) | |_| |\ V V / (_| | |
|___|_| |_|___/\__\__,_|_|_| | .__/ \__, | \_/\_/ \__,_|_| | .__/ \__, | \_/\_/ \__,_|_|
|_| |___/ |_| |___/
EOF EOF
echo -e "${NONE}"
if [ -f /usr/bin/wal ]; then if [ -f /usr/bin/wal ]; then
echo "pywal already installed." echo "pywal already installed."
else else

View File

@ -20,4 +20,6 @@ if [ ! $mode == "dev" ]; then
_installSymLink gtk-3.0 ~/.config/gtk-3.0 ~/dotfiles/gtk/gtk-3.0/ ~/.config/ _installSymLink gtk-3.0 ~/.config/gtk-3.0 ~/dotfiles/gtk/gtk-3.0/ ~/.config/
else else
echo "Skipped: DEV MODE!" echo "Skipped: DEV MODE!"
fi fi
echo "Symbolic links created."
echo ""

View File

@ -26,7 +26,6 @@ packagesPacman=(
"python-rich" "python-rich"
"python-click" "python-click"
"xdg-desktop-portal" "xdg-desktop-portal"
"xdg-desktop-portal-gtk"
"pavucontrol" "pavucontrol"
"tumbler" "tumbler"
"xautolock" "xautolock"

View File

@ -1,3 +1,4 @@
echo -e "${GREEN}"
cat <<"EOF" cat <<"EOF"
___ _ _ _ ___ _ _ _
/ _ \| |_(_) | ___ / _ \| |_(_) | ___
@ -6,3 +7,4 @@ cat <<"EOF"
\__\_\\__|_|_|\___| \__\_\\__|_|_|\___|
EOF EOF
echo -e "${NONE}"

View File

@ -3,6 +3,7 @@
# ------------------------------------------------------ # ------------------------------------------------------
if [ -d ~/dotfiles ]; then if [ -d ~/dotfiles ]; then
echo -e "${GREEN}"
cat <<"EOF" cat <<"EOF"
____ _ ____ _
| _ \ ___ ___| |_ ___ _ __ ___ | _ \ ___ ___| |_ ___ _ __ ___
@ -11,102 +12,68 @@ cat <<"EOF"
|_| \_\___||___/\__\___/|_| \___| |_| \_\___||___/\__\___/|_| \___|
EOF EOF
echo -e "${NONE}"
restored=0
echo "The script will try to restore existing configurations." echo "The script will try to restore existing configurations."
echo "PLEASE NOTE: Restoring is not possible with version < 2.5 of the dotfiles." echo "PLEASE NOTE: Restoring is not possible with version < 2.5 of the dotfiles."
echo "Keyboard layout can be defined manually in the next step." echo "In that case, please use the autamated backup or create your own backup manually."
echo "" echo ""
restored=0 echo "The following configurations can be transferred into the new installation."
if [ -f ~/dotfiles/.bashrc ]; then if [ -f ~/dotfiles/.bashrc ]; then
while true; do echo ".bashrc file: ~/dotfiles/.bashrc"
read -p "Found existing ~/dotfiles/.bashrc Restore? (Yy/Nn): " yn
case $yn in
[Yy]* )
cp ~/dotfiles/.bashrc ~/dotfiles-versions/$version/
echo "Restored!"
restored=1
break;;
[Nn]* )
break;;
* ) echo "Please answer yes or no.";;
esac
done
fi fi
if [ $profile == "Hyprland" ] || [ $profile == "All" ]; then if [ $profile == "Hyprland" ] || [ $profile == "All" ]; then
if [ -f ~/dotfiles/hypr/conf/keyboard.conf ]; then if [ -f ~/dotfiles/hypr/conf/keyboard.conf ]; then
while true; do echo "Hyprland keyboard layout: ~/dotfiles/hypr/conf/keyboard.conf"
read -p "Found existing ~/dotfiles/hypr/conf/keyboard.conf Restore? (Yy/Nn): " yn
case $yn in
[Yy]* )
cp ~/dotfiles/hypr/conf/keyboard.conf ~/dotfiles-versions/$version/hypr/conf/
echo "Restored!"
restored=1
break;;
[Nn]* )
break;;
* ) echo "Please answer yes or no.";;
esac
done
fi fi
fi
if [ $profile = "Hyprland" ] || [ $profile == "All" ]; then
if [ -f ~/dotfiles/hypr/conf/monitor.conf ]; then if [ -f ~/dotfiles/hypr/conf/monitor.conf ]; then
while true; do echo "Hyprland monitor setup: ~/dotfiles/hypr/conf/monitor.conf"
read -p "Found existing ~/dotfiles/hypr/conf/monitor.conf Restore? (Yy/Nn): " yn
case $yn in
[Yy]* )
cp ~/dotfiles/hypr/conf/monitor.conf ~/dotfiles-versions/$version/hypr/conf/
echo "Restored!"
restored=1
break;;
[Nn]* )
break;;
* ) echo "Please answer yes or no.";;
esac
done
fi fi
fi
if [ $profile == "Hyprland" ] || [ $profile == "All" ]; then
if [ -f ~/dotfiles/hypr/conf/keybindings.conf ]; then if [ -f ~/dotfiles/hypr/conf/keybindings.conf ]; then
while true; do echo "Hyprland keybindings: ~/dotfiles/hypr/conf/keybindings.conf"
read -p "Found existing ~/dotfiles/hypr/conf/keybindings.conf Restore? (Yy/Nn): " yn
case $yn in
[Yy]* )
cp ~/dotfiles/hypr/conf/keybindings.conf ~/dotfiles-versions/$version/hypr/conf/
echo "Restored!"
restored=1
break;;
[Nn]* )
break;;
* ) echo "Please answer yes or no.";;
esac
done
fi fi
fi fi
if [ $profile == "Qtile" ] || [ $profile == "All" ]; then if [ $profile == "Qtile" ] || [ $profile == "All" ]; then
if [ -f ~/dotfiles/qtile/conf/keyboard.py ]; then if [ -f ~/dotfiles/qtile/conf/keyboard.py ]; then
while true; do echo "Qtile keyboard layout: ~/dotfiles/qtile/conf/keyboard.py"
read -p "Found existing ~/dotfiles/qtile/conf/keyboard.py Restore? (Yy/Nn): " yn
case $yn in
[Yy]* )
cp ~/dotfiles/qtile/conf/keyboard.py ~/dotfiles-versions/$version/qtile/conf/
echo "Restored!"
restored=1
break;;
[Nn]* )
break;;
* ) echo "Please answer yes or no.";;
esac
done
fi fi
fi
if [ $restored == 0 ]; then
echo "Restore not possible."
fi fi
echo "" echo ""
while true; do
read -p "Do you want to restore the files now and use it on your new installation (Yy/Nn): " yn
case $yn in
[Yy]* )
if [ -f ~/dotfiles/.bashrc ]; then
cp ~/dotfiles/.bashrc ~/dotfiles-versions/$version/
echo ".bashrc restored!"
fi
if [ $profile == "Hyprland" ] || [ $profile == "All" ]; then
if [ -f ~/dotfiles/hypr/conf/keyboard.conf ]; then
cp ~/dotfiles/hypr/conf/keyboard.conf ~/dotfiles-versions/$version/hypr/conf/
echo "Hyprland keyboard.conf restored!"
fi
if [ -f ~/dotfiles/hypr/conf/monitor.conf ]; then
cp ~/dotfiles/hypr/conf/monitor.conf ~/dotfiles-versions/$version/hypr/conf/
echo "Hyprland monitor.conf restored!"
fi
if [ -f ~/dotfiles/hypr/conf/keybindings.conf ]; then
cp ~/dotfiles/hypr/conf/keybindings.conf ~/dotfiles-versions/$version/hypr/conf/
echo "Hyprland keybindings.conf restored!"
fi
fi
if [ $profile == "Qtile" ] || [ $profile == "All" ]; then
if [ -f ~/dotfiles/qtile/conf/keyboard.py ]; then
cp ~/dotfiles/qtile/conf/keyboard.py ~/dotfiles-versions/$version/qtile/conf/
echo "Qtile keyboard.py restored!"
fi
fi
restored=1
break;;
[Nn]* )
break;;
* ) echo "Please answer yes or no.";;
esac
done
echo ""
fi fi

6
.install/rsync.sh Normal file
View File

@ -0,0 +1,6 @@
# ------------------------------------------------------
# Check that rsync is installed
# ------------------------------------------------------
echo "Checking that rsync is installed..."
_installPackagesPacman "rsync";

View File

@ -1,7 +1,7 @@
# ------------------------------------------------------ # ------------------------------------------------------
# Setup # Setup
# ------------------------------------------------------ # ------------------------------------------------------
echo -e "${GREEN}"
cat <<"EOF" cat <<"EOF"
____ _ ____ _
/ ___| ___| |_ _ _ _ __ / ___| ___| |_ _ _ _ __
@ -11,25 +11,31 @@ cat <<"EOF"
|_| |_|
EOF EOF
echo "If you could restore your keyboard layout in the step before you can select Nn and skip." echo -e "${NONE}"
while true; do if [ "$restored" == "1" ]; then
read -p "Do you want to start the setup (Yy/Nn): " yn echo "You have already restored your settings into the new installation."
case $yn in else
[Yy]* ) while true; do
read -p "Enter your preferred keyboard layout (us,de,...) (default:us): " keyboard read -p "Do you want to set your keyboard layout? (Yy/Nn): " yn
if [ -z "$keyboard" ]; then case $yn in
keyboard="us" [Yy]* )
fi read -p "Enter your preferred keyboard layout (us,de,...) (default:us): " keyboard
SEARCH="kb_layout = us" if [ -z "$keyboard" ]; then
REPLACE="kb_layout = $keyboard" keyboard="us"
sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/hypr/conf/keyboard.conf fi
SEARCH="keyboard_layout = \"us\"" SEARCH="kb_layout = us"
REPLACE="keyboard_layout = \"$keyboard\"" REPLACE="kb_layout = $keyboard"
sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/qtile/conf/keyboard.py sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/hypr/conf/keyboard.conf
break;;
[Nn]* ) SEARCH="keyboard_layout = \"us\""
break;; REPLACE="keyboard_layout = \"$keyboard\""
* ) echo "Please answer yes or no.";; sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/qtile/conf/keyboard.py
esac break;;
done [Nn]* )
break;;
* ) echo "Please answer yes or no.";;
esac
done
fi
echo ""

1
.install/version.sh Normal file
View File

@ -0,0 +1 @@
version="2.5.1"

View File

@ -1,7 +1,7 @@
# ------------------------------------------------------ # ------------------------------------------------------
# Install wallpapers # Install wallpapers
# ------------------------------------------------------ # ------------------------------------------------------
echo -e "${GREEN}"
cat <<"EOF" cat <<"EOF"
__ __ _ _ __ __ _ _
\ \ / /_ _| | |_ __ __ _ _ __ ___ _ __ ___ \ \ / /_ _| | |_ __ __ _ _ __ ___ _ __ ___
@ -11,10 +11,13 @@ __ __ _ _
|_| |_| |_| |_|
EOF EOF
echo -e "${NONE}"
if [ ! -d ~/wallpaper ]; then
echo "Do you want to download the wallpapers from repository https://gitlab.com/stephan-raabe/wallpaper/ ?" echo "Do you want to download the wallpapers from repository https://gitlab.com/stephan-raabe/wallpaper/ ?"
echo "If not, the script will install 3 default wallpapers in ~/wallpaper/"
echo ""
while true; do while true; do
read -p "If not, the script will install 3 default wallpapers to ~/wallpaper/ (Yy/Nn): " yn read -p "Do you want to download the repository? (Yy/Nn): " yn
case $yn in case $yn in
[Yy]* ) [Yy]* )
wget -P ~/Downloads/ https://gitlab.com/stephan-raabe/wallpaper/-/archive/main/wallpaper-main.zip wget -P ~/Downloads/ https://gitlab.com/stephan-raabe/wallpaper/-/archive/main/wallpaper-main.zip
@ -23,7 +26,7 @@ while true; do
mkdir ~/wallpaper mkdir ~/wallpaper
fi fi
cp ~/Downloads/wallpaper-main/* ~/wallpaper/ cp ~/Downloads/wallpaper-main/* ~/wallpaper/
echo "Wallpapers installed successfully." echo "Wallpapers frpm the repository installed successfully."
break;; break;;
[Nn]* ) [Nn]* )
if [ -d ~/wallpaper/ ]; then if [ -d ~/wallpaper/ ]; then
@ -32,15 +35,21 @@ while true; do
mkdir ~/wallpaper mkdir ~/wallpaper
fi fi
cp wallpapers/* ~/wallpaper cp wallpapers/* ~/wallpaper
echo "Default wallpapers installed." echo "Default wallpapers installed successfully."
break;; break;;
* ) echo "Please answer yes or no.";; * ) echo "Please answer yes or no.";;
esac esac
done done
else
echo "~/wallpaper folder already exsits."
fi
echo "" echo ""
# ------------------------------------------------------ # ------------------------------------------------------
# Copy default wallpaper to .cache # Copy default wallpaper to .cache
# ------------------------------------------------------ # ------------------------------------------------------
if [ ! -f ~/.cache/current_wallpaper.jpg ]; then
cp wallpapers/default.jpg ~/.cache/current_wallpaper.jpg cp wallpapers/default.jpg ~/.cache/current_wallpaper.jpg
echo "Default wallpaper installed."
echo "" echo ""
fi

View File

@ -1,3 +1,11 @@
Version 2.5.1
https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.5.1
--------------------------------------------------------
Installation:
- Changed from cp to rsync to sync files between folders
- Stability improvements
- New default wallpapers
Version 2.5 Version 2.5
https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.5 https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.5
-------------------------------------------------------- --------------------------------------------------------

View File

@ -1,4 +1,4 @@
# ML4W dotfiles Version 2.5 # ML4W dotfiles Version 2.5.1
This is my configuration of Hyprland (Wayland) and Qtile (Xorg & Wayland). This is my configuration of Hyprland (Wayland) and Qtile (Xorg & Wayland).
This package includes an installation script to install and setup the required components. This package includes an installation script to install and setup the required components.
@ -94,7 +94,7 @@ cd dotfiles
``` ```
PLEASE NOTE: PLEASE NOTE:
In case you have issues with starting Waybar please make sure that only one xdg-desktop-portal-x is installed additionally to xdg-desktop-portal. In case you have issues with starting Waybar please make sure that only one xdg-desktop-portal-x is installed additionally to xdg-desktop-portal.
I had several issues with xdg-desktop-portal-wlr, Hyprland and Waybar. Please make sure that xdg-desktop-portal-wlr is uninstalled and xdg-desktop-portal-hyprland is installed. I had several issues with xdg-desktop-portal-wlr, Hyprland and Waybar. Please make sure that xdg-desktop-portal-wlr is uninstalled and xdg-desktop-portal-hyprland is installed.
More information you can find here: More information you can find here:

View File

@ -1,28 +0,0 @@
#!/bin/bash
# _ _ _
# | |__ _ _ _ __ _ __| | __ _ _ __ __| |
# | '_ \| | | | '_ \| '__| |/ _` | '_ \ / _` |
# _| | | | |_| | |_) | | | | (_| | | | | (_| |
# (_)_| |_|\__, | .__/|_| |_|\__,_|_| |_|\__,_|
# |___/|_|
#
# -----------------------------------------------------
# Overwrite hyprland configuration with hyprctl
# Individual scripts and settings possible
# Copy this file into your home directory
# -----------------------------------------------------
# -----------------------------------------------------
# Keyboard Layout
# -----------------------------------------------------
hyprctl keyword input:kb_layout de # to de
# hyprctl keyword input:kb_layout us # to us
# -----------------------------------------------------
# Monitor Setup
# See https://wiki.hyprland.org/Configuring/Monitors/
# -----------------------------------------------------
hyprctl keyword monitor ,2560x1440@120,auto,1
# hyprctl keyword monitor ,preferred,auto,1
notify-send ".hyprland.sh exists" "hyprctl commands executed"

1
hypr/conf/animation.conf Normal file
View File

@ -0,0 +1 @@
source = ~/dotfiles/hypr/conf/animations/animations-low.conf

View File

@ -5,6 +5,9 @@
# Setup XDG for screen sharing # Setup XDG for screen sharing
exec-once = ~/dotfiles/hypr/scripts/xdg.sh exec-once = ~/dotfiles/hypr/scripts/xdg.sh
# Start Polkit
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# Load Dunst Notification Manager # Load Dunst Notification Manager
exec-once = dunst exec-once = dunst

View File

@ -1,24 +1 @@
# ----------------------------------------------------- source = ~/dotfiles/hypr/conf/decorations/decoration.conf
# General window decoration
# -----------------------------------------------------
decoration {
rounding = 10
blur {
enabled = true
size = 6
passes = 2
new_optimizations = on
ignore_opacity = true
xray = true
# blurls = waybar
}
active_opacity = 1.0
inactive_opacity = 0.8
fullscreen_opacity = 1.0
drop_shadow = true
shadow_range = 30
shadow_render_power = 3
col.shadow = 0x66000000
}

View File

@ -0,0 +1,24 @@
# -----------------------------------------------------
# General window decoration
# -----------------------------------------------------
decoration {
rounding = 10
blur {
enabled = true
size = 6
passes = 2
new_optimizations = on
ignore_opacity = true
xray = true
# blurls = waybar
}
active_opacity = 1.0
inactive_opacity = 0.8
fullscreen_opacity = 1.0
drop_shadow = true
shadow_range = 30
shadow_render_power = 3
col.shadow = 0x66000000
}

View File

@ -2,8 +2,6 @@
# Environment Variables # Environment Variables
# ----------------------------------------------------- # -----------------------------------------------------
# Virtual Machines
# env = WLR_NO_HARDWARE_CURSORS, 1
# env = WLR_RENDERER_ALLOW_SOFTWARE, 1
env = XCURSOR_SIZE,24 env = XCURSOR_SIZE,24
env = QT_QPA_PLATFORM,wayland
env = GTK_THEME,Adwaita:dark env = GTK_THEME,Adwaita:dark

View File

@ -7,7 +7,7 @@ $mainMod = SUPER
bind = $mainMod, RETURN, exec, alacritty bind = $mainMod, RETURN, exec, alacritty
bind = $mainMod, Q, killactive bind = $mainMod, Q, killactive
bind = $mainMod, F, fullscreen bind = $mainMod, F, fullscreen
bind = $mainMod, E, exec, dolphin bind = $mainMod, E, exec, ~/dotfiles/scripts/filemanager.sh
bind = $mainMod, T, togglefloating bind = $mainMod, T, togglefloating
bind = $mainMod SHIFT, T, exec, ~/dotfiles/hypr/scripts/toggleallfloat.sh bind = $mainMod SHIFT, T, exec, ~/dotfiles/hypr/scripts/toggleallfloat.sh
bind = $mainMod, B, exec, chromium bind = $mainMod, B, exec, chromium

View File

@ -0,0 +1,6 @@
# -----------------------------------------------------
# Virtual Machine
# -----------------------------------------------------
env = WLR_NO_HARDWARE_CURSORS, 1
env = WLR_RENDERER_ALLOW_SOFTWARE, 1

View File

@ -1,12 +1 @@
# ----------------------------------------------------- source = ~/dotfiles/hypr/conf/windows/window.conf
# General window layout and colors
# -----------------------------------------------------
general {
gaps_in = 10
gaps_out = 14
border_size = 3
col.active_border = $color11
col.inactive_border = rgba(ffffffff)
layout = dwindle
}

View File

@ -0,0 +1,12 @@
# -----------------------------------------------------
# General window layout and colors
# -----------------------------------------------------
general {
gaps_in = 10
gaps_out = 14
border_size = 3
col.active_border = $color11
col.inactive_border = rgba(ffffffff)
layout = dwindle
}

View File

@ -9,16 +9,25 @@
# ----------------------------------------------------- # -----------------------------------------------------
# ----------------------------------------------------- # -----------------------------------------------------
# Keyboard & Monitor # Monitor
# ----------------------------------------------------- # -----------------------------------------------------
source = ~/dotfiles/hypr/conf/keyboard.conf
source = ~/dotfiles/hypr/conf/monitor.conf source = ~/dotfiles/hypr/conf/monitor.conf
# ----------------------------------------------------- # -----------------------------------------------------
# Autostart & Environment # Autostart
# -----------------------------------------------------
source = ~/dotfiles/hypr/conf/autostart.conf
# -----------------------------------------------------
# Environment
# ----------------------------------------------------- # -----------------------------------------------------
source = ~/dotfiles/hypr/conf/environment.conf source = ~/dotfiles/hypr/conf/environment.conf
source = ~/dotfiles/hypr/conf/autostart.conf # source = ~/dotfiles/hypr/conf/virtualmachine.conf
# -----------------------------------------------------
# Keyboard
# -----------------------------------------------------
source = ~/dotfiles/hypr/conf/keyboard.conf
# ----------------------------------------------------- # -----------------------------------------------------
# Load pywal color file # Load pywal color file
@ -38,10 +47,9 @@ source = ~/dotfiles/hypr/conf/windowrules.conf
# ----------------------------------------------------- # -----------------------------------------------------
# Animation # Animation
# ----------------------------------------------------- # -----------------------------------------------------
source = ~/dotfiles/hypr/conf/animations-low.conf source = ~/dotfiles/hypr/conf/animation.conf
# source = ~/dotfiles/hypr/conf/animations-high.conf
# ----------------------------------------------------- # -----------------------------------------------------
# Environment for xdg-desktop-portal-hyprland # Environment for xdg-desktop-portal-hyprland
# ----------------------------------------------------- # -----------------------------------------------------
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP

View File

@ -7,16 +7,21 @@
# #
# ----------------------------------------------------- # -----------------------------------------------------
sleep 1 sleep 1
# kill all possible running xdg-desktop-portals # kill all possible running xdg-desktop-portals
killall xdg-desktop-portal-hyprland killall xdg-desktop-portal-hyprland
killall xdg-desktop-portal-gnome killall xdg-desktop-portal-gnome
killall xdg-desktop-portal-kde killall xdg-desktop-portal-kde
killall xdg-desktop-portal-lxqt killall xdg-desktop-portal-lxqt
killall xdg-desktop-portal-wlr killall xdg-desktop-portal-wlr
killall xdg-desktop-portal-gtk
killall xdg-desktop-portal killall xdg-desktop-portal
sleep 1 sleep 1
# start xdg-desktop-portal-hyprland # start xdg-desktop-portal-hyprland
/usr/lib/xdg-desktop-portal-hyprland & /usr/lib/xdg-desktop-portal-hyprland &
sleep 2 sleep 2
# start xdg-desktop-portal # start xdg-desktop-portal
/usr/lib/xdg-desktop-portal & /usr/lib/xdg-desktop-portal &
sleep 1

View File

@ -1,4 +1,6 @@
#!/bin/bash #!/bin/bash
source .install/version.sh
source .install/colors.sh
clear clear
# Set installation mode # Set installation mode
@ -9,7 +11,7 @@ if [ ! -z $1 ]; then
echo "Existing dotfiles folder will not be modified." echo "Existing dotfiles folder will not be modified."
echo "Symbolic links will not be created." echo "Symbolic links will not be created."
fi fi
echo -e "${GREEN}"
cat <<"EOF" cat <<"EOF"
_ _ __ _ _ _ _ __ _ _
__| | ___ | |_ / _(_) | ___ ___ __| | ___ | |_ / _(_) | ___ ___
@ -18,7 +20,8 @@ cat <<"EOF"
\__,_|\___/ \__|_| |_|_|\___||___/ \__,_|\___/ \__|_| |_|_|\___||___/
EOF EOF
version="2.5" echo -e "${NONE}"
echo "Version: $version" echo "Version: $version"
echo "by Stephan Raabe 2023" echo "by Stephan Raabe 2023"
echo "" echo ""
@ -26,6 +29,7 @@ echo "This script will guide you through the installation process of my dotfiles
echo "" echo ""
source .install/library.sh source .install/library.sh
source .install/confirm-start.sh source .install/confirm-start.sh
source .install/rsync.sh
source .install/backup.sh source .install/backup.sh
source .install/preparation.sh source .install/preparation.sh
source .install/profile.sh source .install/profile.sh

View File

@ -1,12 +1 @@
#/bin/sh
# _____ _ _
# | ___(_) | ___ _ __ ___ __ _ _ __ __ _ __ _ ___ _ __
# | |_ | | |/ _ \ '_ ` _ \ / _` | '_ \ / _` |/ _` |/ _ \ '__|
# | _| | | | __/ | | | | | (_| | | | | (_| | (_| | __/ |
# |_| |_|_|\___|_| |_| |_|\__,_|_| |_|\__,_|\__, |\___|_|
# |___/
#
# by Stephan Raabe (2023)
# -----------------------------------------------------
thunar thunar

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 KiB

After

Width:  |  Height:  |  Size: 247 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 MiB

BIN
wallpapers/lake-sunrise.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 MiB

BIN
wallpapers/liquid1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

View File

@ -61,7 +61,7 @@
"format": " {}", "format": " {}",
"exec": "python ~/private/youtube.py", "exec": "python ~/private/youtube.py",
"restart-interval": 600, "restart-interval": 600,
"on-click": "brave https://studio.youtube.com", "on-click": "chromium https://studio.youtube.com",
"tooltip": false "tooltip": false
}, },
@ -118,7 +118,7 @@
// Outlook Launcher // Outlook Launcher
"custom/outlook": { "custom/outlook": {
"format": "", "format": "",
"on-click": "brave --app=https://outlook.office.com/mail/", "on-click": "chromium --app=https://outlook.office.com/mail/",
"tooltip": false "tooltip": false
}, },
@ -129,13 +129,6 @@
"tooltip": false "tooltip": false
}, },
// Brave Launcher
"custom/brave": {
"format": "",
"on-click": "brave",
"tooltip": false
},
// Browser Launcher // Browser Launcher
"custom/browser": { "custom/browser": {
"format": "", "format": "",
@ -146,7 +139,7 @@
// ChatGPT Launcher // ChatGPT Launcher
"custom/chatgpt": { "custom/chatgpt": {
"format": "", "format": "",
"on-click": "brave --app=https://chat.openai.com", "on-click": "chromium --app=https://chat.openai.com",
"tooltip": false "tooltip": false
}, },