Skip to content

Commit 0ca0f01

Browse files
committed
Add player name to tooltip header
- Display current player name at top of tooltip (e.g., [SPOTIFY], [FIREFOX]) - Shows which media source is currently being monitored - Helps identify active player when multiple are available
1 parent fd02b14 commit 0ca0f01

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/mediaplayer

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,12 +544,16 @@ def update_progressbar(manager, player):
544544
if t == lyrics_ix:
545545
curr_line = len(s) - 1
546546
# -- Tooltip
547+
# Get player name for tooltip header
548+
player_name = player.props.player_name.upper()
547549
# Check if album is empty before centering
548550
has_album = s[2].strip() != ""
549551
center_text(s, text_len)
550552
if curr_line:
551553
s[curr_line] = "<b>" + s[curr_line] + "</b>"
552-
tooltip = f"<span variant='title-caps' font_weight='bold'>{s[0]}</span>"
554+
# Add player name at the top
555+
tooltip = f"<span font_weight='bold' size='small'>[{player_name}]</span>\n"
556+
tooltip += f"<span variant='title-caps' font_weight='bold'>{s[0]}</span>"
553557
tooltip += f"\n{s[1]}"
554558
# Skip album in tooltip if we don't have it
555559
if has_album:

0 commit comments

Comments
 (0)