Updates
This commit is contained in:
+13
-137
@@ -102,74 +102,74 @@ _startRestore() {
|
||||
if [[ $restoreselect == *"~/dotfiles/.bashrc"* ]] || [[ $restoreselect == *"All"* ]] ; then
|
||||
if [ -f ~/dotfiles/.bashrc ]; then
|
||||
cp ~/dotfiles/.bashrc ~/dotfiles-versions/$version/
|
||||
echo ".bashrc restored!"
|
||||
echo ":: .bashrc restored!"
|
||||
fi
|
||||
fi
|
||||
if [[ $restoreselect == *"~/dotfiles/.settings"* ]] || [[ $restoreselect == *"All"* ]] ; then
|
||||
if [ -d ~/dotfiles/.settings ]; then
|
||||
rsync -a -I ~/dotfiles/.settings/ ~/dotfiles-versions/$version/.settings/
|
||||
echo ".settings restored!"
|
||||
echo ":: .settings restored!"
|
||||
fi
|
||||
fi
|
||||
if [[ $profile == *"Hyprland"* ]]; then
|
||||
if [[ $restoreselect == *"~/dotfiles/hypr/hypridle.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then
|
||||
if [ -f ~/dotfiles/hypr/hypridle.conf ]; then
|
||||
cp ~/dotfiles/hypr/hypridle.conf ~/dotfiles-versions/$version/hypr/
|
||||
echo "Hyprland hypridle.conf restored!"
|
||||
echo ":: Hyprland hypridle.conf restored!"
|
||||
fi
|
||||
fi
|
||||
if [[ $restoreselect == *"~/dotfiles/hypr/conf/custom.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then
|
||||
if [ -f ~/dotfiles/hypr/conf/custom.conf ]; then
|
||||
cp ~/dotfiles/hypr/conf/custom.conf ~/dotfiles-versions/$version/hypr/conf/
|
||||
echo "Hyprland custom.conf restored!"
|
||||
echo ":: Hyprland custom.conf restored!"
|
||||
fi
|
||||
fi
|
||||
if [[ $restoreselect == *"~/dotfiles/hypr/conf/keyboard.conf"* ]] || [[ $restoreselect == *"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!"
|
||||
echo ":: Hyprland keyboard.conf restored!"
|
||||
fi
|
||||
fi
|
||||
if [[ $restoreselect == *"~/dotfiles/hypr/conf/monitor.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then
|
||||
if [ -f ~/dotfiles/hypr/conf/monitor.conf ]; then
|
||||
cp ~/dotfiles/hypr/conf/monitor.conf ~/dotfiles-versions/$version/hypr/conf/
|
||||
echo "Hyprland monitor.conf restored!"
|
||||
echo ":: Hyprland monitor.conf restored!"
|
||||
fi
|
||||
fi
|
||||
if [[ $restoreselect == *"~/dotfiles/hypr/conf/keybinding.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then
|
||||
if [ -f ~/dotfiles/hypr/conf/keybinding.conf ]; then
|
||||
cp ~/dotfiles/hypr/conf/keybinding.conf ~/dotfiles-versions/$version/hypr/conf/
|
||||
echo "Hyprland keybinding.conf restored!"
|
||||
echo ":: Hyprland keybinding.conf restored!"
|
||||
fi
|
||||
fi
|
||||
if [[ $restoreselect == *"~/dotfiles/hypr/conf/environment.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then
|
||||
if [ -f ~/dotfiles/hypr/conf/environment.conf ]; then
|
||||
cp ~/dotfiles/hypr/conf/environment.conf ~/dotfiles-versions/$version/hypr/conf/
|
||||
echo "Hyprland environment.conf restored!"
|
||||
echo ":: Hyprland environment.conf restored!"
|
||||
fi
|
||||
fi
|
||||
if [[ $restoreselect == *"~/dotfiles/hypr/conf/windowrule.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then
|
||||
if [ -f ~/dotfiles/hypr/conf/windowrule.conf ]; then
|
||||
cp ~/dotfiles/hypr/conf/windowrule.conf ~/dotfiles-versions/$version/hypr/conf/
|
||||
echo "Hyprland windowrule.conf restored!"
|
||||
echo ":: Hyprland windowrule.conf restored!"
|
||||
fi
|
||||
fi
|
||||
if [[ $restoreselect == *"~/dotfiles/hypr/conf/animation.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then
|
||||
if [ -f ~/dotfiles/hypr/conf/animation.conf ]; then
|
||||
cp ~/dotfiles/hypr/conf/animation.conf ~/dotfiles-versions/$version/hypr/conf/
|
||||
echo "Hyprland animation.conf restored!"
|
||||
echo ":: Hyprland animation.conf restored!"
|
||||
fi
|
||||
fi
|
||||
if [[ $restoreselect == *"~/dotfiles/hypr/conf/decoration.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then
|
||||
if [ -f ~/dotfiles/hypr/conf/decoration.conf ]; then
|
||||
cp ~/dotfiles/hypr/conf/decoration.conf ~/dotfiles-versions/$version/hypr/conf/
|
||||
echo "Hyprland decoration.conf restored!"
|
||||
echo ":: Hyprland decoration.conf restored!"
|
||||
fi
|
||||
fi
|
||||
if [[ $restoreselect == *"~/dotfiles/hypr/conf/window.conf"* ]] || [[ $restoreselect == *"All"* ]] ; then
|
||||
if [ -f ~/dotfiles/hypr/conf/window.conf ]; then
|
||||
cp ~/dotfiles/hypr/conf/window.conf ~/dotfiles-versions/$version/hypr/conf/
|
||||
echo "Hyprland window.conf restored!"
|
||||
echo ":: Hyprland window.conf restored!"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -177,7 +177,7 @@ _startRestore() {
|
||||
if [[ $restoreselect == *"~/dotfiles/qtile/autostart.sh"* ]] || [[ $restoreselect == *"All"* ]] ; then
|
||||
if [ -f ~/dotfiles/qtile/autostart.sh ]; then
|
||||
cp ~/dotfiles/qtile/autostart.sh ~/dotfiles-versions/$version/qtile/
|
||||
echo "Qtile autostart.sh restored!"
|
||||
echo ":: Qtile autostart.sh restored!"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -195,130 +195,6 @@ echo -e "${NONE}"
|
||||
echo "PLEASE NOTE: Restoring is not possible with version < 2.6 of the dotfiles."
|
||||
echo "In that case, please use the automated backup or create your own backup manually."
|
||||
echo ""
|
||||
|
||||
_showRestoreOptions
|
||||
|
||||
# Restore Waybar Workspaces
|
||||
targetFile="$HOME/dotfiles-versions/$version/waybar/modules.json"
|
||||
settingsFile="$HOME/dotfiles/.settings/waybar_workspaces"
|
||||
if [ -f $settingsFile ] ;then
|
||||
startMarker="START WORKSPACE"
|
||||
endMarker="END WORKSPACES"
|
||||
customtext="$(cat $settingsFile)"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile"
|
||||
echo "Waybar Workspaces restored."
|
||||
fi
|
||||
|
||||
# Restore Waybar Appslabel
|
||||
targetFile="$HOME/dotfiles-versions/$version/waybar/modules.json"
|
||||
settingsFile="$HOME/dotfiles/.settings/waybar_appslabel"
|
||||
if [ -f $settingsFile ] ;then
|
||||
startMarker="START APPS LABEL"
|
||||
endMarker="END APPS LABEL"
|
||||
customtext="$(cat $settingsFile)"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile"
|
||||
echo "Waybar Appslabel restored."
|
||||
fi
|
||||
|
||||
# Restore Waybar ChatGPT
|
||||
targetFile="$HOME/dotfiles/waybar/modules.json"
|
||||
settingsFile="$HOME/dotfiles/.settings/waybar_chatgpt"
|
||||
if [ -f $settingsFile ] ;then
|
||||
startMarker="START CHATGPT TOOGLE"
|
||||
endMarker="END CHATGPT TOOGLE"
|
||||
customtext="$(cat $settingsFile)"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile"
|
||||
echo "Waybar ChatGPT restored."
|
||||
fi
|
||||
|
||||
# Restore Waybar Systray
|
||||
targetFile1="$HOME/dotfiles-versions/$version/waybar/themes/ml4w/config"
|
||||
targetFile2="$HOME/dotfiles-versions/$version/waybar/themes/ml4w-blur/config"
|
||||
targetFile3="$HOME/dotfiles-versions/$version/waybar/themes/ml4w-blur-bottom/config"
|
||||
targetFile4="$HOME/dotfiles-versions/$version/waybar/themes/ml4w-bottom/config"
|
||||
targetFile5="$HOME/dotfiles-versions/$version/waybar/themes/ml4w-minimal/config"
|
||||
settingsFile="$HOME/dotfiles/.settings/waybar_systray"
|
||||
if [ -f $settingsFile ] ;then
|
||||
startMarker="START TRAY TOOGLE"
|
||||
endMarker="END TRAY TOOGLE"
|
||||
customtext="$(cat $settingsFile)"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile1"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile2"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile3"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile4"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile5"
|
||||
echo "Waybar Systray restored."
|
||||
fi
|
||||
|
||||
# Restore Waybar Network
|
||||
targetFile1="$HOME/dotfiles-versions/$version/waybar/themes/ml4w/config"
|
||||
targetFile2="$HOME/dotfiles-versions/$version/waybar/themes/ml4w-blur/config"
|
||||
targetFile3="$HOME/dotfiles-versions/$version/waybar/themes/ml4w-blur-bottom/config"
|
||||
targetFile4="$HOME/dotfiles-versions/$version/waybar/themes/ml4w-bottom/config"
|
||||
targetFile5="$HOME/dotfiles-versions/$version/waybar/themes/ml4w-minimal/config"
|
||||
settingsFile="$HOME/dotfiles/.settings/waybar_network"
|
||||
if [ -f $settingsFile ] ;then
|
||||
startMarker="START NETWORK TOOGLE"
|
||||
endMarker="END NETWORK TOOGLE"
|
||||
customtext="$(cat $settingsFile)"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile1"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile2"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile3"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile4"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile5"
|
||||
echo "Waybar Network restored."
|
||||
fi
|
||||
|
||||
# Restore Waybar Idle
|
||||
targetFile1="$HOME/dotfiles/waybar/themes/ml4w/config"
|
||||
targetFile2="$HOME/dotfiles/waybar/themes/ml4w-blur/config"
|
||||
targetFile3="$HOME/dotfiles/waybar/themes/ml4w-blur-bottom/config"
|
||||
targetFile4="$HOME/dotfiles/waybar/themes/ml4w-bottom/config"
|
||||
targetFile5="$HOME/dotfiles-versions/$version/waybar/themes/ml4w-minimal/config"
|
||||
settingsFile="$HOME/dotfiles/.settings/waybar_swaylock"
|
||||
if [ -f $settingsFile ] ;then
|
||||
startMarker="START IDLE TOOGLE"
|
||||
endMarker="END IDLE TOOGLE"
|
||||
customtext="$(cat $settingsFile)"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile1"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile2"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile3"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile4"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile5"
|
||||
echo "Waybar Idle restored."
|
||||
fi
|
||||
|
||||
# Restore Waybar nmapplet
|
||||
targetFile="$HOME/dotfiles-versions/$version/hypr/conf/autostart.conf"
|
||||
settingsFile="$HOME/dotfiles/.settings/waybar_nmapplet"
|
||||
if [ -f $settingsFile ] ;then
|
||||
startMarker="START NM APPLET"
|
||||
endMarker="END NM APPLET"
|
||||
customtext="$(cat $settingsFile)"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile"
|
||||
echo "nm-applet restored."
|
||||
fi
|
||||
|
||||
# Restore Keyboard natural_scroll
|
||||
targetFile="$HOME/dotfiles-versions/$version/hypr/conf/keyboard.conf"
|
||||
settingsFile="$HOME/dotfiles/.settings/keyboard_naturalscroll"
|
||||
if [ -f $settingsFile ] ;then
|
||||
findMarker="natural_scroll"
|
||||
customtext="$(cat $settingsFile)"
|
||||
_replaceLineInFile "$findMarker" "$customtext" "$targetFile"
|
||||
echo "keyboard natural_scroll restored."
|
||||
fi
|
||||
|
||||
# Restore Start Swaylock
|
||||
targetFile="$HOME/dotfiles/hypr/scripts/lockscreentime.sh"
|
||||
settingsFile="$HOME/dotfiles/.settings/hypr_lockscreen"
|
||||
if [ -f $settingsFile ] ;then
|
||||
startMarker="START SWAYIDLE"
|
||||
endMarker="END SWAYIDLE"
|
||||
customtext="$(cat $settingsFile)"
|
||||
_replaceInFile "$startMarker" "$endMarker" "$customtext" "$targetFile"
|
||||
echo "Swaylock start restored."
|
||||
fi
|
||||
|
||||
echo ""
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user