Neither one nor Many

 
October 4 2017

This is probably going to be a slightly weird post, but this is about something what works really well for me, and I actually believe other people could like it

I like to get notifications when..

  1. Compiling something finally finishes
  2. Rebooting/provisioning some machine finishes
  3. Someone comments on my Pull request
  4. Someone mentions me on some JIRA ticket
  5. I broke the build

But notification popups suck! You have to confirm them..., you cannot let them auto-hide (as you might miss an important one), they appear on the monitor/workspace you're not actively looking at, etc., you may even be forced to use a mouse (Yuck!).

MyThe solution is to temporarily colorize the screen for getting your attention using a modified redshift! Different shades of red are nice, but I am now using all colors of the rainbow with an extra parameter I've added -f: The color itself can thus tell you what's up.

trigen@zenbook:~> redshift -h
...
  -f TYPE R:G:B Additional filter TYPE (multiply|inverse).. 
                ..to apply with R:G:B parameters.
...

A few examples

The color shift is not captured with a screenshot, so I had to take photos with my Phone. For each photo the caption shows the corresponding redshift parameters used.


redshift -O 2500 -f "multiply 1.0:0.5:0.5"

redshift -O 2500 -f "multiply 0.5:1.0:0.5"



redshift -O 6500 -f "multiply 0.2:0.2:1.0"


My actual workflow

My background scripts currently change colors automatically to..

  • RED - for general notifications (the message I find in the i3 statusbar)
  • GREEN - in case build succeeded
  • YELLOW - in case build FAILED
  • BLUE - in case mentioned on JIRA
  • BLUE - in case of activity on Pull Requests involved.
  • INVERSE - in case I broke the build!

So the workflow is basically the color change tells me what's up, and I confirm it with WINKEY+LALT+SPACEBAR. With this I mean, I restore my screen color to the original state. For example I got a green overlay, which means I can switch back to some other workspace and continue testing what just finished compiling there.


redshift -O 6500 -f "inverse 1.0:1.0:1.0" or: WINKEY + LALT + I

redshift -O 6500 -f "multiply 0.5:0.5:0.5"
or: WINKEY + LALT + SPACEBAR


More super handy usages!

  • Battery monitoring: Paint screen almost entirely red when: Battery remaining <= 5% AND Charger disconnected. This saved me quite a few times. I'm using the i3 window manager and it's easy to miss the battery indicator if you have some tile toggled to fullscreen (an i3 feature, which also hides the i3 status bar).
  • The "inverse" effect can make web browsing easier on the eyes at night, which is why I assigned it a separate keyboard shortcut. Most browsers have plugins that enforce darker colors for websites, Dark Reader does a great job for Chrome for example. However, when transitioning between pages or switching tabs, there will be a "flickering" effect (see thousands of complains here and here) which will completely destroy your eyes.

Conclusion

I'm using this modified redshift (it's only one extra commit) and some other productivity hacks for a while now. You can install my fork with the following steps:

  • git clone https://github.com/rayburgemeestre/redshift
  • cd redshift; ./bootstrap (in my case apt install autopoint libtool was needed)
  • ./configure (one of the Adjustment methods should say "yes")
  • make; sudo make install

Test drive it with: redshift -O 6500 -f "inverse 1.0" (restore with redshift -O 6500)

The "reset colors" shortcut key

For your Window Manager it may be different, in my case the WINKEY+LALT+SPACEBAR keyboard shortcut has to be defined in $HOME/.i3/config:

bindsym $mod+Mod4+space exec redshift -O 6500 -f "multiply 0.5" (My modifier key is alt)

The -f multiply 0.5 makes the screen 50% darker, which is just a personal preference. With some small effort you could control the 0.5 value with other shortcuts, but that was not the point of this blog post.

To be continued..

More hacks will be described in follow-up posts. Cheers!

Blog Comments (0)


Leave a Reply

Comment may not be visible immediately, because I process everything manually.**

**) I plan to automate this.., but it's on my ToDo since for ever..


Author:
Ray Burgemeestre
february 23th, 1984

Topics:
C++, Linux, Webdev

Other interests:
Music, Art, Zen