more stuff
This commit is contained in:
4
data/Makefile
Normal file
4
data/Makefile
Normal file
@@ -0,0 +1,4 @@
|
||||
all: ;
|
||||
clean: ;
|
||||
sane: ;
|
||||
.PHONY: all clean sane
|
||||
@@ -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]"
|
||||
|
||||
Reference in New Issue
Block a user