Add all restore options as selected
This commit is contained in:
parent
ab8bb8db61
commit
eb8b08be0e
|
@ -3,6 +3,7 @@
|
||||||
# ------------------------------------------------------
|
# ------------------------------------------------------
|
||||||
|
|
||||||
restorelist=""
|
restorelist=""
|
||||||
|
selectedlist=""
|
||||||
monitorrestored=0
|
monitorrestored=0
|
||||||
|
|
||||||
_showRestoreOptions() {
|
_showRestoreOptions() {
|
||||||
|
@ -12,52 +13,62 @@ _showRestoreOptions() {
|
||||||
restorelist=""
|
restorelist=""
|
||||||
if [ -f ~/dotfiles/.bashrc ]; then
|
if [ -f ~/dotfiles/.bashrc ]; then
|
||||||
restorelist+="~/dotfiles/.bashrc "
|
restorelist+="~/dotfiles/.bashrc "
|
||||||
|
selectedlist+="~/dotfiles/.bashrc,"
|
||||||
fi
|
fi
|
||||||
if [ -d ~/dotfiles/.settings ]; then
|
if [ -d ~/dotfiles/.settings ]; then
|
||||||
restorelist+="~/dotfiles/.settings "
|
restorelist+="~/dotfiles/.settings "
|
||||||
|
selectedlist+="~/dotfiles/.settings,"
|
||||||
fi
|
fi
|
||||||
if [[ $profile == *"Hyprland"* ]]; then
|
if [[ $profile == *"Hyprland"* ]]; then
|
||||||
if [ -f ~/dotfiles/hypr/conf/keyboard.conf ]; then
|
if [ -f ~/dotfiles/hypr/conf/keyboard.conf ]; then
|
||||||
restorelist+="~/dotfiles/hypr/conf/keyboard.conf "
|
restorelist+="~/dotfiles/hypr/conf/keyboard.conf "
|
||||||
|
selectedlist+="~/dotfiles/hypr/conf/keyboard.conf,"
|
||||||
fi
|
fi
|
||||||
if [ -f ~/dotfiles/hypr/conf/keybinding.conf ] && [ -d ~/dotfiles/hypr/conf/keybindings/ ]; then
|
if [ -f ~/dotfiles/hypr/conf/keybinding.conf ] && [ -d ~/dotfiles/hypr/conf/keybindings/ ]; then
|
||||||
restorelist+="~/dotfiles/hypr/conf/keybinding.conf "
|
restorelist+="~/dotfiles/hypr/conf/keybinding.conf "
|
||||||
|
selectedlist+="~/dotfiles/hypr/conf/keybinding.conf,"
|
||||||
fi
|
fi
|
||||||
if [ -f ~/dotfiles/hypr/conf/environment.conf ] && [ -d ~/dotfiles/hypr/conf/environments/ ]; then
|
if [ -f ~/dotfiles/hypr/conf/environment.conf ] && [ -d ~/dotfiles/hypr/conf/environments/ ]; then
|
||||||
restorelist+="~/dotfiles/hypr/conf/environment.conf "
|
restorelist+="~/dotfiles/hypr/conf/environment.conf "
|
||||||
|
selectedlist+="~/dotfiles/hypr/conf/environment.conf,"
|
||||||
fi
|
fi
|
||||||
if [ -f ~/dotfiles/hypr/conf/windowrule.conf ] && [ -d ~/dotfiles/hypr/conf/windowrules/ ]; then
|
if [ -f ~/dotfiles/hypr/conf/windowrule.conf ] && [ -d ~/dotfiles/hypr/conf/windowrules/ ]; then
|
||||||
restorelist+="~/dotfiles/hypr/conf/windowrule.conf "
|
restorelist+="~/dotfiles/hypr/conf/windowrule.conf "
|
||||||
|
selectedlist+="~/dotfiles/hypr/conf/windowrule.conf,"
|
||||||
fi
|
fi
|
||||||
if [ -f ~/dotfiles/hypr/conf/monitor.conf ] && [ -d ~/dotfiles/hypr/conf/monitors/ ]; then
|
if [ -f ~/dotfiles/hypr/conf/monitor.conf ] && [ -d ~/dotfiles/hypr/conf/monitors/ ]; then
|
||||||
restorelist+="~/dotfiles/hypr/conf/monitor.conf "
|
restorelist+="~/dotfiles/hypr/conf/monitor.conf "
|
||||||
|
selectedlist+="~/dotfiles/hypr/conf/monitor.conf,"
|
||||||
monitorrestored=1
|
monitorrestored=1
|
||||||
fi
|
fi
|
||||||
if [ -f ~/dotfiles/hypr/conf/animation.conf ] && [ -d ~/dotfiles/hypr/conf/animations/ ]; then
|
if [ -f ~/dotfiles/hypr/conf/animation.conf ] && [ -d ~/dotfiles/hypr/conf/animations/ ]; then
|
||||||
restorelist+="~/dotfiles/hypr/conf/animation.conf "
|
restorelist+="~/dotfiles/hypr/conf/animation.conf "
|
||||||
|
selectedlist+="~/dotfiles/hypr/conf/animation.conf,"
|
||||||
fi
|
fi
|
||||||
if [ -f ~/dotfiles/hypr/conf/decoration.conf ] && [ -d ~/dotfiles/hypr/conf/decorations/ ]; then
|
if [ -f ~/dotfiles/hypr/conf/decoration.conf ] && [ -d ~/dotfiles/hypr/conf/decorations/ ]; then
|
||||||
restorelist+="~/dotfiles/hypr/conf/decoration.conf "
|
restorelist+="~/dotfiles/hypr/conf/decoration.conf "
|
||||||
|
selectedlist+="~/dotfiles/hypr/conf/decoration.conf,"
|
||||||
fi
|
fi
|
||||||
if [ -f ~/dotfiles/hypr/conf/window.conf ] && [ -d ~/dotfiles/hypr/conf/windows/ ]; then
|
if [ -f ~/dotfiles/hypr/conf/window.conf ] && [ -d ~/dotfiles/hypr/conf/windows/ ]; then
|
||||||
restorelist+="~/dotfiles/hypr/conf/window.conf "
|
restorelist+="~/dotfiles/hypr/conf/window.conf "
|
||||||
|
selectedlist+="~/dotfiles/hypr/conf/window.conf,"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ $profile == *"Qtile"* ]]; then
|
if [[ $profile == *"Qtile"* ]]; then
|
||||||
if [ -f ~/dotfiles/qtile/conf/keyboard.py ]; then
|
if [ -f ~/dotfiles/qtile/conf/keyboard.py ]; then
|
||||||
restorelist+="~/dotfiles/qtile/conf/keyboard.py "
|
restorelist+="~/dotfiles/qtile/conf/keyboard.py "
|
||||||
|
selectedlist+="~/dotfiles/qtile/conf/keyboard.py,"
|
||||||
fi
|
fi
|
||||||
if [ -f ~/dotfiles/qtile/autostart_wayland.sh ]; then
|
if [ -f ~/dotfiles/qtile/autostart_wayland.sh ]; then
|
||||||
restorelist+="~/dotfiles/qtile/autostart_wayland.sh "
|
restorelist+="~/dotfiles/qtile/autostart_wayland.sh "
|
||||||
|
selectedlist+="~/dotfiles/qtile/autostart_wayland.sh,"
|
||||||
fi
|
fi
|
||||||
if [ -f ~/dotfiles/qtile/autostart_x11.sh ]; then
|
if [ -f ~/dotfiles/qtile/autostart_x11.sh ]; then
|
||||||
restorelist+="~/dotfiles/qtile/autostart_x11.sh "
|
restorelist+="~/dotfiles/qtile/autostart_x11.sh "
|
||||||
|
selectedlist+="~/dotfiles/qtile/autostart_x11.sh,"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ ! -z "$restorelist" ] ;then
|
restoreselect=$(gum choose --no-limit --height 20 --cursor-prefix "( ) " --selected-prefix "(x) " --unselected-prefix "( ) " --selected="$selectedlist" $restorelist)
|
||||||
restorelist+="All"
|
|
||||||
fi
|
|
||||||
restoreselect=$(gum choose --no-limit --height 20 --cursor-prefix "( ) " --selected-prefix "(x) " --unselected-prefix "( ) " $restorelist)
|
|
||||||
if [ ! -z "$restoreselect" ] ;then
|
if [ ! -z "$restoreselect" ] ;then
|
||||||
echo "Selected to restore:"
|
echo "Selected to restore:"
|
||||||
echo "$restoreselect"
|
echo "$restoreselect"
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
version="2.6"
|
version="2.6.1"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user