From 8a799fc2411b0bf80fa0080cc405e7668befd98b Mon Sep 17 00:00:00 2001 From: Stephan Raabe Date: Thu, 2 Mar 2023 09:45:31 +0100 Subject: [PATCH] Updates --- 1-install.sh | 2 +- scripts/checkplatform.sh | 10 ++++++++++ scripts/checkupdates.sh | 2 +- scripts/cu.sh | 14 ++++++++++++++ scripts/fontsearch.sh | 9 ++++++++- 5 files changed, 34 insertions(+), 3 deletions(-) create mode 100755 scripts/cu.sh diff --git a/1-install.sh b/1-install.sh index 3244717..ed9456d 100755 --- a/1-install.sh +++ b/1-install.sh @@ -30,7 +30,7 @@ yay -S pywal timeshift tela-circle-icon-theme-orange # Install Pip packages # ------------------------------------------------------ echo "-> Install Pip packages" -pip install psutil +pip install psutil rich click # ------------------------------------------------------ # Create symbolic links diff --git a/scripts/checkplatform.sh b/scripts/checkplatform.sh index a7797ba..b5e30d9 100755 --- a/scripts/checkplatform.sh +++ b/scripts/checkplatform.sh @@ -1 +1,11 @@ +#!/bin/sh +# ____ _ _ __ +# | _ \| | __ _| |_ / _| ___ _ __ _ __ ___ +# | |_) | |/ _` | __| |_ / _ \| '__| '_ ` _ \ +# | __/| | (_| | |_| _| (_) | | | | | | | | +# |_| |_|\__,_|\__|_| \___/|_| |_| |_| |_| +# +# by Stephan Raabe (2023) +# 3 = Desktop +# 10 = Laptop cat /sys/class/dmi/id/chassis_type diff --git a/scripts/checkupdates.sh b/scripts/checkupdates.sh index 8113e1d..835ca05 100755 --- a/scripts/checkupdates.sh +++ b/scripts/checkupdates.sh @@ -8,7 +8,7 @@ format() { fi } -if ! updates_arch="$(checkupdates | wc -l)"; then +if ! updates_arch="$(pacman -Qm >/dev/null | wc -l)"; then updates_arch=0 fi diff --git a/scripts/cu.sh b/scripts/cu.sh new file mode 100755 index 0000000..d9d894f --- /dev/null +++ b/scripts/cu.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +pacmanUpdates=$(pacman -Syup | grep http:// | wc -l) +aurUpdates=$(yaourt -Qua | grep aur | wc -l) + +if [ "$pacmanUpdates" -gt 0 ]; then + updateCount="$pacmanUpdates" +elif [ "$aurUpdates" -gt 0 ]; then + updateCount="A$aurUpdates" +else + updateCount=0 +fi + +echo "$updateCount" > /tmp/updateCount diff --git a/scripts/fontsearch.sh b/scripts/fontsearch.sh index 61eee27..8b4a480 100755 --- a/scripts/fontsearch.sh +++ b/scripts/fontsearch.sh @@ -1,5 +1,12 @@ #!/bin/sh - +# _____ _ _ +# | ___|__ _ __ | |_ ___ ___ __ _ _ __ ___| |__ +# | |_ / _ \| '_ \| __/ __|/ _ \/ _` | '__/ __| '_ \ +# | _| (_) | | | | |_\__ \ __/ (_| | | | (__| | | | +# |_| \___/|_| |_|\__|___/\___|\__,_|_| \___|_| |_| +# +# by Stephan Raabe (2023) +# fc-list \ | grep -ioE ": [^:]*$1[^:]+:" \ | sed -E 's/(^: |:)//g' \