Enable dark theme in Linux

mmplx
  • Plan

Premium

Country

Argentina

Device

HP Envy x360

Operating System

Ubuntu 20.10 / Fedora 33

 

My Question or Issue

 

The app should request a dark theme so that server side decorations are not light when the GNOME is configured with its default Adwaita theme  (or any other light theme). The combination of a light titlebar with Spotify dark contents is very unaesthetic and there have been a number of complaints regarding this for years.

 

Check https://gitlab.gnome.org/GNOME/gtk/-/issues/99, it's just setting a GTK property.

 

Check 

 

Thanks, Carlos

 

 

 

Reply
12 Replies

Sanras

Haha, big expectations here. They can't be bothered to fix the Spotify app to not segfault when adding a local source, or have working album covers with MPRIS, so I can't see them adding GTK property support anytime soon.

lollilol01

**bleep** they really want me to cancel

francie00
What is your issue with MPRIS album covers? they work just fine on my machine

JasonLG1979

What DE and MPRIS control widget are you using?

francie00
I'm on dwm.
I was talking about notifications, which work fine on my end, meaning they have got album art on them.

JasonLG1979

Notifications are not the same thing as MPRIS.

JasonLG1979

Notifications and MPRIS are 2 completely different and separate DBus interfaces. The DE/system owns and operates the notification interface (there is generally only one notification interface) and applications own and operate their own separate MPRIS interfaces (there are as many as there are players).

Basically from a server client prescriptive the notification interface is a server and applications are clients. With MPRIS on the other hand, applications are servers and MPRIS control widgets are clients.

francie00
You're right, sorry for the misunderstanding.
Anyways, this DBus command which uses the MPRIS interface gives me the currently playing song's album art URL:
```
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:"org.mpris.MediaPlayer2.Player" string:'Metadata' | grep -Ev "^method" | grep -Eo '("(.*)")|(\b[0-9][a-zA-Z0-9.]*\b)' | sed -E '2~2 a|' | tr -d '\n' | sed -E 's/\|/\n/g' | sed -E 's/(xesam:)|(mpris:)//' | sed -E 's/^"//' | sed -E 's/"$//' | sed -E 's/"+/|/' | sed -E 's/ +/ /g' | grep -Ew 'artUrl' | sort | cut -f2 -d'|' | paste -s -d'-' | sed 's/-/ - /'
```

JasonLG1979

And that will give you an url that begins with https://open.spotify.com/ which will not work.

JasonLG1979

You'll need to do a string replace to fix the url. Replace `open.spotify.com` with `i.scdn.co`.

francie00
Thanks for the suggestion, I could use it in one of my scripts!

JasonLG1979

As far as setting the title bar to a dark theme variant goes, this is one of the bugs/papercuts that the unofficial flatpak works around.

I actually wrote the script that fixes this issue in the flatpak wrapper.
 https://github.com/flathub/com.spotify.Client/blob/master/set-dark-theme-variant.py

Suggested posts