*FvwmButton: (22x2, Title(Side) " Audio Mixer", Center, Id “Vol”, Icon stock_volume.png, Action(Mouse 1) Exec exec gnome-alsamixer
,
Action(Mouse 4) Exec amixer -q -c 0 -- sset Master 2+
,
Action(Mouse 5) Exec amixer -q -c 0 -- sset Master 2-
,
Action(Mouse 3) Exec amixer -q -c 0 -- sset Master toggle
)
DestroyFunc CHANGE_TITLE
AddToFunc CHANGE_TITLE
- I SendToModule FvwmShelf ChangeButton $0 Title " $1 $2"
And the part of the Script calling this function:
If $mute == on Then
Begin
If $chvol == 1 Then
Begin
If $volume == 0 Then
Do {CHANGE_ICON Vol audio-volume-muted.png}
If $volume > 0 Then
Do {CHANGE_ICON Vol audio-volume-low.png}
If $volume >= 33 Then
Do {CHANGE_ICON Vol audio-volume-medium.png}
If $volume >= 66 Then
Do {CHANGE_ICON Vol audio-volume-high.png}
Do {CHANGE_TITLE Vol " "Volume (} $volume {%)}
End
End
Else
Begin
If $chmute == 1 Then
Do {CHANGE_ICON Vol audio-volume-muted.png}
End