[bluetooth_info.pl]: Add more icons

This commit is contained in:
2025-01-29 11:33:52 +00:00
parent efb65ee26c
commit 129583d572

View File

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