From 7c1b52338eb20639568f75eadb7312e75e25feef Mon Sep 17 00:00:00 2001 From: Andrew Date: Sat, 13 Jul 2024 21:21:49 +0100 Subject: [PATCH] Sort device list in bluetooth_connect.pl --- bluetooth_connect.pl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bluetooth_connect.pl b/bluetooth_connect.pl index 52bd9a8..43ad625 100755 --- a/bluetooth_connect.pl +++ b/bluetooth_connect.pl @@ -16,9 +16,8 @@ foreach my $device (split(/\n/, $output)) { } my $device_list = ""; -foreach my $name (keys %devices) { +foreach my $name (sort(keys %devices)) { $device_list .= $name . "\n"; - } my $selection = `echo "$device_list" | dmenu`; @@ -30,6 +29,5 @@ if ($? == 0) { `notify-send "$script_name" "Successfully connected to $selection"`; } else { - `notify-send "$script_name" "Failed to connect to $selection"`; }