Added custom tz support to eww clocks
~/.config/eww/displaytime, if it exists, should be a symlink to a timezone file (like /etc/localtime). When set, clocks will use this timezone instead of system time. The large sidebar clock will show the timezone name when the timezone used was not read from /etc/localtime.
This commit is contained in:
@@ -9,6 +9,9 @@ import sys
|
||||
|
||||
PRIORITY_PLAYERS = {"Feishin"}
|
||||
|
||||
# Override the reported album if the URL is in this dict
|
||||
URL_ALBUM_OVERRIDES = {"https://distantworlds3.space/radio/": "Distant Radio"}
|
||||
|
||||
|
||||
class MprisMonitor(Gio.Application):
|
||||
"""MPRIS monitor application."""
|
||||
@@ -98,7 +101,10 @@ class MprisMonitor(Gio.Application):
|
||||
== Mpris.PlaybackStatus.PLAYING,
|
||||
"title": player.props.title,
|
||||
"artist": player.props.artist,
|
||||
"album": player.props.album,
|
||||
"album": URL_ALBUM_OVERRIDES.get(
|
||||
player.props.metadata.unpack().get("xesam:url", ""),
|
||||
player.props.album,
|
||||
),
|
||||
"album_artist": player.props.album_artist,
|
||||
"position": player.props.position,
|
||||
"position_minutes": int((player.props.position) // 60),
|
||||
|
||||
Reference in New Issue
Block a user