test
This commit is contained in:
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/zsh
|
||||
|
||||
last_value=""
|
||||
|
||||
while true; do
|
||||
volume=$( wpctl get-volume @DEFAULT_AUDIO_SINK@ )
|
||||
|
||||
percent=$( echo "$volume" | awk '{printf "%d%%", $2 * 100}' )
|
||||
|
||||
if [ "$percent" != "$last_value" ]; then
|
||||
echo "$percent" | tr -d '\n' | jq -Rs -c '{text: ., alt: "volume"}'
|
||||
last_value=$percent
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user