Hyprland opacity rule not working for Thorium

I’m trying to change the opacity of the Thorium web browser in Hyprland by adding

windowrulev2 = opacity 0.80 0.80,class:^(thorium-browser)$

to the configuration file, but it’s not working. This same rule works for Thunderbird, so I’m not sure what’s wrong.

Any tips on what I might be missing? Is it possible that Thorium simply doesn’t support transparency, or am I doing something wrong? I’m not sure what to do next, and I’d appreciate any help you can offer. Thanks!

  • @chaorace
    link
    English
    31 year ago

    That class expression is probably not correct. Can you share some examples of what the initialClass is for your thorium windows?

    You can find this info by executing the following command in bash: hyprctl clients

    If you want to rule out an issue with transparency, you can do something like this to manually set it and see: hyprctl setprop address:0x[ADDRESS] alphainactive 0.5. Note that you need to supply the window address, which can also be found using the aforementioned hyprctl clients command.

    For example, if the command prints this out…

    Window 55fc96242940 -> Hyprland opacity rule not working for Thorium - SDF Chatter - qutebrowser:
    	mapped: 1
    	hidden: 0
    	at: 9,29
    	size: 1136,1402
    	workspace: 2 (2)
    	floating: 0
    	monitor: 0
    	class: org.qutebrowser.qutebrowser
    	title: Hyprland opacity rule not working for Thorium - SDF Chatter - qutebrowser
    	initialClass: org.qutebrowser.qutebrowser
    	initialTitle: about:blank - qutebrowser
    	pid: 1395291
    	xwayland: 0
    	pinned: 0
    	fullscreen: 0
    	fullscreenmode: 0
    	fakefullscreen: 0
    	grouped: 0
    	swallowing: 0
    

    … then the command to manually set the transparency would look like this:

    hyprctl setprop address:0x55fc96242940 alphainactive 0.5

    • @AnokLola@lemm.eeOP
      link
      fedilink
      11 year ago

      I got the opacity rule to work for Thorium by running hyprctl clients and getting the correct class, which is Thorium-browser. However, it also makes videos and pictures transparent, which is kind of annoying.

      • meow
        link
        fedilink
        11 year ago

        I think you’d have to configure transparency from within Thorium, Hyprland can’t know what part of the window is media.