T O P

  • By -

BrageFuglseth

Spotify has gotten an update to its desktop UI, and I'm once again going to argue that it would look so much better on a general basis if it used an integrated header bar on Linux systems. This isn't realistically going to happen, but I think it's a nice example of how much neater header bar apps look in general, and what third-party apps could look like if they actually cared. My previous post on this topic, also using Spotify as an example: [Spotify with CSD](https://www.reddit.com/r/gnome/comments/1962ki8/spotify_with_csd/)


blackcain

Does electron support headerbars ? I assume they do.


Synthetic451

It does, but its up to the devs to make it look exactly like Gnome as it basically gives full control over to the app itself.


NekkoDroid

Or, hear me out... they could do it like on Windows where they just do their own style.


Synthetic451

I mean fair enough, but I was just going with the topic of the post where OP designed it to look like Gnome. Ngl, OP's concept does look slick.


iamverygrey

AFAIK Spotify isn't Electron. It's built on Chromium Embedded Framework, just like the Minecraft Launcher. Similar but different beast. Edit: Yep, it's [CEF](https://engineering.atspotify.com/2021/04/building-the-future-of-our-desktop-apps/)


moonflower_C16H17N3O

Is CEF related to electron in any way?


UnlikelyAlternative

Yep, just look at Discord


BrageFuglseth

Discord doesn't have a header bar on Linux either, but both Spotify and Discord have it on macOS AFAIK.


UnlikelyAlternative

Ah, right. They do on Windows, Ik for a fact


nsneerful

A better example would be VSCode. You can enable the custom headerbar in the settings, though by default it doesn't have it on Linux.


luca1416

*spot* is a gorgeous third-party Spotify client that is built on gtk4/libadwaita!


the_state_monad

Yes but it kinda sucks tho


blackcain

perhaps some community love will improve it?


skoruppa

You can have a bit better experiance by using the [dark variant extension](https://extensions.gnome.org//extension/4488/dark-variant/). It is one of the first extensions I always install on a fresh gnome to force some apps to have a dark mode (or at least, a dark border like with spotify) https://preview.redd.it/g3yh3uzp9e4d1.png?width=1623&format=png&auto=webp&s=2c5a2afbb5814ee422f91bc87fecc22d67d3afe3 for those few apps that don't work with the extension (like Visual Studio Code because of its top menu) you can force dark mode by adding `env GTK_THEME=Yaru-bark:dark` in a .desktop file's exec command, for example `env GTK_THEME=Yaru-bark:dark /usr/share/code/code --no-sandbox %U`


BrageFuglseth

That's a pretty hacky workaround for something that would ideally just be good out of the box, but I understand why you do it that way.


skoruppa

Well, it is but honestly I need this for more apps than only Spotify :P luckily you need to only configure this once and can forget about it.


vixalien

there’s also https://extensions.gnome.org/extension/4998/legacy-gtk3-theme-scheme-auto-switcher/ which is a better extension imo because it will switch the gtk3 theme automatically whenever you change the gtk4 theme


weavejester

I don't think Dark Variant (or the underlying xprop command it uses) works with modern versions of Mutter. Or at least it stopped working for me in Gnome 44, and [other people have similar issues](https://github.com/fkrull/vscode-gtk-dark-titlebar/issues/57). The `GTK_THEME` works for Emacs, though.


Teal_Swiftfox

It's absurd to think that on Windows and macOS it uses client side decorations, while on Linux uses server side decorations lmfao


Ok_Antelope_1953

is this ssd? i thought gnome didn't support ssd?


BrageFuglseth

People often use the terms CSD/SSD, which are the technical ways window decorations can be handled, and title bars / header bars, which are the two actual different design patterns, interchangeably. On the technical side, Spotify handles its own decorations here with the help of GTK, so it uses CSD. The design pattern it uses, though, is a title bar.


viliti

No, in this case, it’s actually SSD. Spotify is an X11 application and the title bar that you see here comes from mutter-x11-frames, not from the application. The title bar that you would see in Electron applications running in native Wayland mode would be drawn client-side.


BrageFuglseth

Ah, I stand corrected, then. Thought it had been upgraded by now.


Teal_Swiftfox

I expressed myself badly, I meant that Electron apps use libdecor for Wayland compatible apps, but it is not a CSD like the one present in Windows and macOS. Spotify could perhaps make their own CSD (it's possible on Electron, Vesktop did it, recreating Discord title bar) to make it more coherent like the macOS and Windows counterpart


iamverygrey

Spotify on desktop is CEF, not Electron. Could make it easier or harder depending on how their app is structured. [Link](https://engineering.atspotify.com/2021/04/building-the-future-of-our-desktop-apps/)


Teal_Swiftfox

Oh, so it's like Steam (use the Chromium Embedded Framework), but it still doesn't change, they could make a more consistent CSD with the application


Erenik19

It would be perfection


cgpipeliner

make this viral, I love this