distribution/packages/jelos/sources/scripts/say

23 lines
375 B
Text
Raw Normal View History

#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
AUDIOTEST=$(ps -ef | grep [p]ipewire)
2023-06-12 21:28:22 +00:00
if [ ! $? = 0 ]
then
PLAYCMD="aplay -q"
else
PLAYCMD="paplay"
fi
case $1 in
-b)
espeak --stdout "$(battery_percent)%" | ${PLAYCMD}
;;
*)
espeak --stdout "$*" | ${PLAYCMD}
;;
esac