mirror of
https://github.com/kuhyx/scripts.git
synced 2026-07-04 16:23:12 +02:00
21 lines
479 B
Bash
Executable File
21 lines
479 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Get the current volume level and mute status
|
|
volume=$(pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}' | tr -d '%')
|
|
mute=$(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}')
|
|
|
|
# Determine icon and color based on mute status
|
|
if [ "$mute" = "yes" ]; then
|
|
icon="🔇" # Muted
|
|
color="#FF5555" # Red
|
|
else
|
|
icon="🔊" # Volume icon
|
|
color="#50FA7B" # Green
|
|
fi
|
|
|
|
# Output the volume with icon and color
|
|
echo "$icon $volume%"
|
|
echo
|
|
echo $color
|
|
|