Update all dotfiles

This commit is contained in:
2025-05-22 17:56:05 -05:00
parent 0280a88a7b
commit 4bb042584b
1651 changed files with 60533 additions and 2672 deletions

View File

@ -0,0 +1,6 @@
#!/bin/bash
clear
aur_helper="$(cat ~/.config/ml4w/settings/aur.sh)"
figlet -f smslant "Cleanup"
echo
$aur_helper -Scc

View File

@ -0,0 +1,66 @@
#!/bin/bash
# _____ _ _ _____ __
# | __ \ (_) | | / ____| / _|
# | |__) | __ _ _ __ | |_ ___ _ __ | | ___ _ __ | |_
# | ___/ '__| | '_ \| __/ _ \ '__| | | / _ \| '_ \| _|
# | | | | | | | | | || __/ | | |___| (_) | | | | |
# |_| |_| |_|_| |_|\__\___|_| \_____\___/|_| |_|_|
#
# By @krystalsavage
sleep 1
clear
figlet -f smslant "Printers"
# ------------------------------------------------------
# Confirm Start
# ------------------------------------------------------
if gum confirm "DO YOU WANT TO START TO INSTALL PRINTER SYSTEM NOW?" ;then
echo
echo ":: Install started."
elif [ $? -eq 130 ]; then
exit 130
else
echo
echo ":: Install 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 -S cups cups-pdf cups-filters nss-mdns system-config-printer foomatic-db footmatic-db-engine foomatic-db-nonfree doomatic-db-nonfree-ppds foomatic-db-ppds cups-browsed libusb ipp-usb xdg-utils colord logrotate
notify-send "Installing printer system complete"
echo
echo ":: Installing printer system complete"
sleep 2
if [ -f ~/.config/ml4w/settings/printer-drivers.sh ] ;then
if gum confirm "DO YOU WANT TO INSTALL PRINTER DRIVERS NOW?" ;then
echo
echo ":: Install started."
elif [ $? -eq 130 ]; then
exit 130
else
echo
echo ":: Install cancelled."
exit;
fi
fi

View File

@ -0,0 +1,43 @@
#!/bin/bash
# _____ _ _ _ __ _
# |_ _(_)_ __ ___ ___ ___| |__ (_)/ _| |_
# | | | | '_ ` _ \ / _ \/ __| '_ \| | |_| __|
# | | | | | | | | | __/\__ \ | | | | _| |_
# |_| |_|_| |_| |_|\___||___/_| |_|_|_| \__|
#
sleep 1
clear
figlet -f smslant "Timeshift"
aur_helper="$(cat ~/.config/ml4w/settings/aur.sh)"
_isInstalledAUR() {
package="$1";
check="$($aur_helper -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=$(_isInstalledAUR "timeshift")
grubbtrfs_installed=$(_isInstalledAUR "grub-btrfs")
if [[ $timeshift_installed == "0" ]] ;then
echo ":: Timeshift is already installed"
else
if gum confirm "DO YOU WANT TO INSTALL Timeshift now?" ;then
$aur_helper -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
$aur_helper -S grub-btrfs
fi
fi
sleep 3

View File

@ -0,0 +1,12 @@
#!/bin/bash
while IFS= read -r line; do
# If the line starts with # and the next line is not the lines to be added
if [[ $line == \#HandleLidSwitchDocked=ignore ]]; then
# Add the new lines
echo "HandleLidSwitchDocked=ignore" | sudo tee -a /etc/systemd/logind.conf > /dev/null
fi
if [[ $line == \#HoldoffTimeoutSec=5s ]]; then
# Add the new lines
echo "HoldoffTimeoutSec=5s" | sudo tee -a /etc/systemd/logind.conf > /dev/null
fi
done < /etc/systemd/logind.conf

View File

@ -0,0 +1,60 @@
#!/bin/bash
# ____
# | _ \ __ _ ___ _ __ ___ __ _ _ __
# | |_) / _` |/ __| '_ ` _ \ / _` | '_ \
# | __/ (_| | (__| | | | | | (_| | | | |
# |_| \__,_|\___|_| |_| |_|\__,_|_| |_|
#
sleep 1
clear
figlet -f smslant "pacman.conf"
echo
echo ":: This script will activate or deactivate additions for your pacman.conf."
echo
if grep -Fq "#ParallelDownloads" /etc/pacman.conf
then
if gum confirm "Do you want to activate parallel downloads?" ;then
sudo sed -i 's/^#ParallelDownloads/ParallelDownloads/' /etc/pacman.conf
else
echo ":: Activation of parallel downloads skipped."
fi
else
echo ":: Parallel downloads are already activated."
fi
if grep -Fxq "#Color" /etc/pacman.conf
then
if gum confirm "Do you want to activate colors?" ;then
sudo sed -i 's/^#Color/Color/' /etc/pacman.conf
else
echo ":: Activation of Color skipped."
fi
else
echo ":: Color is already activated."
fi
if grep -Fxq "#VerbosePkgLists" /etc/pacman.conf
then
if gum confirm "Do you want to activate VerbosePkgLists?" ;then
sudo sed -i 's/^#VerbosePkgLists/VerbosePkgLists/' /etc/pacman.conf
else
echo ":: Activation of VerbosePkgLists skipped."
fi
else
echo ":: VerbosePkgLists is already activated."
fi
if grep -Fxq "ILoveCandy" /etc/pacman.conf
then
echo ":: ILoveCandy is already activated."
else
if gum confirm "Do you want to activate ILoveCandy?" ;then
sudo sed -i '/^ParallelDownloads = .*/a ILoveCandy' /etc/pacman.conf
else
echo ":: Activation of ILoveCandy skipped."
fi
fi
echo
echo "Press [ENTER] to close."
read

View File

@ -0,0 +1,61 @@
#!/bin/bash
# ____ _ _
# / ___| _ __ __ _ _ __ ___| |__ ___ | |_
# \___ \| '_ \ / _` | '_ \/ __| '_ \ / _ \| __|
# ___) | | | | (_| | |_) \__ \ | | | (_) | |_
# |____/|_| |_|\__,_| .__/|___/_| |_|\___/ \__|
# |_|
#
# by Stephan Raabe (2024)
# -----------------------------------------------------
sleep 1
clear
figlet -f smslant "Snapshot"
aur_helper="$(cat ~/.config/ml4w/settings/aur.sh)"
_isInstalledAUR() {
package="$1";
check="$($aur_helper -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=$(_isInstalledAUR "timeshift")
grubbtrfs_installed=$(_isInstalledAUR "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
$aur_helper -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
$aur_helper -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
$aur_helper -S grub-btrfs
else
exit
fi
fi
fi
fi

View File

@ -0,0 +1,9 @@
#!/bin/bash
sleep 1
if [ -f /var/lib/pacman/db.lck ]; then
sudo rm /var/lib/pacman/db.lck
echo ":: Unlock complete"
else
echo ":: Pacman database is not locked"
fi
sleep 3