mathiasbynens / dotfiles

:wrench: .files, including ~/.macos — sensible hacker defaults for macOS
https://mths.be/dotfiles
MIT License
30.3k stars 8.74k forks source link

iTerm settings #99

Open mathiasbynens opened 12 years ago

mathiasbynens commented 12 years ago

I’m considering adding a copy of ~/Library/Preferences/com.googlecode.iterm2.plist to the init folder, and a script or a check in .osx to move it to the correct location if iTerm is available.

The problem is this cannot be done from within iTerm itself, else the imported settings would get overwritten upon exit.

nvartolomei commented 12 years ago

Why it can't be done from iTerm?

killall iTerm && nohupsleep 1 && do_dirty_job && open -a iTerm``

First you kill iTerm and runs the next actions with nohup, which can run even if iTerm is killed, after that you open iTerm back.

mathiasbynens commented 12 years ago

I didn’t know about nohup. That’s very useful; thanks!

nvartolomei commented 12 years ago

Fixed the string, forgot to escape backticks and sleep 1 probably isn't needed, nohup runs after killall command exits.