Crates.io | waybar_media_display |
lib.rs | waybar_media_display |
version | 1.0.5 |
source | src |
created_at | 2022-07-29 04:04:08.495813 |
updated_at | 2022-07-31 05:03:34.189188 |
description | Waybar Media Display Module using playerctl |
homepage | |
repository | https://github.com/MichaelPetersen22/waybar_modules.git |
max_upload_size | |
id | 634821 |
size | 12,062 |
With Pre-Requisites already installed
cargo install waybar_media_display
Alternatively you can just run
curl https://raw.githubusercontent.com/MichaelPetersen22/waybar_modules/main/media_install.sh -sSf | sh
If you want to also install the font used with the default icon option (The spotify icon), run the below script
curl https://raw.githubusercontent.com/MichaelPetersen22/waybar_modules/main/media_install.sh| bash -s -- yes
cargo
curl https://sh.rustup.rs -sSf | sh
playerctl
sudo pacman -S playerctl
otf-font-awesome
sudo pacman -S otf-font-awesome
The command is not intended to be used on it's own as it prints back a json for waybar to read and convert into the module.
Example usage in waybar config is included below
"custom/spotify": {
"interval": 1,
"return-type": "json",
"exec": "waybar_media_display",
"exec-if": "pgrep spotify",
"on-click":"playerctl --player=spotify play-pause",
"escape": true
}
Pay special attention to the "exec" field as that is where the module is called.
The example utilizes the defaults of the media display, however you can provide it with any media player supported by playerctl, and you can provide it any text or font that you wish for the icon.
For my spotify icon I used otf-font-awesome
For details on how to use the command and the default values of the command, run waybar_media_display --help