[bluetooth_dmenu.pl]: Add bluetooth icon to notifications
This commit is contained in:
@ -23,12 +23,12 @@ foreach my $name (sort(keys %devices)) {
|
|||||||
|
|
||||||
my $selection = `printf "$device_list" | dmenu -i -p "Connect Bluetooth device:"` or die("No selection made");
|
my $selection = `printf "$device_list" | dmenu -i -p "Connect Bluetooth device:"` or die("No selection made");
|
||||||
chomp($selection);
|
chomp($selection);
|
||||||
`notify-send "$script_name" "Attempting to connect to $selection ($devices{$selection})"`;
|
`notify-send -i bluetooth "$script_name" "Attempting to connect to $selection ($devices{$selection})"`;
|
||||||
`bluetoothctl connect $devices{$selection}`;
|
`bluetoothctl connect $devices{$selection}`;
|
||||||
|
|
||||||
if ($? == 0) {
|
if ($? == 0) {
|
||||||
`notify-send "$script_name" "Successfully connected to $selection ($devices{$selection})"`;
|
`notify-send -i bluetooth "$script_name" "Successfully connected to $selection ($devices{$selection})"`;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
`notify-send "$script_name" "Failed to connect to $selection ($devices{$selection})"`;
|
`notify-send -i bluetooth "$script_name" "Failed to connect to $selection ($devices{$selection})"`;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user