update: more cleanup

This commit is contained in:
Yingjie Wang 2024-06-06 00:57:18 -04:00
parent a23d8a5c38
commit 3ba0df7b7c
14 changed files with 4 additions and 208 deletions

View File

@ -13,24 +13,6 @@ if [[ $(_isInstalledPacman "ttf-ms-fonts") == 0 ]]; then
fi
fi
# Check for running NetworkManager.service
if [[ $(systemctl list-units --all -t service --full --no-legend "NetworkManager.service" | sed 's/^\s*//g' | cut -f1 -d' ') == "NetworkManager.service" ]];then
echo ":: NetworkManager.service already running."
else
sudo systemctl enable NetworkManager.service
sudo systemctl start NetworkManager.service
echo ":: NetworkManager.service activated successfully."
fi
# Check for running bluetooth.service
if [[ $(systemctl list-units --all -t service --full --no-legend "bluetooth.service" | sed 's/^\s*//g' | cut -f1 -d' ') == "bluetooth.service" ]];then
echo ":: bluetooth.service already running."
else
sudo systemctl enable bluetooth.service
sudo systemctl start bluetooth.service
echo ":: bluetooth.service activated successfully."
fi
if [ -d ~/dotfiles/hypr/settings/ ] ;then
rm -rf ~/dotfiles/hypr/settings
echo ":: ~/dotfiles/hypr/settings removed."

View File

@ -50,5 +50,6 @@ packagesPacman=(
);
packagesYay=(
"trizen"
"google-chrome"
);

View File

@ -1 +1 @@
chromium
google-chrome-stable

View File

@ -1 +1 @@
mousepad
~/dotfiles/.settings/terminal.sh -e vim

View File

@ -1 +0,0 @@
nm-connection-editor

View File

@ -1 +0,0 @@
alacritty -e pacseek

View File

@ -40,7 +40,6 @@ bind = $mainMod CTRL, H, exec, ~/dotfiles/hypr/scripts/keybindings.sh
bind = $mainMod SHIFT, B, exec, ~/dotfiles/waybar/launch.sh
bind = $mainMod CTRL, B, exec, ~/dotfiles/waybar/toggle.sh
bind = $mainMod SHIFT, R, exec, ~/dotfiles/hypr/scripts/loadconfig.sh
bind = $mainMod CTRL, F, exec, ~/dotfiles/scripts/filemanager.sh
bind = $mainMod CTRL, C, exec, ~/dotfiles/scripts/cliphist.sh
bind = $mainMod, V, exec, ~/dotfiles/scripts/cliphist.sh
bind = $mainMod CTRL, T, exec, ~/dotfiles/waybar/themeswitcher.sh

View File

@ -1 +0,0 @@
thunar

View File

@ -1,42 +0,0 @@
#!/bin/bash
# _____ _ _ _ __ _
# |_ _(_)_ __ ___ ___ ___| |__ (_)/ _| |_
# | | | | '_ ` _ \ / _ \/ __| '_ \| | |_| __|
# | | | | | | | | | __/\__ \ | | | | _| |_
# |_| |_|_| |_| |_|\___||___/_| |_|_|_| \__|
#
sleep 1
clear
figlet "Timeshift"
_isInstalledYay() {
package="$1";
check="$(yay -Qs --color always "${package}" | grep "local" | grep "${package} ")";
if [ -n "${check}" ] ; then
echo 0; #'0' means 'true' in Bash
return; #true
fi;
echo 1; #'1' means 'false' in Bash
return; #false
}
timeshift_installed=$(_isInstalledYay "timeshift")
grubbtrfs_installed=$(_isInstalledYay "grub-btrfs")
if [[ $timeshift_installed == "0" ]] ;then
echo ":: Timeshift is already installed"
else
if gum confirm "DO YOU WANT TO INSTALL Timeshift now?" ;then
yay -S timeshift
fi
fi
if [[ -d /boot/grub ]] && [[ $grubbtrfs_installed == "0" ]] ;then
echo ":: grub-btrfs is already installed"
else
echo ":: grub-btrfs is required to select a snapshot on grub bootloader."
if gum confirm "DO YOU WANT TO INSTALL grub-btrfs now?" ;then
yay -S grub-btrfs
fi
fi
sleep 3

View File

