diff --git a/.config/fish/functions/btre.fish b/.config/fish/functions/btre.fish index 13641aa..df438d4 100644 --- a/.config/fish/functions/btre.fish +++ b/.config/fish/functions/btre.fish @@ -1,20 +1,21 @@ function btre -a device -d 'Reconnect to a known bluetooth device' - set -l devices 00:1B:66:E3:07:3A CC:98:8B:3E:6B:9D + set -l devices CC:98:8B:3E:6B:9D 00:1B:66:E3:07:3A + set -l index 1 + + if test -n "$device" + set index $device + end bluetoothctl power on - for device in $devices - bluetoothctl remove $device - end + bluetoothctl remove $devices[$index] nohup bluetoothctl scan on >/dev/null & + sleep 2 - for device in $devices - bluetoothctl pair $device - sleep 1 - bluetoothctl trust $device - bluetoothctl connect $device - end + bluetoothctl pair $devices[$index] + bluetoothctl trust $devices[$index] + bluetoothctl connect $devices[$index] pkill bluetoothctl end diff --git a/provision_linux b/provision_linux index 72883b2..9e50096 100755 --- a/provision_linux +++ b/provision_linux @@ -67,7 +67,8 @@ function provision_terminal_env -d 'Install base terminal utilities and sync con $base_pkgs \ python-neovim \ the_silver_searcher \ - bat + bat \ + sysz set -l debian_pkgs \ $base_pkgs \