[PATCH] update device-specific logic to support more platforms
Export this patch
accounts for device info path on arch linux arm
---
scripts/f_audio | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/scripts/f_audio b/scripts/f_audio
index 26d4e31..826cc32 100755
--- a/scripts/f_audio
+++ b/scripts/f_audio
@@ -49,11 +49,14 @@ devicepine64pinephone() {
main() {
local RUN OPTS
env | grep -q "^$(basename "$0" | tr '[a-z]' '[A-Z]')=" || eval "$VAR"
- eval "$(grep deviceinfo_codename /etc/deviceinfo | cut -d= -f2 | tr -d \"- | xargs -ID echo deviceD)"
+eval "$(
+ grep -E 'deviceinfo_codename|PRETTY_HOSTNAME' /etc/deviceinfo /etc/machine-info |
+ cut -d= -f2 | tr '[:upper:]' '[:lower:]' | tr -d ' \"-' |
+ xargs -ID echo deviceD
+)"
OPTS="speaker headphone earpiece volup voldown"
[ -p /tmp/fbp.fifo ] && { echo -e "\b\f\r"; echo "$OPTS" | tr " " "\n"; } > /tmp/fbp.fifo
while true; do
- clear
statustext
read -p "Run ($OPTS)" RUN
"$RUN"
--
2.37.3