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
|
fi
|
||||||
query_string+="${ids[${i}]}: ${descs[${i}]} (${names[${i}]})\n"
|
query_string+="${ids[${i}]}: ${descs[${i}]} (${names[${i}]})\n"
|
||||||
done
|
done
|
||||||
|
[[ -v WAYLAND_DISPLAY ]] \
|
||||||
|
&& prompt_cmd=("fuzzel" "-dp" "${default_id}> ") \
|
||||||
|
|| prompt_cmd=("dmenu" "-p" "${default_id}:")
|
||||||
local choice
|
local choice
|
||||||
choice="$(echo "${query_string%"\n"}" | fuzzel -dp "${default_id}> ")"
|
choice="$(echo "${query_string%"\n"}" | ${prompt_cmd})"
|
||||||
if (( "${?}" != 0 )); then
|
if (( "${?}" != 0 )); then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user