Python Forum
Changing the name of a windows class?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing the name of a windows class?
#1
If you have a handle of a window from ANY application, is there a way to rename it's classname?
Reply
#2
For what purpose?
Reply
#3
I'm in Linux, should've mentioned that.

Anyhow, I want to setup custom rules in Picom, telling it to not apply transparency to windows with a certain classname. If you can rename window classes remotely, I can setup a keybinding in my i3 window manager, to apply it to whatever window I just clicked on.

Why?

For example: if I have browser open and a Netflix video playing, I don't necessarily want the background wallpaper showing through. Any other time, I want my browser to have the transparency.
Reply
#4
So you want to rename your browser to something else based on what web page is loaded?

I'm going to show my ignorance here. I'm guessing you are writing a little program that checks if the window is a browser, finds out what web page is viewed, and then changes the name based on if the page is in some list of pages. Picom would then apply a transparency rule based on the name and if the window has focus. Wouldn't it be easier to just set the transparency directly?
Reply
#5
From what I can tell ... It's all based on the windows classname. So, it's pretty generic. So, whatever you do "no transparency, transparency, different transparency level, etc ...", it'd be applied to all, for example, Google-chrome windows. That means, I can't check simply check, like the Window title for Netflix or Youtube or etc ...
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  how can I changing a base class method voidptr 2 2,230 Nov-10-2019, 10:53 PM
Last Post: voidptr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020