player-ctl plugin that allows for Play, Pause, Next, Previous #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Introduce a dedicated
player-ctlBackslash plugin that exposes play, pause, next, and previous transport controls backed by the systemplayerctlCLI.Motivation
Provide a first-party way to control any MPRIS-compatible media player directly from Backslash. This avoids having to alt-tab into the player, keeps focus in Backslash.
Changes
player-ctlplugin manifest and register the play/pause/next/previous commands.player-ctl/utils.js, including dependency checks and “No media players running” toast handling.clear command search context only when the playerctl command actually executes, ensuring no lingering errors when no player is active.Requires backslash-app/backslash#48and ensures we surface user-friendly toasts instead of crashing when no player is available. Requires backslash-app/backslash#48Dependencies
playerctl(system package; e.g.,sudo apt install playerctlon Debian/Ubuntu.)Demo