Ambient Theme : Sets your theme's background based on ambient light
script karma |
Rating 1/1,
Downloaded by 485 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Leonid Shevtsov |
|
script type |
utility |
|
description |
Sets your vim theme's background based on ambient light.
WORKS ON OS X ONLY.
The plugin switches the background variable from light to dark. Works smoothly with solarized.
# Limitations
Vim doesn't have a timer. So this uses a hack which only works in Normal mode. That means the theme will switch after you exit Insert mode.
# Configuration
g:AmbientLightThreshold is the sensor value which triggers the switch. The default is 100000; you can experiment yourself if you want.
echo g:LightSensorValue will let you see the current value.
# Compiling the binary yourself
There's a binary that reads the light sensor value. It is precompiled for OSX 10.5 and later.
You'll need gcc to compile it IF YOU HAVE OSX 10.4 OR LESS. Otherwise, it's as simple as:
make clean; make
---
Git repository: https://github.com/leonid-shevtsov/ambient_theme.vim |
|
install details |
Requires OS X >=10.5 and an ambient light sensor (like on a MacBook).
Just copy the plugin to your vim path and restart, or use pathogen |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 3.145.133.121
|