diff options
| author | Josh Rahm <rahm@google.com> | 2023-02-03 12:29:07 -0700 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2023-02-03 12:29:07 -0700 |
| commit | 3217f3969b6f481d957641b04d32ae443243c668 (patch) | |
| tree | edc316ec065d5d03b791c4c1c35892ffcd807109 /extras | |
| parent | f4784b81d36a2b60e66fd4050f2c93aa077ca7f5 (diff) | |
| download | rde-3217f3969b6f481d957641b04d32ae443243c668.tar.gz rde-3217f3969b6f481d957641b04d32ae443243c668.tar.bz2 rde-3217f3969b6f481d957641b04d32ae443243c668.zip | |
Add ability to seek media with shift+next/prev.
Diffstat (limited to 'extras')
| -rwxr-xr-x | extras/HOME/.local/bin/media-control | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/extras/HOME/.local/bin/media-control b/extras/HOME/.local/bin/media-control index c3febcd..cc75f80 100755 --- a/extras/HOME/.local/bin/media-control +++ b/extras/HOME/.local/bin/media-control @@ -49,11 +49,15 @@ fi echo "Sending to taget: $target" function mpris2_dbus_player_do { + method="$1" + shift + dbus-send \ --print-reply \ --dest="$target" \ /org/mpris/MediaPlayer2 \ - "org.mpris.MediaPlayer2.Player.$1" + "org.mpris.MediaPlayer2.Player.$method" \ + "$@" } function mpris2_dbus_get_player_property { @@ -69,6 +73,12 @@ case $1 in "play") mpris2_dbus_player_do PlayPause ;; + "seekf") + mpris2_dbus_player_do Seek "int64: 12000000" + ;; + "seekb") + mpris2_dbus_player_do Seek "int64: -3000000" + ;; "next") mpris2_dbus_player_do Next ;; |