Volume Slider

Moderator: Forum moderators

Post Reply
User avatar
stemsee
Posts: 779
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 185 times
Been thanked: 131 times

Volume Slider

Post by stemsee »

standalone volume control using yad frontend
volume_control_slider.png
volume_control_slider.png (13.05 KiB) Viewed 403 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”