Volume Slider

Moderator: Forum moderators

Post Reply
User avatar
stemsee
Posts: 655
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Volume Slider

Post by stemsee »

standalone volume control using yad frontend
volume_control_slider.png
volume_control_slider.png (13.05 KiB) Viewed 312 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 & 
Post Reply

Return to “Multimedia”