snwh / paper-gtk-theme

Paper Theme Suite
http://snwh.org/paper
GNU General Public License v3.0
1.01k stars 90 forks source link

Different HeaderBar colors for Web apps #104

Closed bllngr closed 8 years ago

bllngr commented 9 years ago

In Fedora, it's possible to install Web apps based on Epiphany's kiosk mode using GNOME Software (rhbz#710112. These install as desktop files in ~/.local/share/applications/epiphany-*.desktop, which include this line:

StartupWMClass=epiphany-googlemaps.desktop-${HASHVALUE}

The WM_CLASS can be queried using:

$ xprop WM_CLASS
WM_CLASS(STRING) = "epiphany-googlemaps.desktop-${HASHVALUE}", "epiphany-googlemaps.desktop-${HASHVALUE}"

I don't know if it's possible, but it would be great if the WM_CLASS could be used for styling the header bars with indivual colors based on the Web app, similar to Lollipops recent apps view:

3b174a200f0939305e9b92d34a4837ff

More information: https://blogs.gnome.org/xan/2011/08/31/web-application-mode-in-gnome-3-2/ https://bugzilla.gnome.org/show_bug.cgi?id=710112 https://askubuntu.com/questions/367396/what-represent-the-startupwmclass-field-of-a-desktop-file

snwh commented 9 years ago

Yeah, that's impossible. The webapp's headerbar is still Web/Epiphany's.

The multi-coloured headerbars in Paper is simply due to some significant hackery & poking around that I've done.

dehen commented 9 years ago

So how are you actually finding the element names for the headerbars on a per-app basis? Havf you been digging in the code? I was trying to change nuvola3's headerbar color this morning and I thought xprop would help me. I was veryvery wrong.

To the OP. You can actually get a real nice Paper effect through the use of the "fabtabs" extension on firefox and significant css hackery. Fabtabs grabs a quick screenshot of a page and pulls out the dominant color, and colors the tab. Unfortunately it comes with a bunch of gradient cruft that needs to be userstyled out. test

snwh commented 9 years ago

Recolouring is sometimes possible based whether or not an application has a unique top-level Gtk class/name

snwh commented 8 years ago

Closing this