Make select-sound-output.sh work on both x and wayland
This commit is contained in:
parent
59dfe1565b
commit
8b171ea6ff
@ -12,8 +12,11 @@ for ((i = 1; i <= "${#ids}"; ++i)); do
|
||||
fi
|
||||
query_string+="${ids[${i}]}: ${descs[${i}]} (${names[${i}]})\n"
|
||||
done
|
||||
[[ -v WAYLAND_DISPLAY ]] \
|
||||
&& prompt_cmd=("fuzzel" "-dp" "${default_id}> ") \
|
||||
|| prompt_cmd=("dmenu" "-p" "${default_id}:")
|
||||
local choice
|
||||
choice="$(echo "${query_string%"\n"}" | fuzzel -dp "${default_id}> ")"
|
||||
choice="$(echo "${query_string%"\n"}" | ${prompt_cmd})"
|
||||
if (( "${?}" != 0 )); then
|
||||
exit
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user