An extension for VS Code to control various media players via MPRIS protocol.
- See the track title with a glance
- Hover over the status bar to see the art, album, and artist
- Control the media player directly from VS Code
This project requires VS Code to function.
It uses D-Bus and MPRIS, so only some platforms and media players are supported. See MPRIS on ArchWiki for more information.
Additionally, building from source requires Node.JS v20 or later.
Via VS Code Marketplace: MPRIS Media Control on VS Code Marketplace.
Via GitHub Releases: MPRIS Media Control Releases.
Build from source:
-
Clone the repository:
git clone https://github.com/esdmr/vscode-mpctl
-
Navigate to the project directory:
cd vscode-mpctl
-
Install the dependencies:
corepack pnpm i --prod
-
Bundle the source code:
corepack pnpm run bundle
-
Package the extension:
corepack pnpm run package --out ./mpctl.vsix
-
Install the extension package:
code --install-extension ./mpctl.vsix
The extension will provide the following:
- A status bar showing the title
- A tooltip showing the art, title, artist, album, and some control buttons
- Several commands to control the player: play, pause, next, previous, stop
- A command to switch the player
- A command to reconnect to D-Bus
git clone https://github.com/esdmr/vscode-mpctl
cd vscode-mpctl
corepack pnpm i
Unlike the installation instructions, you should install every dependency, rather than only the development ones.
corepack pnpm run bundle
Since you are developing the extension, it might be helpful to symlink the built extension, rather than rely on .vsix
packages.
ln -is "$PWD" "$HOME/.vscode/extensions/esdmr.mpctl"
corepack pnpm run typecheck
corepack pnpm run lint
If you would like to contribute, please fork the repository and open a pull request to the main
branch.
This project is provided under the MIT license. Please see the LICENSE
file for details.