1
0

more stuff

This commit is contained in:
dtb
2022-09-18 12:17:49 -04:00
parent 4206d6dee5
commit 3b9ff7ddb4
6 changed files with 48 additions and 16 deletions

4
data/Makefile Normal file
View File

@@ -0,0 +1,4 @@
all: ;
clean: ;
sane: ;
.PHONY: all clean sane

View File

@@ -54,7 +54,7 @@ get_cpu_temp() {
get_current_desktop() {
case "$WM" in
(bspwm) printf "[%b] " "$(bspc query -D -d focused --names)" ;;
(bspwm) printf "[%b] " "$(bspc query -D -d focused --names) 2>/dev/null" ;;
esac
}
@@ -68,9 +68,9 @@ get_memory_usage() {
}
get_public_ip() {
PUBLIC_IP4="$(curl -4 "$PUBLIC_IP_FETCH_URL" --no-progress-meter 2>/dev/null \
PUBLIC_IP4="$(curl -4 --connect-timeout 5 "$PUBLIC_IP_FETCH_URL" --no-progress-meter 2>/dev/null \
|| printf "-1")"
PUBLIC_IP6="$(curl -6 "$PUBLIC_IP6_FETCH_URL" --no-progress-meter 2>/dev/null \
PUBLIC_IP6="$(curl -6 --connect-timeout 5 "$PUBLIC_IP6_FETCH_URL" --no-progress-meter 2>/dev/null \
|| printf "-1")"
if [ "$PUBLIC_IP4" = "-1" ] && [ "$PUBLIC_IP6" = "-1" ]; then
printf "[error fetching address]"