iTerm 2 profiles

前端 未结 7 1717
庸人自扰
庸人自扰 2021-01-29 23:10

I have recently switched over to iTerm2 and love it. I am wondering though if there is a way to use profiles to correspond to what environment/specific machine you are on.

7条回答
  •  温柔的废话
    2021-01-29 23:30

    I had this same wish and found this can be accomplished in iTerm 2 (Build 1.0.0.20130319) in the application's preferences.

    You can assign a profile (say a remote profile) with a different preset than your default preset by going to:

    Profiles -> Open Profiles select the profile and click Edit Profiles... Go to the Colors Tab and choose a preset for this profile from the list in Load Presets...

    Further, I've set up Keys shortcut for different profiles so I can have one iTerm window look different than another window. I did this by:

    1. Creating a new a Profile in Preferences
    2. Creating a new Profile Shortcut Key in Preferences-> Keys whose action is New Window with Profile

    My Default profile has a black background but sometimes it helps me to have a white background. I duplicate my Default profile and name the new profile DefaultLight. On my Default profile I go to the Keys tab where I create a new Profile Shortcut Key whose Keyboard Shortcut is ^+cmd+n, whose action is New Window with Profile, and whose Profile is DefaultLight.

    After saving the prefrences, cmd+n opens a new window with a black background and ^+cmd+n opens a new window with a white background.

    There's also a New Tab with Profile action in the Keyboard Shortcut Keys Preference if you're interested in taking this even further.

提交回复
热议问题