Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Little script for dimming/brightening screen colors #39

Open
chew-z opened this issue Feb 20, 2017 · 0 comments
Open

Little script for dimming/brightening screen colors #39

chew-z opened this issue Feb 20, 2017 · 0 comments

Comments

@chew-z
Copy link

chew-z commented Feb 20, 2017

Not an issue

Working late at night I like adjusting the screen brightness/contrast. Perhaps someone else will also find this little mapping useful.

On Mac F1/F2 special keys (pressed together with Fn key) Dim/Brighten screen so this mapping seems very natural.

" brighten/dim background - a'la macOS dim screen function keys
" 233 (darkest) ~ 239 (lightest) 252 (darkest) ~ 256 (lightest)
function! Seoul256Brighten()
    if g:seoul256_background == 239
        let g:seoul256_background = 252
    elseif g:seoul256_background == 256
        let  g:seoul256_background = 256
    else
        let g:seoul256_background += 1
    endif
    colo seoul256
endfunction
"
function! Seoul256Dim()
    if g:seoul256_background == 252
        let g:seoul256_background = 239
    elseif g:seoul256_background == 233
        let g:seoul256_background = 233
    else
        let g:seoul256_background -= 1
    endif
    colo seoul256
endfunction
"
nmap <F1> :call Seoul256Dim()<CR>
nmap <F2> :call Seoul256Brighten()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant