1
0
Fork 0
mirror of synced 2024-11-22 01:55:36 -05:00

garuda-inxi: Add mkinitcpio/dracut/nvidia-dkms, move snapshots to relevant software

This commit is contained in:
TNE 2023-01-03 05:01:43 +01:00
parent 493d089b93
commit 47fd8f5333
2 changed files with 20 additions and 9 deletions

View file

@ -2,7 +2,7 @@
# Maintainer: Librewish <librewish@gmail.com> # Maintainer: Librewish <librewish@gmail.com>
pkgname=garuda-common-settings pkgname=garuda-common-settings
pkgver=2.6.12 pkgver=2.6.13
pkgrel=1 pkgrel=1
arch=('any') arch=('any')
url="https://gitlab.com/garuda-linux/themes-and-settings/settings/$pkgname" url="https://gitlab.com/garuda-linux/themes-and-settings/settings/$pkgname"

View file

@ -16,23 +16,35 @@ detect_dual_boot() {
detect_snapshots() { detect_snapshots() {
if [ -d /.snapshots ] || pacman -Qq snapper-support &> /dev/null; then if [ -d /.snapshots ] || pacman -Qq snapper-support &> /dev/null; then
echo "Snapper" printf "snapper "
elif [ -d /run/timeshift ] || pacman -Qq timeshift-support &> /dev/null; then elif [ -d /run/timeshift ] || pacman -Qq timeshift-support &> /dev/null; then
echo "Timeshift" printf "timeshift "
elif pacman -Qq snapper &> /dev/null; then elif pacman -Qq snapper &> /dev/null; then
echo "Snapper (maybe)" printf "snapper(custom) "
elif pacman -Qq timeshift &> /dev/null; then elif pacman -Qq timeshift &> /dev/null; then
echo "Timeshift (maybe)" printf "timeshift(custom) "
else
echo "None/Undetected"
fi fi
} }
generate_relevant_software() { generate_relevant_software() {
local RELEVANT=() local RELEVANT=()
local packages
packages="$(pacman -Qq garuda-dracut-support mkinitcpio dracut nvidia-dkms 2> /dev/null | xargs || true)"
systemctl is-enabled tlp &> /dev/null && RELEVANT+=("tlp") systemctl is-enabled tlp &> /dev/null && RELEVANT+=("tlp")
systemctl is-active NetworkManager &> /dev/null && RELEVANT+=("NetworkManager") systemctl is-active NetworkManager &> /dev/null && RELEVANT+=("NetworkManager")
systemctl is-active connman &> /dev/null && RELEVANT+=("connman") systemctl is-active connman &> /dev/null && RELEVANT+=("connman")
if [[ "$packages" =~ (^| )garuda-dracut-support($| ) ]]; then
RELEVANT+=("dracut")
elif [[ "$packages" =~ (^| )dracut($| ) ]]; then
RELEVANT+=("dracut(custom)")
fi
[[ "$packages" =~ (^| )mkinitcpio($| ) ]] && RELEVANT+=("mkinitcpio")
[[ "$packages" =~ (^| )nvidia-dkms($| ) ]] && RELEVANT+=("nvidia-dkms")
detect_snapshots
local RELEVANT_SOFTWARE="${RELEVANT[*]}" local RELEVANT_SOFTWARE="${RELEVANT[*]}"
[ -z "$RELEVANT_SOFTWARE" ] && RELEVANT_SOFTWARE="None" [ -z "$RELEVANT_SOFTWARE" ] && RELEVANT_SOFTWARE="None"
echo "$RELEVANT_SOFTWARE" echo "$RELEVANT_SOFTWARE"
@ -48,7 +60,7 @@ generate_system_update() {
echo -e "$(date -d"@$last_update" +%F)${reboot}" echo -e "$(date -d"@$last_update" +%F)${reboot}"
} }
[ -t 0 ] && inxi -Faz || inxi -Fazc0 [ -t 0 ] && inxi -Faz --zv || inxi -Fazc0 --zv
echo -e "\033[1;34mGaruda ($(pacman -Q garuda-common-settings | awk '{print $2}')):\033[0m" echo -e "\033[1;34mGaruda ($(pacman -Q garuda-common-settings | awk '{print $2}')):\033[0m"
install_date="$(head -n1 /var/log/pacman.log | cut -d " " -f1 | cut -c 2-11)" install_date="$(head -n1 /var/log/pacman.log | cut -d " " -f1 | cut -c 2-11)"
echo -e "\033[1;34m System install date:\033[0m ${install_date}" echo -e "\033[1;34m System install date:\033[0m ${install_date}"
@ -57,7 +69,6 @@ echo -e "\033[1;34m Is partially upgraded: \033[0m $([ -e /var/lib/garuda/part
echo -e "\033[1;34m Relevant software: \033[0m $(generate_relevant_software)" echo -e "\033[1;34m Relevant software: \033[0m $(generate_relevant_software)"
detect_dual_boot &> /dev/null detect_dual_boot &> /dev/null
echo -e "\033[1;34m Windows dual boot: \033[0m ${DUALBOOT}" echo -e "\033[1;34m Windows dual boot: \033[0m ${DUALBOOT}"
echo -e "\033[1;34m Snapshots: \033[0m $(detect_snapshots)"
echo -e "\033[1;34m Failed units: \033[0m $(systemctl list-units --failed --full --all --plain --no-legend | awk '{printf("%s ",$1)}')" echo -e "\033[1;34m Failed units: \033[0m $(systemctl list-units --failed --full --all --plain --no-legend | awk '{printf("%s ",$1)}')"
if [ "$1" == "funstuff" ]; then if [ "$1" == "funstuff" ]; then
update_count="$(paclog --grep="starting full system upgrade" | wc -l)" update_count="$(paclog --grep="starting full system upgrade" | wc -l)"