@ -1,66 +0,0 @@
#!/bin/bash
# ___ _ _ _ _ _ _ _
# |_ _|_ __ ___| |_ __ _| | | | | | |_ __ __| | __ _| |_ ___ ___
# | || '_ \/ __| __/ _` | | | | | | | '_ \ / _` |/ _` | __/ _ \/ __|
# | || | | \__ \ || (_| | | | | |_| | |_) | (_| | (_| | || __/\__ \
# |___|_| |_|___/\__\__,_|_|_| \___/| .__/ \__,_|\__,_|\__\___||___/
# |_|
# by Stephan Raabe (2024)
# -----------------------------------------------------
# Required: yay trizen timeshift btrfs-grub
# -----------------------------------------------------
sleep 1
clear
figlet "Updates"
echo
_isInstalledYay() {
package="$1";
check="$(yay -Qs --color always "${package}" | grep "local" | grep "${package} ")";
if [ -n "${check}" ] ; then
echo 0; #'0' means 'true' in Bash
return; #true
fi;
echo 1; #'1' means 'false' in Bash
return; #false
}
# ------------------------------------------------------
# Confirm Start
# ------------------------------------------------------
if gum confirm "DO YOU WANT TO START THE UPDATE NOW?" ;then
echo
echo ":: Update started."
elif [ $? -eq 130 ]; then
exit 130
else
echo
echo ":: Update canceled."
exit;
fi
if [[ $(_isInstalledYay "timeshift") == "0" ]] ;then
if gum confirm "DO YOU WANT TO CREATE A SNAPSHOT?" ;then
echo
c=$(gum input --placeholder "Enter a comment for the snapshot...")
sudo timeshift --create --comments "$c"
sudo timeshift --list
sudo grub-mkconfig -o /boot/grub/grub.cfg
echo ":: DONE. Snapshot $c created!"
echo
elif [ $? -eq 130 ]; then
echo ":: Snapshot canceled."
exit 130
else
echo ":: Snapshot canceled."
fi
echo
fi
yay
notify-send "Update complete"
echo
echo ":: Update complete"
sleep 2

View File

@ -1,12 +0,0 @@
# ___ ____ _
# / _ \ _ __ ___| _ \ _ __(_)_ _____
# | | | | '_ \ / _ \ | | | '__| \ \ / / _ \
# | |_| | | | | __/ |_| | | | |\ V / __/
# \___/|_| |_|\___|____/|_| |_| \_/ \___|
#
#
# by Stephan Raabe (2023)
# -----------------------------------------------------
rclone --vfs-cache-mode writes mount OneDrive: ~/OneDrive &
notify-send "OneDrive connected" "Microsoft OneDrive successfully mounted."

View File

@ -1,61 +0,0 @@
#!/bin/bash
# ____ _ _
# / ___| _ __ __ _ _ __ ___| |__ ___ | |_
# \___ \| '_ \ / _` | '_ \/ __| '_ \ / _ \| __|
# ___) | | | | (_| | |_) \__ \ | | | (_) | |_
# |____/|_| |_|\__,_| .__/|___/_| |_|\___/ \__|
# |_|
#
# by Stephan Raabe (2024)
# -----------------------------------------------------
sleep 1
clear
figlet "Snapshot"
_isInstalledYay() {
package="$1";
check="$(yay -Qs --color always "${package}" | grep "local" | grep "${package} ")";
if [ -n "${check}" ] ; then
echo 0; #'0' means 'true' in Bash
return; #true
fi;
echo 1; #'1' means 'false' in Bash
return; #false
}
timeshift_installed=$(_isInstalledYay "timeshift")
grubbtrfs_installed=$(_isInstalledYay "grub-btrfs")
if [[ $timeshift_installed == "0" ]] ;then
c=$(gum input --placeholder "Enter a comment for the snapshot...")
sudo timeshift --create --comments "$c"
sudo timeshift --list
if [[ -d /boot/grub ]] ;then
if [[ -d /boot/grub ]] && [[ $grubbtrfs_installed == "1" ]] ;then
if gum confirm "DO YOU WANT TO INSTALL grub-btrfs now?" ;then
yay -S grub-btrfs
else
exit
fi
fi
sudo grub-mkconfig -o /boot/grub/grub.cfg
fi
echo "DONE. Snapshot $c created!"
else
echo "ERROR: Timeshift is not installed."
if gum confirm "DO YOU WANT TO INSTALL Timeshift now?" ;then
yay -S timeshift
echo
echo ":: Timeshift has been installed. Please restart this script."
if [[ -d /boot/grub ]] && [[ $grubbtrfs_installed == "1" ]] ;then
echo ":: grub-btrfs is required to select a snapshot on grub bootloader."
if gum confirm "DO YOU WANT TO INSTALL grub-btrfs now?" ;then
yay -S grub-btrfs
else
exit
fi
fi
fi
fi

View File

@ -102,8 +102,7 @@
"return-type": "json",
"exec": "~/dotfiles/scripts/updates.sh",
"restart-interval": 60,
"on-click": "alacritty --class dotfiles-floating -e ~/dotfiles/scripts/installupdates.sh",
"on-click-right": "~/dotfiles/.settings/software.sh"
"on-click": "alacritty --class dotfiles-floating -e ~/dotfiles/scripts/installupdates.sh"
},
// Wallpaper

View File

@ -100,7 +100,6 @@
"exec": "~/dotfiles/scripts/updates.sh",
"restart-interval": 60,
"on-click": "alacritty --class dotfiles-floating -e ~/dotfiles/scripts/installupdates.sh",
"on-click-right": "~/dotfiles/.settings/software.sh",
"tooltip": false
},