diff --git a/cbattery b/cbattery index 0e8df5c..15580c1 100755 --- a/cbattery +++ b/cbattery @@ -2,7 +2,7 @@ set -e -CACHE_FILE="${XDG_CACHE_HOME:-$HOME/.cache}/cbattery.status" +TMP_FILE=/tmp/cbattery.status SHARE_DIR=/usr/local/share/cbattery PATH="/usr/bin:/usr/local/bin:/usr/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/homebrew:$PATH" @@ -19,11 +19,11 @@ EOF } write_cache() { - echo "$1" > "$CACHE_FILE" + echo "$1" > "$TMP_FILE" } read_cache() { - cat "$CACHE_FILE" 2> /dev/null + cat "$TMP_FILE" 2> /dev/null } enable_discharging() {