2023-06-12 21:23:01 +00:00
|
|
|
#!/bin/bash
|
2023-10-23 22:44:47 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2023-10-24 16:00:57 +00:00
|
|
|
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
2023-06-12 21:23:01 +00:00
|
|
|
|
|
|
|
. /etc/profile
|
|
|
|
|
2023-08-11 15:07:58 +00:00
|
|
|
AUDIOTEST=$(ps -ef | grep [p]ipewire)
|
2023-06-12 21:28:22 +00:00
|
|
|
if [ ! $? = 0 ]
|
|
|
|
then
|
|
|
|
PLAYCMD="aplay -q"
|
|
|
|
else
|
|
|
|
PLAYCMD="paplay"
|
|
|
|
fi
|
2023-06-12 21:23:01 +00:00
|
|
|
|
|
|
|
case $1 in
|
|
|
|
-b)
|
|
|
|
espeak --stdout "$(battery_percent)%" | ${PLAYCMD}
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
espeak --stdout "$*" | ${PLAYCMD}
|
|
|
|
;;
|
|
|
|
esac
|