Skip to content
Snippets Groups Projects
Commit 1b2e0b42 authored by Florian Meissner's avatar Florian Meissner
Browse files

wait: return control to mpv after finishing volume increase

parent 65c58503
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,11 @@ set AUDIO_PROFILE output:analog-stereo+input:analog-stereo
set AUDIO_SINK_BASE (string replace card output $AUDIO_CARD)
# --------------------------------------------------------------------------
# https://github.com/fish-shell/fish-shell/issues/5202#issuecomment-423474342
status job-control full
set dB_to_vol (mktemp)
gcc -lpulse -o $dB_to_vol ~/scripts/helpers/wake/dB_to_volume.c || begin; echo 'gcc failed on dB_to_volume.c; status = '$status; exit 1; end;
......@@ -25,9 +30,6 @@ pactl set-default-sink $sink
mpv --loop-playlist $argv &
# TODO catch Ctrl+C or do sth that volume raising is interruptible but we still get mpv console
for i in (LC_NUMERIC= seq -40 0.4 0) #dB
set vol ($dB_to_vol $i)
echo $i '=>' $vol
......@@ -35,4 +37,4 @@ for i in (LC_NUMERIC= seq -40 0.4 0) #dB
sleep $_flag_delta
end
wait
fg
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment