summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-10-27 23:13:58 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-10-27 23:13:58 +0800
commit4e3dcc02d5f76111dda489c88fc15b9bea659898 (patch)
tree35df30bcfb706ac9dd5a1bfad3bb5bf3a2ce4572
parentf6e52f56cfe8c37decb05b0b92cf8e0aa38e9d5c (diff)
feat: make audio be exact after the transition
change: chromium -> firefox
-rwxr-xr-xaudio-autoAdjust.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/audio-autoAdjust.sh b/audio-autoAdjust.sh
index 7ce91fb..aed379b 100755
--- a/audio-autoAdjust.sh
+++ b/audio-autoAdjust.sh
@@ -17,6 +17,7 @@ function lower_music() {
playerctl -p spotify volume 0.$i
sleep 0.01
done
+ playerctl -p spotify volume 0.$OTHERPLAYER_MUSIC_PERCENTAGE
}
function normal_music() {
@@ -24,6 +25,7 @@ function normal_music() {
playerctl -p spotify volume 0.$i
sleep 0.01
done
+ playerctl -p spotify volume 0.$NORMAL_MUSIC_PLAYER_PERCENTAGE
}
if [ "$1" ]; then
@@ -33,7 +35,7 @@ if [ "$1" ]; then
elif [[ "$1" == '--daemon' || "$1" == '-d' ]]; then
while true; do
if [[ "$(systemctl is-system-running)" == "running" || "$(systemctl is-system-running)" == "degraded" ]]; then
- if [[ $(playerctl status -p chromium) == "Playing" ]]; then
+ if [[ $(playerctl status -p firefox) == "Playing" ]]; then
if [ $STATE -eq 0 ]; then
STATE=1
echo VideoDetected