Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " capture the current interface style
- let g:apple_interface_style=system("defaults read -g AppleInterfaceStyle")
- " run code based on the current interface style
- if g:apple_interface_style ==? "dark\n"
- set bg=dark
- elseif g:apple_interface_style ==? "light\n"
- set bg=light
- endif
- " add leader commands to change after vim starts
- nn <leader>d :!osascript -e "tell application \"System Events\" to tell appearance preferences to set dark mode to true"<CR><CR>
- nn <leader>l :!osascript -e "tell application \"System Events\" to tell appearance preferences to set dark mode to false"<CR><CR>
Add Comment
Please, Sign In to add comment