Skip to content

About

GNOME Shell extension: shows on the dock whether the song in the YouTube Music desktop app is liked, with like/dislike shortcuts

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

YouTube Music Like Indicator

A GNOME Shell extension that shows on the dock icon of the YouTube Music desktop app (th-ch/youtube-music, now Pear Desktop) whether the song that's playing is liked.

  • Red heart: the song is liked. Outline: it isn't. Broken heart: it is disliked.
  • Shift+Super+L likes the song or removes the like.
  • Shift+Super+D dislikes the song (the app then skips it) or removes the dislike.
  • The heart is hidden when the app isn't running or nothing is playing.

The heart sits on the app's icon in Ubuntu Dock or Dash to Dock. Without one of those docks it shows in the top bar instead, where clicking it likes the song. The dock heart relies on how those docks build their icons, so a dock update can break it; the extension then falls back to the top bar.

It talks to the app's built-in API Server plugin over localhost, so it needs no Google account or API key.

Supports GNOME Shell 48, 49 and 50.

Setup

  1. In the YouTube Music app, open Plugins → API Server and enable it. Keep the authorization strategy on Auth at first and set the hostname to 127.0.0.1, so the API is not reachable from your network.

  2. Install the extension:

    git clone https://github.com/NealimeKenna/ytmusic-like-indicator.git
    cd ytmusic-like-indicator
    make install
  3. Log out and back in (on Wayland GNOME Shell only picks up new extensions at login), then enable it:

    gnome-extensions enable ytmusic-like-indicator@nealimekenna.github.com
  4. A dimmed heart appears in the top bar while the extension is not yet allowed to use the API. Click it (or press one of the shortcuts) and choose Allow in the dialog the app shows.

Settings

Open them with gnome-extensions prefs ytmusic-like-indicator@nealimekenna.github.com:

  • the like and dislike shortcuts,
  • the host and port of the API Server plugin (default 127.0.0.1:26538),
  • forgetting the access token, so the next click asks the app for access again.

KDE Plasma

The kwin folder holds a KWin script for Plasma 6 that puts the same heart on the app's icon in the task manager.

  • Red heart: liked. Outline: not liked. Broken heart: disliked. No heart: the app isn't running or nothing is playing.
  • Shift+Meta+L likes the song or removes the like, Shift+Meta+D dislikes it or removes the dislike. Both can be changed in System Settings, Keyboard → Shortcuts → KWin.
  • The heart is hidden while a full-screen window is active.

The heart's position comes from the icon geometry the task manager reports to KWin, the same one the minimize animation uses.

Setup:

  1. Enable the app's API Server plugin as in step 1 above.
  2. Install and enable the script with make kwin-install, then log out and back in. KWin caches the script's QML, so updates also take effect at the next login.
  3. The app asks once to allow kwin-like-indicator; choose Allow. After that it hands the script a token without asking.

The script reads the API host and port from kwinrc, group Script-ytmusic-like-indicator, keys host and port (default 127.0.0.1:26538).

License

GPL-2.0-or-later

About

GNOME Shell extension: shows on the dock whether the song in the YouTube Music desktop app is liked, with like/dislike shortcuts

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages