diff --git a/.install/backup.sh b/.install/backup.sh index 544333c..6b1a991 100755 --- a/.install/backup.sh +++ b/.install/backup.sh @@ -4,7 +4,7 @@ datets=$(date '+%Y%m%d%H%M%S') if [ -d ~/dotfiles ] || [ -f ~/.bashrc ]; then - +echo -e "${GREEN}" cat <<"EOF" ____ _ | __ ) __ _ ___| | ___ _ _ __ @@ -14,13 +14,17 @@ ____ _ |_| EOF +echo -e "${NONE}" 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 - if [ -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" + if [ ! -L ~/.bashrc ] && [ -f ~/.bashrc ]; then + 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 - echo "" while true; do read -p "Do you want to proceed? (Yy/Nn): " yn case $yn in @@ -38,7 +42,7 @@ EOF echo "~/dotfiles-versions/backups/$datets created" fi 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." fi if [ -f ~/.bashrc ]; then diff --git a/.install/bashrc.sh b/.install/bashrc.sh index 2273e46..1bffd22 100644 --- a/.install/bashrc.sh +++ b/.install/bashrc.sh @@ -1,6 +1,7 @@ # ------------------------------------------------------ # Install .bashrc # ------------------------------------------------------ +echo -e "${GREEN}" cat <<"EOF" _ _ | |__ __ _ ___| |__ _ __ ___ @@ -9,17 +10,19 @@ cat <<"EOF" (_)_.__/ \__,_|___/_| |_|_| \___| EOF - +echo -e "${NONE}" while true; do - if [ -f ~/.bashrc ]; then - echo "The script has detected an existing .bashrc file. " + if [ ! -L ~/.bashrc ] && [ -f ~/.bashrc ]; then + echo "PLEASE NOTE AGAIN: The script has detected an existing .bashrc file." fi 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 - 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?" else + echo "" echo "Do you want to install the dotfiles .bashrc file now?" fi read -p "Please confirm (Yy/Nn): " yn @@ -28,7 +31,7 @@ while true; do _installSymLink .bashrc ~/.bashrc ~/dotfiles/.bashrc ~/.bashrc break;; [Nn]* ) - echo "Installation skipped." + echo "Installation of the .bashrc file skipped." break;; * ) echo "Please answer yes or no.";; esac diff --git a/.install/colors.sh b/.install/colors.sh new file mode 100644 index 0000000..f84f878 --- /dev/null +++ b/.install/colors.sh @@ -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 \ No newline at end of file diff --git a/.install/confirm-start.sh b/.install/confirm-start.sh index 6674fa4..5cf50a4 100644 --- a/.install/confirm-start.sh +++ b/.install/confirm-start.sh @@ -5,7 +5,6 @@ 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 "" - SCRIPT=$(realpath "$0") SCRIPTPATH=$(dirname "$SCRIPT") if [ $SCRIPTPATH = "/home/$USER/dotfiles" ]; then diff --git a/.install/copy.sh b/.install/copy.sh index 20ff2c6..91f605e 100644 --- a/.install/copy.sh +++ b/.install/copy.sh @@ -1,6 +1,8 @@ # ------------------------------------------------------ # Copy dotfiles # ------------------------------------------------------ +if [ ! -d ~/dotfiles ]; then +echo -e "${GREEN}" cat <<"EOF" ___ _ _ _ _ _ __ _ _ |_ _|_ __ ___| |_ __ _| | | __| | ___ | |_ / _(_) | ___ ___ @@ -8,24 +10,54 @@ cat <<"EOF" | || | | \__ \ || (_| | | | | (_| | (_) | |_| _| | | __/\__ \ |___|_| |_|___/\__\__,_|_|_| \__,_|\___/ \__|_| |_|_|\___||___/ +EOF +echo -e "${NONE}" +else +echo -e "${GREEN}" +cat <<"EOF" + _ _ _ _ _ _ __ _ _ +| | | |_ __ __| | __ _| |_ ___ __| | ___ | |_ / _(_) | ___ ___ +| | | | '_ \ / _` |/ _` | __/ _ \ / _` |/ _ \| __| |_| | |/ _ \/ __| +| |_| | |_) | (_| | (_| | || __/ | (_| | (_) | |_| _| | | __/\__ \ + \___/| .__/ \__,_|\__,_|\__\___| \__,_|\___/ \__|_| |_|_|\___||___/ + |_| EOF +echo -e "${NONE}" +fi +if [ ! -d ~/dotfiles ]; then 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 "Symbolic links will then be created from ~/dotfiles into your ~/.config/ directory." -echo "PLEASE BACKUP YOUR EXISTING CONFIGURATIONS IF NEEDED in .config" 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 - 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 [Yy]* ) if [ ! $mode == "dev" ]; then echo "Copy started" if [ ! -d ~/dotfiles ]; then mkdir ~/dotfiles + echo "~/dotfiles folder created." fi - cp -rf ~/dotfiles-versions/$version/. ~/dotfiles/ + rsync -a ~/dotfiles-versions/$version/ ~/dotfiles/ + echo "All files from ~/dotfiles-versions/$version/ to ~/dotfiles/ copied." else echo "Skipped: DEV MODE!" fi @@ -37,4 +69,3 @@ while true; do esac done echo "" - diff --git a/.install/disabledm.sh b/.install/disabledm.sh index a852793..5fc037c 100644 --- a/.install/disabledm.sh +++ b/.install/disabledm.sh @@ -3,7 +3,7 @@ # ------------------------------------------------------ disman=0 if [ -f /etc/systemd/system/display-manager.service ]; then - +echo -e "${GREEN}" cat <<"EOF" ___ _ _ |_ _|_ __ ___ _ __ ___ _ __| |_ __ _ _ __ | |_ @@ -13,7 +13,7 @@ cat <<"EOF" |_| EOF - +echo -e "${NONE}" echo "An active display manager has been dedected." echo "" if [ $profile == "Hyprland" ]; then diff --git a/.install/excludes.txt b/.install/excludes.txt new file mode 100644 index 0000000..6dd961b --- /dev/null +++ b/.install/excludes.txt @@ -0,0 +1,7 @@ +.gitignore +.git +.install +README.md +CHANGELOG +LICENSE +install.sh \ No newline at end of file diff --git a/.install/hyprland-dotfiles.sh b/.install/hyprland-dotfiles.sh index b20e834..dbfddb0 100644 --- a/.install/hyprland-dotfiles.sh +++ b/.install/hyprland-dotfiles.sh @@ -20,4 +20,6 @@ if [ ! $mode == "dev" ]; then _installSymLink gtk-4.0 ~/.config/gtk-4.0 ~/dotfiles/gtk/gtk-4.0/ ~/.config/ else echo "Skipped: DEV MODE!" -fi \ No newline at end of file +fi +echo "Symbolic links created." +echo "" \ No newline at end of file diff --git a/.install/hyprland-packages.sh b/.install/hyprland-packages.sh index 3edb684..c8c8c3e 100644 --- a/.install/hyprland-packages.sh +++ b/.install/hyprland-packages.sh @@ -32,7 +32,6 @@ packagesPacman=( "polkit-gnome" "hyprland" "xdg-desktop-portal" - "xdg-desktop-portal-wlr" "xdg-desktop-portal-hyprland" "waybar" "grim" diff --git a/.install/hyprland.sh b/.install/hyprland.sh index 5a3ae73..93e56b1 100644 --- a/.install/hyprland.sh +++ b/.install/hyprland.sh @@ -1,3 +1,4 @@ +echo -e "${GREEN}" cat <<"EOF" _ _ _ _ | | | |_ _ _ __ _ __| | __ _ _ __ __| | @@ -7,3 +8,4 @@ cat <<"EOF" |___/|_| EOF +echo -e "${NONE}" \ No newline at end of file diff --git a/.install/init-pywal.sh b/.install/init-pywal.sh index 6539eba..0c8e9a2 100644 --- a/.install/init-pywal.sh +++ b/.install/init-pywal.sh @@ -2,7 +2,12 @@ # init pywal with default wallpaper # ------------------------------------------------------ -_installSymLink wal ~/.config/wal ~/dotfiles/wal/ ~/.config -wal -i ~/dotfiles/wallpapers/default.jpg -echo "Pywal and templates initiated!" -echo "" +if [ ! -f ~/.cache/wal/colors-hyprland.conf ]; then + _installSymLink wal ~/.config/wal ~/dotfiles/wal/ ~/.config + wal -i ~/dotfiles/wallpapers/default.jpg + echo "Pywal and templates activated." + echo "" +else + echo "Pywal already activated." + echo "" +fi \ No newline at end of file diff --git a/.install/install-packages.sh b/.install/install-packages.sh index 0c4a55e..cc91b60 100644 --- a/.install/install-packages.sh +++ b/.install/install-packages.sh @@ -1,7 +1,7 @@ # ------------------------------------------------------ # Install required packages # ------------------------------------------------------ - +echo -e "${GREEN}" cat <<"EOF" ___ _ _ _ _ |_ _|_ __ ___| |_ __ _| | | _ __ __ _ ___| | ____ _ __ _ ___ ___ @@ -11,7 +11,7 @@ cat <<"EOF" |_| |___/ EOF - +echo -e "${NONE}" _installPackagesPacman "${packagesPacman[@]}"; _installPackagesYay "${packagesYay[@]}"; echo "" \ No newline at end of file diff --git a/.install/issue.sh b/.install/issue.sh index 65f7d70..c591699 100644 --- a/.install/issue.sh +++ b/.install/issue.sh @@ -3,6 +3,7 @@ # ------------------------------------------------------ if [ $disman == 1 ]; then +echo -e "${GREEN}" cat <<"EOF" _____ _______ __ _ _ |_ _|_ _\ \ / / | | ___ __ _(_)_ __ @@ -12,6 +13,7 @@ cat <<"EOF" |___/ EOF +echo -e "${NONE}" while true; do read -p "Do you want to install the custom tty login issue (Yy/Nn): " yn case $yn in diff --git a/.install/preparation.sh b/.install/preparation.sh index 742ce94..229ad02 100644 --- a/.install/preparation.sh +++ b/.install/preparation.sh @@ -1,7 +1,7 @@ # ------------------------------------------------------ # Prepare dotfiles # ------------------------------------------------------ - +echo -e "${GREEN}" cat <<"EOF" ____ _ _ | _ \ _ __ ___ _ __ __ _ _ __ __ _| |_(_) ___ _ __ @@ -11,7 +11,7 @@ cat <<"EOF" |_| EOF - +echo -e "${NONE}" echo "Preparing temporary folders for the installation." echo "" if [ ! -d ~/dotfiles-versions ]; then @@ -22,47 +22,13 @@ if [ ! -d ~/dotfiles-versions/$version ]; then mkdir ~/dotfiles-versions/$version echo "~/dotfiles-versions/$version folder created." else - echo "The folder ~/dotfiles-versions/$version already exists." - echo "Do you want to create a clean build of version $version and " - while true; do - read -p "and replace all files? (Yy/Nn): " yn - case $yn in - [Yy]* ) - rm -fr ~/dotfiles-versions/$version - mkdir ~/dotfiles-versions/$version - break;; - [Nn]* ) - break;; - * ) echo "Please answer yes or no.";; - esac - done + echo "The folder ~/dotfiles-versions/$version already exists from previous installations." + echo "" + rm -fr ~/dotfiles-versions/$version + mkdir ~/dotfiles-versions/$version + echo "Clean build prepared for the installation." echo "" -fi -cp -rf . ~/dotfiles-versions/$version/ - -if [ -d ~/dotfiles-versions/$version/.git ]; then - rm -rf ~/dotfiles-versions/$version/.git fi - -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 - +rsync -a --exclude-from=.install/excludes.txt . ~/dotfiles-versions/$version/ echo "dotfiles $version successfully prepared in ~/dotfiles-versions/$version/" echo "" diff --git a/.install/profile.sh b/.install/profile.sh index edf0961..7e82a64 100644 --- a/.install/profile.sh +++ b/.install/profile.sh @@ -1,6 +1,7 @@ # ------------------------------------------------------ # Select installation profile # ------------------------------------------------------ +echo -e "${GREEN}" cat <<"EOF" ____ _ _ ____ __ _ _ | _ \ ___ ___| | _| |_ ___ _ __ | _ \ _ __ ___ / _(_) | ___ @@ -10,7 +11,7 @@ cat <<"EOF" |_| EOF - +echo -e "${NONE}" echo "Please select the Desktop Profile for your installation:" echo "1 - Hyprland" echo "2 - Qtile" diff --git a/.install/pywal.sh b/.install/pywal.sh index 275205e..10ade8f 100644 --- a/.install/pywal.sh +++ b/.install/pywal.sh @@ -1,17 +1,17 @@ # ------------------------------------------------------ # Install pywal # ------------------------------------------------------ - +echo -e "${GREEN}" cat <<"EOF" - ___ _ _ _ _ -|_ _|_ __ ___| |_ __ _| | | _ __ _ ___ ____ _| | - | || '_ \/ __| __/ _` | | | | '_ \| | | \ \ /\ / / _` | | - | || | | \__ \ || (_| | | | | |_) | |_| |\ V V / (_| | | -|___|_| |_|___/\__\__,_|_|_| | .__/ \__, | \_/\_/ \__,_|_| - |_| |___/ + _ + _ __ _ ___ ____ _| | +| '_ \| | | \ \ /\ / / _` | | +| |_) | |_| |\ V V / (_| | | +| .__/ \__, | \_/\_/ \__,_|_| +|_| |___/ EOF - +echo -e "${NONE}" if [ -f /usr/bin/wal ]; then echo "pywal already installed." else diff --git a/.install/qtile-dotfiles.sh b/.install/qtile-dotfiles.sh index 3c118a3..bf70046 100644 --- a/.install/qtile-dotfiles.sh +++ b/.install/qtile-dotfiles.sh @@ -20,4 +20,6 @@ if [ ! $mode == "dev" ]; then _installSymLink gtk-3.0 ~/.config/gtk-3.0 ~/dotfiles/gtk/gtk-3.0/ ~/.config/ else echo "Skipped: DEV MODE!" -fi \ No newline at end of file +fi +echo "Symbolic links created." +echo "" \ No newline at end of file diff --git a/.install/qtile-packages.sh b/.install/qtile-packages.sh index db09d4c..60f8dc0 100644 --- a/.install/qtile-packages.sh +++ b/.install/qtile-packages.sh @@ -26,7 +26,6 @@ packagesPacman=( "python-rich" "python-click" "xdg-desktop-portal" - "xdg-desktop-portal-gtk" "pavucontrol" "tumbler" "xautolock" diff --git a/.install/qtile.sh b/.install/qtile.sh index 05eabd4..8bb4328 100644 --- a/.install/qtile.sh +++ b/.install/qtile.sh @@ -1,3 +1,4 @@ +echo -e "${GREEN}" cat <<"EOF" ___ _ _ _ / _ \| |_(_) | ___ @@ -6,3 +7,4 @@ cat <<"EOF" \__\_\\__|_|_|\___| EOF +echo -e "${NONE}" \ No newline at end of file diff --git a/.install/restore.sh b/.install/restore.sh index 3cc0554..846b46a 100644 --- a/.install/restore.sh +++ b/.install/restore.sh @@ -3,6 +3,7 @@ # ------------------------------------------------------ if [ -d ~/dotfiles ]; then +echo -e "${GREEN}" cat <<"EOF" ____ _ | _ \ ___ ___| |_ ___ _ __ ___ @@ -11,102 +12,68 @@ cat <<"EOF" |_| \_\___||___/\__\___/|_| \___| EOF - +echo -e "${NONE}" + restored=0 echo "The script will try to restore existing configurations." 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 "" - restored=0 - + echo "The following configurations can be transferred into the new installation." if [ -f ~/dotfiles/.bashrc ]; then - while true; do - 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 + echo ".bashrc file: ~/dotfiles/.bashrc" fi - if [ $profile == "Hyprland" ] || [ $profile == "All" ]; then if [ -f ~/dotfiles/hypr/conf/keyboard.conf ]; then - while true; do - 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 + echo "Hyprland keyboard layout: ~/dotfiles/hypr/conf/keyboard.conf" fi - fi - - if [ $profile = "Hyprland" ] || [ $profile == "All" ]; then if [ -f ~/dotfiles/hypr/conf/monitor.conf ]; then - while true; do - 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 + echo "Hyprland monitor setup: ~/dotfiles/hypr/conf/monitor.conf" fi - fi - - if [ $profile == "Hyprland" ] || [ $profile == "All" ]; then if [ -f ~/dotfiles/hypr/conf/keybindings.conf ]; then - while true; do - 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 + echo "Hyprland keybindings: ~/dotfiles/hypr/conf/keybindings.conf" fi fi - if [ $profile == "Qtile" ] || [ $profile == "All" ]; then if [ -f ~/dotfiles/qtile/conf/keyboard.py ]; then - while true; do - 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 + echo "Qtile keyboard layout: ~/dotfiles/qtile/conf/keyboard.py" fi - fi - if [ $restored == 0 ]; then - echo "Restore not possible." fi 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 \ No newline at end of file diff --git a/.install/rsync.sh b/.install/rsync.sh new file mode 100644 index 0000000..e4c3584 --- /dev/null +++ b/.install/rsync.sh @@ -0,0 +1,6 @@ +# ------------------------------------------------------ +# Check that rsync is installed +# ------------------------------------------------------ + +echo "Checking that rsync is installed..." +_installPackagesPacman "rsync"; \ No newline at end of file diff --git a/.install/setup.sh b/.install/setup.sh index 698167f..8e49884 100644 --- a/.install/setup.sh +++ b/.install/setup.sh @@ -1,7 +1,7 @@ # ------------------------------------------------------ # Setup # ------------------------------------------------------ - +echo -e "${GREEN}" cat <<"EOF" ____ _ / ___| ___| |_ _ _ _ __ @@ -11,25 +11,31 @@ cat <<"EOF" |_| EOF -echo "If you could restore your keyboard layout in the step before you can select Nn and skip." -while true; do - read -p "Do you want to start the setup (Yy/Nn): " yn - case $yn in - [Yy]* ) - read -p "Enter your preferred keyboard layout (us,de,...) (default:us): " keyboard - if [ -z "$keyboard" ]; then - keyboard="us" - fi - SEARCH="kb_layout = us" - REPLACE="kb_layout = $keyboard" - sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/hypr/conf/keyboard.conf +echo -e "${NONE}" +if [ "$restored" == "1" ]; then + echo "You have already restored your settings into the new installation." +else + while true; do + read -p "Do you want to set your keyboard layout? (Yy/Nn): " yn + case $yn in + [Yy]* ) + read -p "Enter your preferred keyboard layout (us,de,...) (default:us): " keyboard + if [ -z "$keyboard" ]; then + keyboard="us" + fi - SEARCH="keyboard_layout = \"us\"" - REPLACE="keyboard_layout = \"$keyboard\"" - sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/qtile/conf/keyboard.py - break;; - [Nn]* ) - break;; - * ) echo "Please answer yes or no.";; - esac -done + SEARCH="kb_layout = us" + REPLACE="kb_layout = $keyboard" + sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/hypr/conf/keyboard.conf + + SEARCH="keyboard_layout = \"us\"" + REPLACE="keyboard_layout = \"$keyboard\"" + sed -i "s/$SEARCH/$REPLACE/g" ~/dotfiles-versions/$version/qtile/conf/keyboard.py + break;; + [Nn]* ) + break;; + * ) echo "Please answer yes or no.";; + esac + done +fi +echo "" diff --git a/.install/version.sh b/.install/version.sh new file mode 100644 index 0000000..81e87a6 --- /dev/null +++ b/.install/version.sh @@ -0,0 +1 @@ +version="2.5.1" diff --git a/.install/wallpaper.sh b/.install/wallpaper.sh index 1fe1247..3d4e10a 100644 --- a/.install/wallpaper.sh +++ b/.install/wallpaper.sh @@ -1,7 +1,7 @@ # ------------------------------------------------------ # Install wallpapers # ------------------------------------------------------ - +echo -e "${GREEN}" cat <<"EOF" __ __ _ _ \ \ / /_ _| | |_ __ __ _ _ __ ___ _ __ ___ @@ -11,10 +11,13 @@ __ __ _ _ |_| |_| 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 "If not, the script will install 3 default wallpapers in ~/wallpaper/" +echo "" 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 [Yy]* ) wget -P ~/Downloads/ https://gitlab.com/stephan-raabe/wallpaper/-/archive/main/wallpaper-main.zip @@ -23,7 +26,7 @@ while true; do mkdir ~/wallpaper fi cp ~/Downloads/wallpaper-main/* ~/wallpaper/ - echo "Wallpapers installed successfully." + echo "Wallpapers frpm the repository installed successfully." break;; [Nn]* ) if [ -d ~/wallpaper/ ]; then @@ -32,15 +35,21 @@ while true; do mkdir ~/wallpaper fi cp wallpapers/* ~/wallpaper - echo "Default wallpapers installed." + echo "Default wallpapers installed successfully." break;; * ) echo "Please answer yes or no.";; esac done +else + echo "~/wallpaper folder already exsits." +fi echo "" # ------------------------------------------------------ # Copy default wallpaper to .cache # ------------------------------------------------------ +if [ ! -f ~/.cache/current_wallpaper.jpg ]; then cp wallpapers/default.jpg ~/.cache/current_wallpaper.jpg +echo "Default wallpaper installed." echo "" +fi diff --git a/CHANGELOG b/CHANGELOG index cc381bf..52e305b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 https://gitlab.com/stephan-raabe/dotfiles/-/releases/2.5 -------------------------------------------------------- diff --git a/README.md b/README.md index acf574d..74ecc32 100644 --- a/README.md +++ b/README.md @@ -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 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. 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: diff --git a/hypr/conf/.hyprland.sh b/hypr/conf/.hyprland.sh deleted file mode 100755 index cc14609..0000000 --- a/hypr/conf/.hyprland.sh +++ /dev/null @@ -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" diff --git a/hypr/conf/animation.conf b/hypr/conf/animation.conf new file mode 100644 index 0000000..aed3048 --- /dev/null +++ b/hypr/conf/animation.conf @@ -0,0 +1 @@ +source = ~/dotfiles/hypr/conf/animations/animations-low.conf \ No newline at end of file diff --git a/hypr/conf/animations-high.conf b/hypr/conf/animations/animations-high.conf similarity index 100% rename from hypr/conf/animations-high.conf rename to hypr/conf/animations/animations-high.conf diff --git a/hypr/conf/animations-low.conf b/hypr/conf/animations/animations-low.conf similarity index 100% rename from hypr/conf/animations-low.conf rename to hypr/conf/animations/animations-low.conf diff --git a/hypr/conf/autostart.conf b/hypr/conf/autostart.conf index b66a4f6..b6abf38 100644 --- a/hypr/conf/autostart.conf +++ b/hypr/conf/autostart.conf @@ -5,6 +5,9 @@ # Setup XDG for screen sharing exec-once = ~/dotfiles/hypr/scripts/xdg.sh +# Start Polkit +exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 + # Load Dunst Notification Manager exec-once = dunst diff --git a/hypr/conf/decoration.conf b/hypr/conf/decoration.conf index 0c219a4..1d9ff61 100644 --- a/hypr/conf/decoration.conf +++ b/hypr/conf/decoration.conf @@ -1,24 +1 @@ -# ----------------------------------------------------- -# 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 -} +source = ~/dotfiles/hypr/conf/decorations/decoration.conf \ No newline at end of file diff --git a/hypr/conf/decorations/decoration.conf b/hypr/conf/decorations/decoration.conf new file mode 100644 index 0000000..0c219a4 --- /dev/null +++ b/hypr/conf/decorations/decoration.conf @@ -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 +} diff --git a/hypr/conf/environment.conf b/hypr/conf/environment.conf index ba44a6c..b1b0863 100644 --- a/hypr/conf/environment.conf +++ b/hypr/conf/environment.conf @@ -2,8 +2,6 @@ # Environment Variables # ----------------------------------------------------- -# Virtual Machines -# env = WLR_NO_HARDWARE_CURSORS, 1 -# env = WLR_RENDERER_ALLOW_SOFTWARE, 1 env = XCURSOR_SIZE,24 +env = QT_QPA_PLATFORM,wayland env = GTK_THEME,Adwaita:dark diff --git a/hypr/conf/keybindings.conf b/hypr/conf/keybindings.conf index 741fd76..28a30c2 100644 --- a/hypr/conf/keybindings.conf +++ b/hypr/conf/keybindings.conf @@ -7,7 +7,7 @@ $mainMod = SUPER bind = $mainMod, RETURN, exec, alacritty bind = $mainMod, Q, killactive bind = $mainMod, F, fullscreen -bind = $mainMod, E, exec, dolphin +bind = $mainMod, E, exec, ~/dotfiles/scripts/filemanager.sh bind = $mainMod, T, togglefloating bind = $mainMod SHIFT, T, exec, ~/dotfiles/hypr/scripts/toggleallfloat.sh bind = $mainMod, B, exec, chromium diff --git a/hypr/conf/virtualmachine.conf b/hypr/conf/virtualmachine.conf new file mode 100644 index 0000000..9cfa168 --- /dev/null +++ b/hypr/conf/virtualmachine.conf @@ -0,0 +1,6 @@ +# ----------------------------------------------------- +# Virtual Machine +# ----------------------------------------------------- + +env = WLR_NO_HARDWARE_CURSORS, 1 +env = WLR_RENDERER_ALLOW_SOFTWARE, 1 diff --git a/hypr/conf/window.conf b/hypr/conf/window.conf index 084cd09..c7f6633 100644 --- a/hypr/conf/window.conf +++ b/hypr/conf/window.conf @@ -1,12 +1 @@ -# ----------------------------------------------------- -# 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 -} +source = ~/dotfiles/hypr/conf/windows/window.conf diff --git a/hypr/conf/windows/window.conf b/hypr/conf/windows/window.conf new file mode 100644 index 0000000..084cd09 --- /dev/null +++ b/hypr/conf/windows/window.conf @@ -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 +} diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 6c360dd..975a20a 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -9,16 +9,25 @@ # ----------------------------------------------------- # ----------------------------------------------------- -# Keyboard & Monitor +# Monitor # ----------------------------------------------------- -source = ~/dotfiles/hypr/conf/keyboard.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/autostart.conf +# source = ~/dotfiles/hypr/conf/virtualmachine.conf + +# ----------------------------------------------------- +# Keyboard +# ----------------------------------------------------- +source = ~/dotfiles/hypr/conf/keyboard.conf # ----------------------------------------------------- # Load pywal color file @@ -38,10 +47,9 @@ source = ~/dotfiles/hypr/conf/windowrules.conf # ----------------------------------------------------- # Animation # ----------------------------------------------------- -source = ~/dotfiles/hypr/conf/animations-low.conf -# source = ~/dotfiles/hypr/conf/animations-high.conf +source = ~/dotfiles/hypr/conf/animation.conf # ----------------------------------------------------- # 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 \ No newline at end of file diff --git a/hypr/scripts/xdg.sh b/hypr/scripts/xdg.sh index 2987488..80691e4 100755 --- a/hypr/scripts/xdg.sh +++ b/hypr/scripts/xdg.sh @@ -7,16 +7,21 @@ # # ----------------------------------------------------- sleep 1 + # kill all possible running xdg-desktop-portals killall xdg-desktop-portal-hyprland killall xdg-desktop-portal-gnome killall xdg-desktop-portal-kde killall xdg-desktop-portal-lxqt killall xdg-desktop-portal-wlr +killall xdg-desktop-portal-gtk killall xdg-desktop-portal sleep 1 + # start xdg-desktop-portal-hyprland /usr/lib/xdg-desktop-portal-hyprland & sleep 2 + # start xdg-desktop-portal /usr/lib/xdg-desktop-portal & +sleep 1 diff --git a/install.sh b/install.sh index 65cda93..b88f4cf 100755 --- a/install.sh +++ b/install.sh @@ -1,4 +1,6 @@ #!/bin/bash +source .install/version.sh +source .install/colors.sh clear # Set installation mode @@ -9,7 +11,7 @@ if [ ! -z $1 ]; then echo "Existing dotfiles folder will not be modified." echo "Symbolic links will not be created." fi - +echo -e "${GREEN}" cat <<"EOF" _ _ __ _ _ __| | ___ | |_ / _(_) | ___ ___ @@ -18,7 +20,8 @@ cat <<"EOF" \__,_|\___/ \__|_| |_|_|\___||___/ EOF -version="2.5" +echo -e "${NONE}" + echo "Version: $version" echo "by Stephan Raabe 2023" echo "" @@ -26,6 +29,7 @@ echo "This script will guide you through the installation process of my dotfiles echo "" source .install/library.sh source .install/confirm-start.sh +source .install/rsync.sh source .install/backup.sh source .install/preparation.sh source .install/profile.sh diff --git a/scripts/filemanager.sh b/scripts/filemanager.sh index b7f323f..af8fd0e 100755 --- a/scripts/filemanager.sh +++ b/scripts/filemanager.sh @@ -1,12 +1 @@ -#/bin/sh -# _____ _ _ -# | ___(_) | ___ _ __ ___ __ _ _ __ __ _ __ _ ___ _ __ -# | |_ | | |/ _ \ '_ ` _ \ / _` | '_ \ / _` |/ _` |/ _ \ '__| -# | _| | | | __/ | | | | | (_| | | | | (_| | (_| | __/ | -# |_| |_|_|\___|_| |_| |_|\__,_|_| |_|\__,_|\__, |\___|_| -# |___/ -# -# by Stephan Raabe (2023) -# ----------------------------------------------------- - thunar \ No newline at end of file diff --git a/wallpapers/apex_octane.jpg b/wallpapers/apex_octane.jpg deleted file mode 100644 index 832fd96..0000000 Binary files a/wallpapers/apex_octane.jpg and /dev/null differ diff --git a/wallpapers/default.jpg b/wallpapers/default.jpg index 9e416e9..93e7249 100644 Binary files a/wallpapers/default.jpg and b/wallpapers/default.jpg differ diff --git a/wallpapers/green_sea.jpg b/wallpapers/green_sea.jpg deleted file mode 100644 index af8e65a..0000000 Binary files a/wallpapers/green_sea.jpg and /dev/null differ diff --git a/wallpapers/lake-sunrise.jpg b/wallpapers/lake-sunrise.jpg new file mode 100644 index 0000000..4f289c5 Binary files /dev/null and b/wallpapers/lake-sunrise.jpg differ diff --git a/wallpapers/liquid1.jpg b/wallpapers/liquid1.jpg new file mode 100644 index 0000000..d0efca6 Binary files /dev/null and b/wallpapers/liquid1.jpg differ diff --git a/waybar/modules.json b/waybar/modules.json index f724c90..85beaee 100644 --- a/waybar/modules.json +++ b/waybar/modules.json @@ -61,7 +61,7 @@ "format": " {}", "exec": "python ~/private/youtube.py", "restart-interval": 600, - "on-click": "brave https://studio.youtube.com", + "on-click": "chromium https://studio.youtube.com", "tooltip": false }, @@ -118,7 +118,7 @@ // Outlook Launcher "custom/outlook": { "format": "", - "on-click": "brave --app=https://outlook.office.com/mail/", + "on-click": "chromium --app=https://outlook.office.com/mail/", "tooltip": false }, @@ -129,13 +129,6 @@ "tooltip": false }, - // Brave Launcher - "custom/brave": { - "format": "", - "on-click": "brave", - "tooltip": false - }, - // Browser Launcher "custom/browser": { "format": "", @@ -146,7 +139,7 @@ // ChatGPT Launcher "custom/chatgpt": { "format": "", - "on-click": "brave --app=https://chat.openai.com", + "on-click": "chromium --app=https://chat.openai.com", "tooltip": false },