forked from Arsen6331/infinitime
Merge pull request 'replace pactl based volume control with mpris based volume control' (#6) from FloralExMachina/infinitime:master into master
Reviewed-on: Arsen6331/infinitime#6master
commit
0c369dc5df
@ -1,16 +0,0 @@
|
||||
package player
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
// VolUp uses pactl to increase the volume of the default sink
|
||||
func VolUp(percent uint) error {
|
||||
return exec.Command("pactl", "set-sink-volume", "@DEFAULT_SINK@", fmt.Sprintf("+%d%%", percent)).Run()
|
||||
}
|
||||
|
||||
// VolDown uses pactl to decrease the volume of the default sink
|
||||
func VolDown(percent uint) error {
|
||||
return exec.Command("pactl", "set-sink-volume", "@DEFAULT_SINK@", fmt.Sprintf("-%d%%", percent)).Run()
|
||||
}
|
Loading…
Reference in new issue