diff --git a/src/bluetooth_info.pl b/src/bluetooth_info.pl index f5508a5..7052655 100755 --- a/src/bluetooth_info.pl +++ b/src/bluetooth_info.pl @@ -11,7 +11,9 @@ my $device_name = ($output =~ /Name:\s+(.*)/) ? "$1" : "unknown"; my $icon = ($output =~ /Icon:\s+(.*)/) ? "$1" : ""; my $battery_percentage = ($output =~ /Battery Percentage:\s+\S+\s\(([0-9]+)\)/) ? "$1" : "?"; -if ($icon eq "audio-headphones") { - printf(" "); -} -printf("$device_name $battery_percentage%%"); +my %icons = ( + "audio-headphones" => "", + "audio-headset" => "" +); + +printf("$icons{$icon} $device_name $battery_percentage%%");