garuda-inxi: Add mkinitcpio/dracut/nvidia-dkms, move snapshots to relevant software
This commit is contained in:
parent
493d089b93
commit
47fd8f5333
2 changed files with 20 additions and 9 deletions
2
PKGBUILD
2
PKGBUILD
|
@ -2,7 +2,7 @@
|
|||
# Maintainer: Librewish <librewish@gmail.com>
|
||||
|
||||
pkgname=garuda-common-settings
|
||||
pkgver=2.6.12
|
||||
pkgver=2.6.13
|
||||
pkgrel=1
|
||||
arch=('any')
|
||||
url="https://gitlab.com/garuda-linux/themes-and-settings/settings/$pkgname"
|
||||
|
|
|
@ -16,23 +16,35 @@ detect_dual_boot() {
|
|||
|
||||
detect_snapshots() {
|
||||
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
|
||||
echo "Timeshift"
|
||||
printf "timeshift "
|
||||
elif pacman -Qq snapper &> /dev/null; then
|
||||
echo "Snapper (maybe)"
|
||||
printf "snapper(custom) "
|
||||
elif pacman -Qq timeshift &> /dev/null; then
|
||||
echo "Timeshift (maybe)"
|
||||
else
|
||||
echo "None/Undetected"
|
||||
printf "timeshift(custom) "
|
||||
fi
|
||||
}
|
||||
|
||||
generate_relevant_software() {
|
||||
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-active NetworkManager &> /dev/null && RELEVANT+=("NetworkManager")
|
||||
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[*]}"
|
||||
[ -z "$RELEVANT_SOFTWARE" ] && RELEVANT_SOFTWARE="None"
|
||||
echo "$RELEVANT_SOFTWARE"
|
||||
|
@ -48,7 +60,7 @@ generate_system_update() {
|
|||
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"
|
||||
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}"
|
||||
|
@ -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)"
|
||||
detect_dual_boot &> /dev/null
|
||||
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)}')"
|
||||
if [ "$1" == "funstuff" ]; then
|
||||
update_count="$(paclog --grep="starting full system upgrade" | wc -l)"
|
||||
|
|
Loading…
Reference in a new issue