Script for polybar to display and control media(not only Spotify) using DBus.

Overview

polybar-now-playing

Script for polybar to display and control media(not only Spotify) using DBus

Python script to display and control current playing media. Includes a way to switch between players. Scrolling text used for metadata(title, artist, album, etc.) and playback button based on spotify-polybar and zscroll.

Demo:

demo

demo

screenshot

Dependencies

Setup & Configuration

  • This script requires a monospace font to work as expected, so adding a monospace font to your polybar config is adviced. After adding the font, update the index in polybar-now-playing file where indicated. Font indices are 1-based so be careful, refer polybar:Fonts.
  • Format of playing track/media details by default is "title - artist". It can be changed by specifying respective field names in metadata_fields list. For more details/ field names, refer mpris sepecification.
# Config options

# (int) : Length of media info string. If length of string exceedes this value,
# the text will scroll. Default value is 20.
message_display_len = 20

# (int) : Font index of polybar. this value should be 1 more than the font
# value specified in polybar config.
font_index = <font index defined in polybar config> + 1


# (float) : Update speed of the text in seconds. Default value 0.3.
update_delay = 0.3

# (list) : list of chars containing previous, play, pause, next glyphs
# for media controls in respective order.
# example:
control_chars = ['','','','']

# (dict) : dict of char icons to display as prefix.
# If player name is available as key, then use the corressponding icon,
# else default.
# example:
display_player_prefix = {
    "spotify":  '',
    "firefox":  '',
    "default":  ''
}

# (list) : list of metadata fields based on mpris sepecification.
metadata_fields = ["xesam:title", "xesam:artist"]

# (char) : separator for metadata fields
metadata_separator = "-"
  • After setting the options, add the following to your polybar config.
[module/now-playing]
type = custom/script
tail = true
;format-prefix = ""
format = <label>
exec = <path/to/script>
click-right = "kill -USR1 $(pgrep --oldest --parent %pid%)"
Owner
Dope Wizard
Dope Wizard
SI_EXPLAINER_tg_bot: This bot is an assistant for medical professionals in interpreting the results of patient clustering.

SI_EXPLAINER_tg_bot This bot is an assistant for medical professionals in interpreting the results of patient clustering. ABOUT This chatbot was devel

Alexander Kanonirov 1 Jan 21, 2022
Telegram bot to stream videos in telegram voicechat for both groups and channels.

Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live streams, YouTube videos and telegram media. With record stream support, Schedule streams, and many more

SOCIAL MECHANIC 4 Nov 13, 2022
Instagram auto reporting tool 100% working

INSTA REPORTER Instagram auto reporting tool 100% working Description this tool is made by Guccifer Shubham (shubhushubhu99) and by using this tool yo

Guccifer Shubham 26 Dec 28, 2022
A VCVideoPlayer Bot for Telegram made with 💞 By @TeamDeeCoDe

VC Video Player How To Host ✨ Heroku Deploy ✨ The easiest way to deploy this Bot is via Heroku. Credit 🔥 |🇮🇳 Louis |🇮🇳 Sammy |🇮🇳 Blaze |🇮🇳 S

TeamDeeCode 6 Feb 28, 2022
An Advance Discord Generator Written in python Verified Email and Phone Number For Free!

Intro An Advance Discord Generator Written in python It can generate nearly fully verified tokens USAGE put server invite code inside ( invitecode = "

36 May 02, 2022
This is a starter template of discord.py project

Template Discord.py This is a starter template of discord.py project (Supports Slash commands!). 👀 Getting Started First, you need to install Python

1 Dec 22, 2021
A discord bot to assist you when playing phasmophobia.

phasbot A discord bot to assist you when playing phasmophobia. Add phasbot to your server here! Bot Commands ?help - shows commands ?info [ghost name]

1 Dec 22, 2021
Google Sheets Python API v4

pygsheets - Google Spreadsheets Python API v4 A simple, intuitive library for google sheets which gets your work done. Features: Open, create, delete

Nithin Murali 1.4k Jan 08, 2023
Automatically changes your discord status

Automatically changes your discord status, Be careful as this may get you rate limited and banned

octo 5 Sep 20, 2022
Web-music-bot - A telegram bot which get a *site Url* and sends all songs contain in the Url to telegram

web music bot this is a telegram bot which get a site Url and sends all songs co

Arya Shabane 4 Apr 02, 2022
This is Pdisk Upload Bot made using Python with Pyrogram Framework. Its capable of uploading direct download link with thumbnail or without thumbnail & with Title Support.

Pdisk-Upload-Bot Introduction This Is PDisk Upload Bot Used To Upload Direct Link To Pdisk With Thumb Support Deploy Heroku Deploy Local Deploy pip in

HEIMAN PICTURES 32 Oct 21, 2022
An instagram bot developed in Python with Selenium that helps you get more Instagram followers.

instabot An instagram bot developed in Python with Selenium that helps you get more Instagram followers. Install You’ll need to have: Python Selenium

65 Nov 22, 2022
Simple screen recorder

Kooha Simple screen recorder Description Kooha is a simple screen recorder built with GTK. It allows you to record your screen and also audio from you

Dave Patrick 1.2k Jan 03, 2023
GUI Pancakeswap V2 and Uniswap V3 trading client (and bot)MOST ADVANCE TRADING BOT SUPPORT WINDOWS LINUX MAC

GUI Pancakeswap 2 and Uniswap 3 trading client (and bot) (MOST ADVANCE TRADING BOT SUPPORT WINDOWS LINUX MAC) UPDATE: MUTI TRADE TOKEN ENABLE ,TRADE 1

2 Dec 27, 2021
Group Chat Spammer For Discord

Group Chat Spammer For Discord Free and public gc spammer

Dreamy 20 Dec 27, 2022
My Discord Bot that I used to learn Python. Please disregard the unstructured code!

Botsche My personal Discord Bot. To run this bot, change TOKEN in config.ini to your Discord Bot Token, which can be retrieved from your Discord Dev

Mats Voss 1 Nov 29, 2021
Query Amalgamator over StackOverflow and YouTube

QASY Query Amalgamator over StackOverflow and YouTube Decription A software you can use to save your valuable time of googling the errors you encounte

1 Nov 07, 2021
Crystal Orb is a discord bot made from discord.py and python

Crystal orb Replacing barbot Overview Crystal Orb is a discord bot made from discord.py and python, Crystal Orb is for anti alt detection and other st

AlexyDaCoder 3 Nov 28, 2021
TrollWare 🤡 is the most advanced Discord Malware & RAT

TrollWare 🤡 TrollWare is the most advanced Discord Malware, with a built-in RAT which can be controlled through a Discord Bot Pinned Note: Please giv

doop 74 Jun 09, 2022
A Python Instagram Scraper for Downloading Profile's Posts, stories, ProfilePic and See the Details of Particular Instagram Profile.

✔ ✔ InstAstra ⚡ ⚡ ⁜ Description ~ A Python Instagram Scraper for Downloading Profile's Posts, stories, ProfilePic and See the Details of Particular In

12 Jun 23, 2022