call menus from waybar

This commit is contained in:
Never Gude 2026-03-19 15:34:08 +01:00
parent c84f9047fe
commit 4d412a1613
6 changed files with 78 additions and 6 deletions

View file

@ -0,0 +1,19 @@
#!/usr/bin/env fish
# Select a paired bluetooth connection
set dump (bluetoothctl devices | string replace "Device " "" | string split -m 1 " ")
set ids
set names
for i in (seq (count $dump))
if test (math $i % 2) -eq 0
set -a names $dump[$i]
else
set -a ids $dump[$i]
end
end
set input (math (menu --index $names || exit) + 1)
notify-send "Connect to bluetooth device $names[$input]" (bluetoothctl connect $ids[$input] | string collect)