From 0ed25bbc16eb0b3715b760bb95e0870bde724fc7 Mon Sep 17 00:00:00 2001 From: dtb Date: Fri, 21 Oct 2022 00:23:47 -0400 Subject: [PATCH] additional error stuffz --- data/data | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/data/data b/data/data index cb56549..affb343 100755 --- a/data/data +++ b/data/data @@ -53,12 +53,17 @@ get_cpu_temp() { } get_current_desktop() { + LASTDESKTOP="$DESKTOP" case "$WM" in (bspwm) - DESKTOP="$(bspc query -D -d focused --names)" ;; + DESKTOP="$(bspc query -D -d focused --names 2>/dev/null)" ;; esac || DESKTOP="" printf "[%s] " "$DESKTOP" + if test -n "$LASTDESKTOP" && ! test -n "$DESKTOP"; then + # X is kill + exit 0 + fi } get_memory_usage() {