From ac0422a9eb7ca9faae96566ca92a7e579d9a6437 Mon Sep 17 00:00:00 2001 From: Adam Stück Date: Thu, 4 May 2023 15:52:13 +0200 Subject: Drop unused scripts --- .local/bin/statusbar/sb-forecast | 49 ---------------------------------------- .local/bin/statusbar/sb-packages | 22 ------------------ 2 files changed, 71 deletions(-) delete mode 100755 .local/bin/statusbar/sb-forecast delete mode 100755 .local/bin/statusbar/sb-packages (limited to '.local/bin/statusbar') diff --git a/.local/bin/statusbar/sb-forecast b/.local/bin/statusbar/sb-forecast deleted file mode 100755 index c9923fd..0000000 --- a/.local/bin/statusbar/sb-forecast +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -LOCATION=$(cat "$XDG_CONFIG_HOME/forecast/location") - -main () { - case "$1" in - -b|--browser) - xdg-open "https://wttr.in/$LOCATION" - exit 0 ;; - esac - - res=$(curl -sf wttr.in/"$LOCATION"?format="%x+%t") || exit 1 - - icon=$(condition_icon "$res") - temp=$(temperature "$res") - echo "$icon" "$temp" -} - -condition_icon () { - icon=$(echo "$1" | cut -d\ -f1) - - case "$icon" in - '=') echo  ;; - '/') echo  ;; - '.') echo  ;; - 'm') echo  ;; - 'o') echo  ;; - 'mmm') echo  ;; - 'mm') echo  ;; - '///') echo  ;; - '//') echo  ;; - '**') echo  ;; - '*') echo  ;; - '*/*') echo  ;; - 'x') echo  ;; - 'x/') echo  ;; - '*/') echo  ;; - '/!/') echo  ;; - '!/') echo  ;; - '*!*') echo  ;; - *) echo ? ;; - esac -} - -temperature () { - echo "$1" | cut -d\ -f2 | sed -e 's/+//' -e 's/-0/0/' -e 's/C//' -} - -main "$@" diff --git a/.local/bin/statusbar/sb-packages b/.local/bin/statusbar/sb-packages deleted file mode 100755 index bbdefb1..0000000 --- a/.local/bin/statusbar/sb-packages +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then - updates_arch=0 -fi - -# if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then -if ! updates_aur=$(paru -Qum 2> /dev/null | wc -l); then -# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then -# if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then -# if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then -# if ! updates_aur=$(rua upgrade --printonly 2> /dev/null | wc -l); then - updates_aur=0 -fi - -aur_ignored=$($HOME/.local/bin/aurignored | wc -l) - -updates=$((updates_arch + updates_aur - $aur_ignored)) - -if [ "$updates" -gt 0 ]; then - echo " $updates" -fi -- cgit v1.2.3-70-g09d2