my hacky "anti-flashbang" solution

imp

16 Mar 2013, 01:27

Heyho,
switching between workspaces or windows might bring you from a dark terminal into a bright firefox - introducing pain in the eyes.
Is there something around, not wasting so much cpu like this does:

Code: Select all

while true; do xbacklight -steps 10 -time 100 -set ` xwd -root | convert - -colorspace gray -format "%[fx:100-100*mean]%%" info:` ; done
Hooking into the wm to trigger an update on changing the windows would be one way, or filtering the keyboard input for "crititcal" combos like switching windows, opening tabs and so on.

ps: "import" might replace xwd and the pipe, but doesn't take correct screenshots here...

Findecanor

16 Mar 2013, 17:45

I don't have this problem, simply because I do not fill the screen with windows.

While I use a black terminal, I run my main terminals in 144×50 chars on a 1920×1080 screen. I see little point in making a terminal larger than this -- old console modes did not use to have more rows and columns. I use a solid grey desktop background and have lots of other elements (window maker dock, pinned window menu, pager, etc) that are not too dark. Therefore, my "Shell" workspace is not too dark to begin with.

I also do not maximize browser windows. I organize open web pages in windows and tabs, sometimes a window per forum and a tab per thread. For instance, I often read a page in a window on the left while a page is loading in the window on the right, etc.
(In the old days, I also used to set the default web page background to #e0e0e0 (light grey) instead of white, but that point is kind of moot these days.)

I also have a lit desk lamp next to the screen, so that there is some ambient light in the room.

imp

17 Mar 2013, 12:17

For anybody who's wondering what the line does: it takes a screenshot of the whole screen, feeds it into imagemagick, calculates 100-mean% value of the image in greyscale and feeds it into xbacklight, which sets the led backlight brightness on my netbook.
Findecanor wrote:I don't have this problem, simply because I do not fill the screen with windows.
While I use a black terminal, I run my main terminals in 144×50 chars on a 1920×1080 screen. I see little point in making a terminal larger than this -- old console modes did not use to have more rows and columns. I use a solid grey desktop background and have lots of other elements (window maker dock, pinned window menu, pager, etc) that are not too dark. Therefore, my "Shell" workspace is not too dark to begin with.
OK, and now think about an netbook with 1024x600 with an tiling wm (i3). I'm quite sure you would go here fullscreen or for maximised windows, leaving only a small status bar (setting a background doesn't even matter because you'll never see it, other then by switching to an empty workspace or by using transparent windows).
Please hand over your unused resolution from your display ;).
I see no point in restricting the terminal size to some strange values from the long gone past.
Findecanor wrote:I also do not maximize browser windows. I organize open web pages in windows and tabs, sometimes a window per forum and a tab per thread. For instance, I often read a page in a window on the left while a page is loading in the window on the right, etc.
That's kinda unrelated to my question :P.
Findecanor wrote:(In the old days, I also used to set the default web page background to #e0e0e0 (light grey) instead of white, but that point is kind of moot these days.)
That would save you in some cases, but not always :/.
Findecanor wrote:I also have a lit desk lamp next to the screen, so that there is some ambient light in the room.
At home on my table with the desktop is enough light and no problems with that. But while working somewhere with the netbook, you cannot always choose the situation.

Findecanor

17 Mar 2013, 13:17

imp wrote:
Findecanor wrote:I also do not maximize browser windows. I organize open web pages in windows and tabs, sometimes a window per forum and a tab per thread. For instance, I often read a page in a window on the left while a page is loading in the window on the right, etc.
That's kinda unrelated to my question :P.
I think you missed my point. By doing this, I get lots of the desktop background around the browser windows. Also while the page on the left might have light light colours, the page on the right could have dark colours.
imp wrote:OK, and now think about an netbook with 1024x600 with an tiling wm (i3).
Yeah, I also maximize on my netbook ... :oops:
imp wrote:For anybody who's wondering what the line does: ...
I got it. Are the scaling values OK?
BTW, you may not need to run maximum brightness on the terminal workspace. Default text colour is usually not pure white, only a light grey.

Post Reply

Return to “Off-topic”