Show MAC address in bluetooth_connect.pl notifications

This commit is contained in:
2024-07-14 20:10:01 +01:00
parent 5aa3cd0e8d
commit c8ed908411

View File

@ -22,12 +22,12 @@ foreach my $name (sort(keys %devices)) {
my $selection = `printf "$device_list" | dmenu` or die("No selection made");
chomp($selection);
`notify-send "$script_name" "Attempting to connect to $selection"`;
`notify-send "$script_name" "Attempting to connect to $selection ($devices{$selection})"`;
`bluetoothctl connect $devices{$selection}`;
if ($? == 0) {
`notify-send "$script_name" "Successfully connected to $selection"`;
`notify-send "$script_name" "Successfully connected to $selection ($devices{$selection})"`;
}
else {
`notify-send "$script_name" "Failed to connect to $selection"`;
`notify-send "$script_name" "Failed to connect to $selection ($devices{$selection})"`;
}