Skip to content

Commit

Permalink
Add playerctl test script
Browse files Browse the repository at this point in the history
  • Loading branch information
Sinono3 committed Jan 2, 2024
1 parent 5c5db70 commit 704e812
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/playerctl_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh
# This scripts requires playerctl and dbus-send

alias playerctl="playerctl -p my_player "

playerctl metadata
playerctl play
playerctl pause
playerctl play-pause
playerctl next
playerctl previous
playerctl stop
playerctl position 30
playerctl position 10-
playerctl position 10+
playerctl volume 0.5
playerctl open "https://testlink.com"
# TODO: Shuffle and repeat.
# playerctl shuffle
# playerctl repeat

# The following are commands not supported by playerctl, thus we use dbus-send
call() {
dbus-send --dest=org.mpris.MediaPlayer2.my_player --print-reply /org/mpris/MediaPlayer2 "$1"
}

call org.mpris.MediaPlayer2.Raise
call org.mpris.MediaPlayer2.Quit

0 comments on commit 704e812

Please sign in to comment.