Page 1 of 1

Volume Slider

Posted: Fri Aug 07, 2020 10:58 am
by stemsee
standalone volume control using yad frontend
volume_control_slider.png
volume_control_slider.png (13.05 KiB) Viewed 329 times

Code: Select all

#/bin/sh
# by stemsee
card=$(amixer -D default scontrols | head -1 | cut -f2 -d"'")
card=$(echo \'$card\')
dev=default
export Vol=$(amixer -M get Master | awk -v FS="[[%]" '/%/ {print $2}')
yad --title="Volume Control" --width=400 \
--no-buttons --horizontal --on-top --scale --print-partial \
--value=$Vol | while read line; do amixer -D $dev sset "$card" ${line}% ; sleep 0.01; done &