Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added dbus handler to update current player #2157

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

savely-krasovsky
Copy link

@savely-krasovsky savely-krasovsky commented May 5, 2023

It allows to send script a signal to shift current player after playerctld shift command.

Example of my config with it:

  "custom/media": {
    "format": "{icon} {}",
    "format-icons": {
      "firefox": "<span foreground=\"#ff6629\"></span>",
      "chromium": "<span foreground=\"#4688f4\"></span>",
      "tdesktop": "<span foreground=\"#28a9eb\"></span>",
      "spotify": "<span foreground=\"#1d8954\"></span>",
      "vlc": "<span foreground=\"#e76a00\">󰕼</span>"
    },
    "return-type": "json",
    "max-length": 60,
    "escape": true,
    "exec": "$HOME/.config/waybar/scripts/mediaplayer.py 2> /dev/null",
    "on-click": "playerctl play-pause",
    "on-click-right": "playerctld shift; dbus-send --type=signal / org.waybar.Player.Shift",
    "on-scroll-up": "playerctl next",
    "on-scroll-down": "playerctl previous"
  }

style.css:

#custom-media {
	background: #404040;
	padding: 0 .7em;
}
#custom-media.custom-firefox {
	color: #febf37;
}
#custom-media.custom-chromium {
	color: #91b0e8;
}
#custom-media.custom-tdesktop {
	color: #b3dae9;
}
#custom-media.custom-spotify {
	color: #66DC69;
}
#custom-media.custom-vlc {
	color: #febf37;
}
Kooha-2023-05-05-21-41-42.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant