Simple program that keeps the order of the last used players
Project description
lastplayer
Simple program that keeps track of the last used MPRIS2 players.
How?
It prints the order of the players, from most recent to last recent, on a single
line on stdout
any time a player appears or disappears. The most recent list
of players is also written at /tmp/lastplayer
.
Why?
You can use this program to control from keybinds the most recently opened multimedia player, using for example a program like playerctl.
Using the same technique, you may control another player based on the order of when it was started.
Example
Start lastplayer
beforehand:
lastplayer &
Toggle the playing state of the most recent player:
#!/bin/sh
player="$(cat /tmp/lastplayer | head -n 1)"
playerctl -p $player play-pause
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file lastplayer-0.0.1.tar.gz
.
File metadata
- Download URL: lastplayer-0.0.1.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d44a7e6962dbbe860718849a231cfc31d0fd5f646daee0821d13fa9f6c32fa1 |
|
MD5 | e8309565f7c78e5492e626650dcc0cbf |
|
BLAKE2b-256 | a2bff98f01a4b0be01467acd25c9e9fa339d8bcab14e71a1034f27b89ca2a385 |
File details
Details for the file lastplayer-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: lastplayer-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e20401a86db719bd4897a7d78267b90a1f900424a617838c32f9bc7dd8029958 |
|
MD5 | 1fe32e2c17cbf97f96e69af78bb77eb5 |
|
BLAKE2b-256 | bd862246633f48c6327d01be185f1151c1eafbb071377d41cabaccaf4f374912 |