Yet another chance for wayland.
This commit is contained in:
parent
8f66f01f9c
commit
ef6e63926d
15 changed files with 40 additions and 15 deletions
|
@ -3,7 +3,7 @@
|
|||
div="---"
|
||||
|
||||
set_output() {
|
||||
sel_sink=$(printf "$sinks\\n$div\\nback\\n$div\\nexit" | dmenu -l 20 -c -i -p "select output device")
|
||||
sel_sink=$(printf "$sinks\\n$div\\nback\\n$div\\nexit" | wofi -G -dmenu -i -p "select output device")
|
||||
case "$sel_sink" in
|
||||
back) show_current ;;
|
||||
exit) exit ;;
|
||||
|
@ -14,7 +14,7 @@ set_output() {
|
|||
}
|
||||
|
||||
set_input() {
|
||||
sel_source=$(printf "$sources\\n$div\\nbluetooth profile\\n$div\\nback\\n$div\\nexit" | dmenu -l 20 -c -i -p "select input device")
|
||||
sel_source=$(printf "$sources\\n$div\\nbluetooth profile\\n$div\\nback\\n$div\\nexit" | wofi -G -dmenu -i -p "select input device")
|
||||
case "$sel_source" in
|
||||
back) show_current ;;
|
||||
exit) exit ;;
|
||||
|
@ -29,7 +29,7 @@ set_bt_profile() {
|
|||
bt_sink=$(pactl list cards | awk -F'"' '/device.name.*bluez/ {print $2}')
|
||||
[ -z "${bt_sink}" ] &&
|
||||
{ notify-send -t 2000 -u critical "ﳌ no headphones connected"; exit; }
|
||||
profile_chosen=$(printf "profile mSBC\\nprofile LDAC\\n$div\\nback\\nexit" | dmenu -l 20 -c -i -p "select bluettoth profile")
|
||||
profile_chosen=$(printf "profile mSBC\\nprofile LDAC\\n$div\\nback\\nexit" | wofi -G -dmenu -i -p "select bluettoth profile")
|
||||
case "$profile_chosen" in
|
||||
back) show_current ;;
|
||||
exit) exit ;;
|
||||
|
@ -44,7 +44,7 @@ set_bt_profile() {
|
|||
show_current() {
|
||||
def_snk=$(pactl list | grep -A 1 "Name: $(pactl get-default-sink)\$" | awk -F': ' '/Description: / {print $2}')
|
||||
def_src=$(pactl list | grep -A 1 "Name: $(pactl get-default-source)\$" | awk -F': ' '/Description: / {print $2}')
|
||||
chosen=$(printf "output: $def_snk\\ninput: $def_src" | dmenu -l 20 -c -i -p "current audio devices")
|
||||
chosen=$(printf "output: $def_snk\\ninput: $def_src" | wofi -G -dmenu -i -p "current audio devices")
|
||||
if [ "$1" = "no_switch" ]; then
|
||||
case "$chosen" in
|
||||
*) notify-send -t 2000 -u critical "婢 no device to switch" ;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue