idk anymore

This commit is contained in:
Never Gude 2026-01-30 15:27:34 +01:00
parent eb1cf0474c
commit 1f264b5207
10 changed files with 49 additions and 27 deletions

View file

@ -66,7 +66,34 @@ function audio_sink
wpctl set-default $ids[$input]
end
set options "󱂵 Open Location" "󰍬 Select Audio Source" "󰕾 Select Audio Sink"
function network_connection
set options (nmcli --terse --mode multiline connection show | grep "NAME:" | string replace "NAME:" "" | string split "\n")
set input (menu $options)
notify-send "Connect to network $input" (nmcli connection up $input)
end
function 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) + 1)
notify-send "Connect to bluetooth device $names[$input]" (bluetoothctl connect $ids[$input] | string collect)
end
set options "󱂵 Open Location" "󰍬 Select Audio Source" "󰕾 Select Audio Sink" "󰂯 Select Bluetooth" "󰛳 Select Network"
set input (menu $options)
switch $input
@ -78,4 +105,10 @@ switch $input
case $options[3]
audio_sink
case $options[4]
bluetooth_connection
case $options[5]
network_connection
end