Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #
- # auto match window title and tab background color with
- # terminal background color for iTerm2
- # append to your .bashrc, .zshrc or whatever
- # does not really work with High Sierra
- # to reset:
- # echo -e "\033]6;1;bg;*;default\a"
- osascript -e \
- 'tell application "iTerm"
- tell current session of current window
- get background color
- end tell
- end tell' |\
- tr -d ',' |\
- xargs -n 1 -I {} expr {} / 257 |\
- paste <(echo -e 'red\ngreen\nblue') - |\
- awk '{ print "\033]6;1;bg;"$1";brightness;"$2"\a" }'
Add Comment
Please, Sign In to add comment