No description
  • C 99.2%
  • Meson 0.8%
Find a file
Otávio Ribeiro c89b72d853 clean
2026-07-03 19:48:43 +00:00
docs fix 2025-05-11 23:57:42 -03:00
.gitignore .gitignore 2025-05-12 00:14:49 -03:00
main.c logging cleanning 2025-12-29 11:50:45 -03:00
media_controller.c remove duplicated destroy 2026-05-25 11:49:51 -03:00
media_controller.h playerctl dependency removed - using MPRIS instead 2025-12-27 23:51:27 -03:00
meson.build playerctl dependency removed - using MPRIS instead 2025-12-27 23:51:27 -03:00
mpris_media_manager.c crashing with no album art 2026-03-27 08:11:04 -03:00
mpris_media_manager.h playerctl dependency removed - using MPRIS instead 2025-12-27 23:51:27 -03:00
mpris_media_player.c crashing with no album art 2026-03-27 08:11:04 -03:00
mpris_media_player.h playerctl dependency removed - using MPRIS instead 2025-12-27 23:51:27 -03:00
README.md fix README documentation 2026-03-21 08:43:17 -03:00
waybar_cffi_module.h initial 2025-05-11 17:48:58 -03:00
waybar_mediaplayer.h playerctl dependency removed - using MPRIS instead 2025-12-27 23:51:27 -03:00

Waybar Media Player CFFI module

Example

  • Support for multiple players
  • Previous and Next buttons when supported
  • Progress bar
  • will show only when a player becomes available
  • Compact: Titles will scroll

Usage

Cloning repository

git clone https://github.com/otaviojr/waybar_mediaplayer.git waybar_mediaplayer
cd waybar_mediaplayer

Building this module

meson setup build
meson compile -C build
cp build/waybar_mediaplayer.so /home/<user>/.config/waybar/scripts

Dependencies

  • Latest waybar version ( Arch: use the git version )

Load the module

Edit your waybar config:

{
	// ...
	"modules-center": [
		// ...
		"cffi/mediaplayer"
	],
	// ...
	"cffi/mediaplayer": {
		// Path to the compiled dynamic library file
		"module_path": "/home/<user>/.config/waybar/scripts/waybar_mediaplayer.so"
		"scroll-title": true,
		"scroll-interval": 200,
		"scroll-before-timeout":5,
		"title-max-width": 200,
		"scroll-step": 2
		"tooltip": true,
		"tooltip-image-width": 300,
		"tooltip-image-height": 300,
		"btn-play-icon": "",
		"btn-pause-icon": "",
		"btn-prev-icon": "",
		"btn-next-icon": "",
		"ignored-players": "playerctl"
	}
}

Customizing

Edit your style.css

#media_player {
    color: red;
}

#media_player .button {
    color: white;
    background: transparent;
    border-width: 0px;
    border-radius: 0px;
    margin: 0px;
    padding: 0px;
    box-shadow: none;
    text-shadow: none;
}

#media_player .play-button{
}

#media_player .prev-button {
}

#media_player .next-button {
}

#media_player .players {
     color: white;
}

#media_player .title {
     color: white;
}