Git Product home page Git Product logo

Comments (13)

vn971 avatar vn971 commented on September 5, 2024

Hi. Regarding xcalib. Unfortunately, it deals with each color separately -- an approach that can only lead to RGB inversion, but not anything smarter. See this section on alternatives: https://github.com/vn971/linux-color-inversion#alternatives-future-work

Regarding Unity. Maybe you can just use compton with it? I haven't tried to be honest (XFCE user here), but I think it could work? If you'll try to install&use compton, please tell me how it goes!

from linux-color-inversion.

log69 avatar log69 commented on September 5, 2024

Digging into the the topic:

  • tried compton, no success
  • cannot replace unity with compiz
  • investigated the xcalib source and as you said it, smart inversion cannot be achieved by that
  • checked a gnome shell extension ( https://github.com/maiself/gnome-shell-extension-invert-color/ ) but I still can't see much chance here as well to make the plain inversion to smart, I've written to the author though asking this question
  • now checking this Firefox addon which does smart inversion, works flawlessly: https://addons.mozilla.org/en-US/firefox/addon/nightreader/ - it was a luck that I found it, it doesn't appear in the list when search for the invert keyword, but it does bring it up when I search for "hue"

Will let you know when progress farther.

from linux-color-inversion.

vn971 avatar vn971 commented on September 5, 2024

@log69 thanks, that's very interesting. I actually knew about the firefox add-on -- just don't use it personally. I think it makes all the sense to add it to the main description -- thanks a lot for bringing this up!

from linux-color-inversion.

log69 avatar log69 commented on September 5, 2024

Yeah, the addon is good and a viable solution because the CSS engine can do hue manipulations by default. Well, keep up the good work.

from linux-color-inversion.

log69 avatar log69 commented on September 5, 2024

Just found a complete solution for desktops using the Gnome shell. Using the shell extension above and patching its code makes it work perfectly. Steps:

  1. download Gnome shell extension from here:
    https://github.com/maiself/gnome-shell-extension-invert-color/
  2. unzip it into:
    ~/.local/share/gnome-shell/extensions/invert-window@maiself
  3. patch the extension.js file the way written here and save it:
    maiself/gnome-shell-extension-invert-color#1 (comment)
  4. reload Gnome shell by hittin Alt+F2 and typing "r" + enter
  5. install gnome-tweak-tool (unity-tweak-tool)
  6. enable this extension on its Extensions panel tossing it to "on"
  7. hit Ctrl+I key on a window that will go smart invert
  8. Enjoy -> thank you for all the guys on the links above!

from linux-color-inversion.

log69 avatar log69 commented on September 5, 2024

Updated the patch, see here:

maiself/gnome-shell-extension-invert-color#1 (comment)

from linux-color-inversion.

vn971 avatar vn971 commented on September 5, 2024

@log69 I wonder if it makes sense to move said instruction to a separate paragraph in this repo or any others(?). If you'd be willing to provide a PR, I'd certainly merge it.

from linux-color-inversion.

vn971 avatar vn971 commented on September 5, 2024

Maybe the correct way would be to fork "gnome-shell-extension-invert-color", make necessary changes, add "RGB shift" version and advertise the fork from this repo. You know what', I'll re-raise the issue.

from linux-color-inversion.

JackKenney avatar JackKenney commented on September 5, 2024

Is there a way that works for xrandr?
It was designed to be really portable between monitor/graphics cards/etc.

This wrapper does the standard single channel inversion, https://github.com/zoltanp/xrandr-invert-colors, but I'm looking for a way to preserve hue that will work for my computer like this does.

I'm on an Ubuntu 18.04 system with X11.

When I try to use this, I get a "Another composite manager is already running" error.
If I kill the existing composite manager my display stops being functional and I have to restart.

from linux-color-inversion.

vn971 avatar vn971 commented on September 5, 2024

Hi @JackKenney. xrandr, or anything channel-independent, absolutely cannot work like the advanced approaches "RGB shift" and "matrices". This is partly covered in the bottom section, maybe you'll find it useful(?) https://github.com/vn971/linux-color-inversion#alternatives-future-work

If you want to run picom (former known as "compton"), you may indeed need to kill the old composite manager first. The thing that you describe as "not functional" maybe be the view without any compositor at all. If you cannot operate from this state at all, maybe you can chain the commands together, e.g.

pkill old_compositor; compton --backend glx --glx-fshader-win "$(cat shift_whiteish.glsl)" --invert-color-include id!=0

from linux-color-inversion.

JackKenney avatar JackKenney commented on September 5, 2024

Hi @JackKenney. xrandr, or anything channel-independent, absolutely cannot work like the advanced approaches "RGB shift" and "matrices". This is partly covered in the bottom section, maybe you'll find it useful(?) https://github.com/vn971/linux-color-inversion#alternatives-future-work

If you want to run picom (former known as "compton"), you may indeed need to kill the old composite manager first. The thing that you describe as "not functional" maybe be the view without any compositor at all. If you cannot operate from this state at all, maybe you can chain the commands together, e.g.

pkill old_compositor; compton --backend glx --glx-fshader-win "$(cat shift_whiteish.glsl)" --invert-color-include id!=0

Thanks for your response :)

Unfortunately, in Ubuntu/ElementaryOS the the compositor is only part of mutter so killing mutter or gala messes up the window management and changes the color shading successfully but makes the windows unusable.

I've been unable to find a way to have mutter execute the GLSL files so far.

from linux-color-inversion.

vn971 avatar vn971 commented on September 5, 2024

For XFCE specifically I know xfwm expressed interest in glsl support (or color inversion specifically), I think they might be willing to help writing this feature as well. For ElementaryOS, no information.

from linux-color-inversion.

JackKenney avatar JackKenney commented on September 5, 2024

Maybe the correct way would be to fork "gnome-shell-extension-invert-color", make necessary changes, add "RGB shift" version and advertise the fork from this repo. You know what', I'll re-raise the issue.

I ended up doing this here:
https://extensions.gnome.org/extension/3530/true-color-invert/

So I figured I would send it back this way in case anyone is looking for this. Works on Ubuntu 18.04 and 20.04 so far without bugs. GitHub fork here:
https://github.com/JackKenney/gnome-true-color-invert
If anyone runs into a problem with it, feel free to create an issue there.

Cited this in the extension.js, thanks for doing the hard work @vn971 !

from linux-color-inversion.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.