Config: Prevent warning on the first exec of the btc polybar module
This commit is contained in:
@@ -30,9 +30,13 @@ output() {
|
|||||||
echo "%{F$color}$symbol $difference%%{F$COLOR15}"
|
echo "%{F$color}$symbol $difference%%{F$COLOR15}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ ! -f "$file" ]; then
|
||||||
|
touch "$file"
|
||||||
|
else
|
||||||
# Only pull if older than 10 seconds
|
# Only pull if older than 10 seconds
|
||||||
lastModified=$(calc "$(date +%s) - $(date +%s -r $file) >= 10" | cut -c 1)
|
lastModified=$(calc "$(date +%s) - $(date +%s -r $file) >= 10" | cut -c 1)
|
||||||
if [ "$lastModified" -eq 0 ]; then cat "$file"; exit; fi
|
if [ "$lastModified" -eq 0 ]; then cat "$file"; exit; fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Get dates
|
# Get dates
|
||||||
date_last_week_start="$(date --date 'last week' +%s000)"
|
date_last_week_start="$(date --date 'last week' +%s000)"
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ done
|
|||||||
pulseTcp()
|
pulseTcp()
|
||||||
{
|
{
|
||||||
if test "$2" = "off" || test "$2" = "0"; then
|
if test "$2" = "off" || test "$2" = "0"; then
|
||||||
|
echo "Disabling PulseAudio TCP module"
|
||||||
if pactl list modules short | grep -q module-simple-protocol-tcp; then
|
if pactl list modules short | grep -q module-simple-protocol-tcp; then
|
||||||
pactl unload-module module-simple-protocol-tcp
|
pactl unload-module module-simple-protocol-tcp
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user