xrandr-invert-colors icon indicating copy to clipboard operation
xrandr-invert-colors copied to clipboard

devilspie support

Open sharethewisdom opened this issue 9 years ago • 3 comments

hello, I haven't tested this utility thoroughly, but I can imagine that there is a demand for inverted colors on an application-instance basis. For instance, inverting colors on a specific workspace when a specific window has focus on a specified monitor could be usefull. Specifically, I would like to be able to invert the display using devilspie only when firefox is focused, not when the "plugin-container" is focused. Could such an application of this utility be of interest?

sharethewisdom avatar Nov 27 '14 17:11 sharethewisdom

I'd be in interested , if someone else programmed it :-)

gavinengel avatar Nov 27 '14 21:11 gavinengel

Hi,

I see two possible implementations for integration with workspace/application switching:

  • (a). set up some kind of hooks in the window manager, so it runs a program or script when a workspace switch has happened, and call xrandr-invert-colors from there;
  • (b). make xrandr-invert-color listen to events coming from the window manager and toggle color inversion based on the events.

Case (a) can be done with scripts and configuration settings external to xrandr-intert-colors, so I'm tempted to say that it is out of the scope of this project. Documenting the setup process would be nice, and if someone gets it done, I would happily add examples and documentation to this project.

For case (b), a lot of work is needed, and I'm not sure if there exists a solution that supports any desktop-environment, and not just specific ones. Please also note that I lack knowledge in the low-level workings of X11 and related technologies.

Also I wonder if a modern compositor, like compiz, or kwin has a plugin for inverting the colors of exactly one window. Apparently there are some solutions like that: http://askubuntu.com/questions/134668/how-to-trigger-a-color-inversion-effect-for-one-window

zoltanp avatar Dec 04 '14 16:12 zoltanp

thanks for the link... I will check it out.

I admit that a few minutes after opening this issue I wrote a few styles using Gecko filters like html, img{filter: invert(100%)!important}, which is ideal for re-inverting the images. It's not a very useful idea to invert the whole monitor when one window or workspace has focus.

sharethewisdom avatar Dec 17 '14 16:12 sharethewisdom