SMAPI icon indicating copy to clipboard operation
SMAPI copied to clipboard

Adding Support iTerm2 on MacOS

Open yinxiangshi opened this issue 1 year ago • 8 comments

iTerm2 is widely used as the first-place terminal on MacOS. Modified the unix launcher to make it support to open iTerm2, if iTerm2 is not available, open the system terminal then.

yinxiangshi avatar Mar 02 '24 22:03 yinxiangshi

@yinxiangshi Thanks for the pull request!

SMAPI prefers the user's configured defaults when possible. It seems this will always use iTerm2 if it's installed, even if it's not set as the default terminal. Shouldn't it be up to the user to set iTerm2 as their default terminal if they prefer it, or does it not work that way on macOS?

Pathoschild avatar Mar 29 '24 23:03 Pathoschild

@Pathoschild Hi! Things are a little different on MacOS compared with all other platforms. The beginning of this PR is just because when I use SMAPI, I find that SMAPI will always call the system terminal(not the default terminal). As we all know, the system terminal of MAC is a piece of ****, thus, I made this PR for the most widely used terminal on MAC--iTerm2.

For the question you mentioned, yeah, it is a good point that my PR will always keep opening iTerm2 if it is installed.

Regarding this question, here are some important points to say:

  1. Mac actually doesn't have a system level to set the default terminal; on a system level, it only supports changing the default shell. (FYI: https://support.apple.com/lt-lt/guide/terminal/trml113/mac)
  2. As addressed in 1., a lot of iTerm2 users never set their default terminal to iTerm2 since it is not that ez to do this.

Despite these, in general, there is almost no one will keep using the system terminal if they have installed the iTerm2.

Based on all these things, I made the PR to be preferred to open iTerm2 if iTerm2 is available.

PS: this actually fixed another little issue of SMAPI, since mac has a day-night mode, the color of the system terminal will change with the time of the day. Thus, no matter what font color we choose during the installation of the SMAPI, there will always be half of the day that the log printed in the terminal is hard to read. However, if we run this on iTerm2, there won't face such problem.

After all, I like your SMAPI project and really appreciate for your contribution to the Stardew Valley community.

yinxiangshi avatar Apr 02 '24 14:04 yinxiangshi

the most widely used terminal on MAC--iTerm2.

I'd just like to say that there is no way this is correct. I've been an iOS developer for 10 years, and have never met any dev that actually used any other terminal than the built-in one.

Shockah avatar Apr 02 '24 14:04 Shockah

If u ever look at the Wikipedia of the iTerm2, u won’t say this. Meanwhile, iOS developer ≠ Mac developer. Ur guys have been fked up by Xcode for many years, not surprise that a lot iOS developers can stand the default terminal. Btw, there is a term in logic named faulty generalization. Strongly suggest you to go to take a look. FYI: https://en.m.wikipedia.org/wiki/Faulty_generalization#Hasty_generalization

On Tue, Apr 2, 2024 at 10:13 Michał Dolaś @.***> wrote:

the most widely used terminal on MAC--iTerm2.

I'd just like to say that there is no way this is correct. I've been an iOS developer for 10 years, and have never met anydev that actually used any other terminal than the built-in one.

— Reply to this email directly, view it on GitHub https://github.com/Pathoschild/SMAPI/pull/933#issuecomment-2032160098, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHUIB37WT5PD7O5RSXDH7RTY3K4KJAVCNFSM6AAAAABEDNFBTOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZSGE3DAMBZHA . You are receiving this because you were mentioned.Message ID: @.***>

yinxiangshi avatar Apr 02 '24 15:04 yinxiangshi

The Wikipedia page of iTerm2 you mentioned actually doesn't contain any facts confirming your statements, other than 2-3 quotes of developers basically saying "it's good" and "it's one of the most popular terminals", both being subjective opinions.

I'm afraid the "faulty generalization" argument doesn't work out either, since an average Mac user is not a developer to begin with, and non-developers will have no use of a different terminal app.

I just think you're biased, but I'm not gonna continue this conversation, and this really isn't the place for it.

Shockah avatar Apr 02 '24 15:04 Shockah

@Shockah lol I don't know how to consider your personal views as more objective.

Meanwhile, as what I said, an ios developer is not equaling to an Mac developer. How often do ur guys using terminal and how many remote hosts u need to use during your work? Ask urself these questions before making any statements. The only reason that the developer u meet can stand the Terminal is just because they don't use it often.

One last things, it's not strange that you can use Terminal in your daily workflow since u already used Xcode for years.

yinxiangshi avatar Apr 03 '24 19:04 yinxiangshi

Thank you @yinxiangshi I have been looking for a solution to this as well! 🚀 Just bumping this so it doesn't get lost, it may not be for everyone but you're not the only one ❤️

@Pathoschild What are your thoughts on merging this? Is there anything you want tested? Thanks! 😊

LumosViridi avatar Jun 14 '24 21:06 LumosViridi

~~I would really love iTerm2 support, it is certainly a very popular macOS terminal!~~

iTerm support would definitely be amazing (though one can just edit the launch file), but what would be even better would be general support for non-native terminals, such as what is supported on Linux.

Eejit43 avatar Jun 20 '24 02:06 Eejit43

Merged into develop for the upcoming SMAPI 4.1.0. I'll see what feedback we get from macOS players when it's released to decide whether we keep the change long-term. Thanks for the help!

Pathoschild avatar Jul 06 '24 22:07 Pathoschild

Amazing, thank you so much!!! :D

Eejit43 avatar Jul 06 '24 22:07 Eejit43

Well, thanks for all the supports. I think this issue could closed :)

yinxiangshi avatar Jul 10 '24 21:07 yinxiangshi