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
#!/bin/sh | |
name="$1" | |
shift | |
PATHS="org.mpris.MediaPlayer2.$name /org/mpris/MediaPlayer2" | |
DBUS_SEND="dbus-send --type=method_call --dest=$PATHS" | |
RC="$DBUS_SEND org.mpris.MediaPlayer2.Player" | |
if [ "$@" = "prev" ]; then | |
$RC.Previous | |
elif [ "$@" = "stop" ]; then | |
$RC.Pause |
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
#!/usr/bin/env python | |
import sys | |
from os import environ | |
if 'DISPLAY' not in environ: | |
exit(0) | |
name = "rhythmbox" | |
if len(sys.argv) > 1: |