Vim Tips Wiki

Adjust display brightness in Mac OS X

Revision as of 08:32, April 26, 2012 by JohnBeckett (Talk | contribs)

1,619pages on
this wiki

Proposed tip Please edit this page to improve it, or add your comments below (do not use the discussion page).

Please use new tips to discuss whether this page should be a permanent tip, or whether it should be merged to an existing tip.
created March 8, 2012 · complexity basic · version 7.0

This tip sets the brightness of the display, and is not related to the brightness of the colorscheme. The procedure here applies to Mac OS X, although it may be possible to do something similar in other systems.

What's this about?

I like my display on full brightness with a dark colorsheme when I'm coding, even late at night. Some people may like other brightness adjustments. Either way, when switching between full screen Vim and browser windows/terminals my retinas would get burnt and I needed to constantly adjust brightness.

Download the command line brightness tool from here.

Then add the following two commands in your vimrc.

:au FocusGained * :!brightness 1
:au FocusLost * :!brightness 0.5

Tip can be improved if the tool is improved to report current brightness setting so it could restore it. Also you probably only want this to happen if in fullscreen mode, so could possibly be improved there (if there is a way for Vim to detect it is full screened).


Around Wikia's network

Random Wiki