Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I dislike that most websites use a black font on white background for their sites, as it gets too tiresome for me to read.

Back in the days of 11.04, using Gnome2 with compiz, there actually was a Negative feature that could negate the content of any window, making the background black and the font white. Much easier on the eyes for me.

Yet since 11.10, using gnome shell with mutter, I have no idea if there is something alike out there.

Hence my question: How do I negate the currently active window in gnome shell?

I am not interested in alternative methods, e.g. user styles. I am aware of their existence but I find it much easier to just invert the screen by the hit of a key shortcut. I also want the solution to be application-agnostic. As I also from time to time would want to invert libre-office or some other glaringly white application.

share|improve this question
add comment

3 Answers 3

up vote 14 down vote accepted
+50

To invert the entire screen you can use the program xcalib:

xcalib -invert -alter

From the xcalib man page

xcalib loads 'vcgt'-tag of ICC profiles to the X-server using the XVidMode Extension in order to calibrate your display.

That means it does not depend on compiz being used.

You can install it using sudo apt-get install xcalib. To make it more convenient assign a keyboard shortcut opening the Keyboard settings.

Keyboard Settings for adding manual shortcut

There, navigate to shortcuts. Add a custom shortcut by pressing the plus button, add the name and the command. It will be disabled by default, so assign a shortcut by clicking on Disabled and perform the wanted shortcut, e.g. meta + i

Before:

before

After xcalib -invert -alter was launched (mapped to <meta-i>:

after

Pressing it again restores to the normal not inverted screen.

share|improve this answer
2  
I have a dual monitor setup and xcalib only inverts one screen. Do you know how to invert both at once, or how to specify which one to invert? –  k0pernikus Sep 14 '12 at 8:34
    
anyone care to add instructions/a link for setting up keyboard shortcuts? –  drevicko Dec 20 '12 at 0:40
1  
@drevicko Done :) –  k0pernikus Apr 19 '13 at 18:36
1  
The OP asked about the current window, this inverts all windows on the screen, right ? –  Limited Atonement Sep 6 '13 at 19:01
    
@k0pernikus this is probably another question, but the answer: sometimes Xorg creates a new screen from each monitor. so just pass -d :0 and -d :1 or whatever you have running (may be -d :0.1 also) –  gcb Oct 27 '13 at 0:45
add comment

Partial solution

Perhaps, you can use a high / inverse contrast that sort of negates the windows. While this does not work for a browser's web pages (you could use browser specific solutions for that), it generally works for desktop applications.

Go to Universal Access and choose High / Inverse for Contrast. You could know have a white text in black background. While I admit this isn't the best solution, it should help you somewhat if you are desperate.

High Inverse


Making the windows or the screen negative is, unfortunately, a Compiz feature. If I am not wrong, gnome-shell uses Mutter as its window manager and Mutter currently doesn't have any feature that allows the users to negative the windows.

The reason why you were able to make your windows negative in 11.04 or earlier versions were because you were using GNOME classic, which apparently used either Metacity or Compiz as its window manager.

If you really want to make your windows negative, I strongly urge you to use Unity, as it uses Compiz and can easily be configured to make your current window negative.

Or, you can also use gnome-classic in 11.10 and enable Compiz in gnome-classic.

share|improve this answer
    
+1 for the update :) –  k0pernikus Sep 6 '12 at 12:22
6  
“Making the windows or the screen negative is, unfortunately, a Compiz feature.” This is not true. Inverting using xcalib -invert -alter works perfectly and I don't use compiz. –  Marco Sep 6 '12 at 12:29
    
@Marco Is it possible to invert a specific application with xcalib? E.g. google-chrome? Or is it only able invert the current monitor? –  k0pernikus Sep 6 '12 at 12:39
    
@k0pernikus Unfortunately not, xcalib can only invert the entire screen. –  Marco Sep 6 '12 at 13:03
    
@Marco Don't you want to make this your own answer? For granting you credits and all :) –  k0pernikus Sep 7 '12 at 9:02
add comment

Unless you are willing to write a Gnome-Shell extension, this is not possible.

It also depends on whether Clutter is able to support this feature. You can read about writing Gnome-Shell extensions here:

https://live.gnome.org/GnomeShell/Extensions

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.