Change iTerm2 profile from the terminal
Assuming iTerm has a profile named "Evening":
#!/bin/sh
echo -e "\033]50;SetProfile=Evening\x7"
Or choose profile via argument:
# profile.sh:
#!/bin/bash
echo -e "\033]50;SetProfile=$1\x7"
./profile DarkMode
In Vim you can add command to change Vim color scheme and iTerm profile at the same time (assuming iTerm has a profile named "Dark"):
command Dark colorscheme solarized | set background=dark | silent !printf '\e]50;SetProfile=Dark\x7'
Written by Wojtek Kruszewski
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#