Skip to content

Scripts switch between players using MPRIS D-bus specification. Made as workaround for distros using Gnome in order to use mediakeys regardless of their default priority.

License

Notifications You must be signed in to change notification settings

salazarbarrera/mpris-switcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mpris-switcher

Scripts switch between players using MPRIS D-bus specification. Made as workaround for distros using Gnome in order to use mediakeys regardless of their default priority.

How to use

The scripts require the commands python (associated to Python 3), zenity and dbus-send.

Place all the files in the same directory.

The script to switch players is:

$sh mpris_switch.sh

which will prompt a Zenity form listing all the available players (documentation).

The commands to control the selected player are:

$sh mpris_controler.sh PlayPause

$sh mpris_controler.sh Next

$sh mpris_controler.sh Previous

$sh mpris_controler.sh Stop

You can create a key binding to trigger the scripts. For example, mapping multimedia keys such as XF86AudioPlay, XF86AudioStop, XF86AudioPrev and XF86AudioNext, or using modifiers to create keyboard shortcuts (e.g. Alt+Stop, or Alt+Fn+Right in some laptops).

Disclaimer

These scripts where made for personal use and aren't tested in more machines than mine. All files must be in the same directory to work.

About

Scripts switch between players using MPRIS D-bus specification. Made as workaround for distros using Gnome in order to use mediakeys regardless of their default priority.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published