-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |