News for hackers. Stuff that matters.
Re:macOS Setup after 15 Years of Linux by mattrighetti on Thursday December 30, 2021 @08:37PM (#29743860)
I used to love iTerm2 but the only thing that it was missing was that I couldn't set it up as I wanted with a script when I needed to install a new macOS from scratch (there's probably a feature that allows that and I didn't notice).

I moved to tmux + Alacritty [1] (Rust hype and speeed) which is cross-platform and only needs its config file, a nice and clean yaml, in the right place to restore it as I want. Now when I full wipe my Mac I just need to run the script that pulls the config file from GitHub and tada! Also, the configuration file is almost identical to my Linux one so I can move around similarly and have a consistent look.

I'm also used to replace macOS programs like `sed`,`grep`,`getopt`,`ssh` (macOS OpenBSD one won't work with Yubikey),`coreutils` and `awk` with the GNU version. You can download them with Homebrew and to replace them with the macOS default ones you just need to put them at the beginning of your path like this:

    export PATH=/usr/local/opt/coreutils/libexec/gnubin:$PATH
[1]: https://github.com/alacritty/alacritty
Re:macOS Setup after 15 Years of Linux by euoia on Thursday December 30, 2021 @08:43PM (#29743891)
iTerm2 3.4.14

Preferences > General > Preferences > Load preferences from a custom folder or URL

You can save your preferences and load them as required.

Re:macOS Setup after 15 Years of Linux by smohare on Thursday December 30, 2021 @11:58PM (#29745072)
You entirely miss the point. Folk want to do this from a bootstrap script. iterm makes this difficult.
Re:macOS Setup after 15 Years of Linux by varenc on Friday December 31, 2021 @12:55AM (#29745392)
iTerm doesn't make a bootstrap script easy, but it's still possible. I do it.

Use this to command to set the location of the iterm config folder:

   defaults write com.googlecode.iterm2 PrefsCustomFolder -string "/path/to/iterm config folder"
Then as long as that folder exists and contains your preferred settings, when iTerm opens up it'll be exactly like you want it. (though it would have been nice if this just defaulted to $HOME/.config/iTerm)
Re:macOS Setup after 15 Years of Linux by 9935c101ab17a66 on Saturday January 08, 2022 @02:37AM (#29849534)
There are a bunch of ways to do this while bootstrapping. Just store your iterm config in a dot files git repo, and then symlink it on a new system. You can even use dot bot to automate symlinks. That’s just one way of doing it, I’m sure there are many other ways.

It’s weird to hear someone proficient enough to be talking about bootstrapping a dev machine complain about solving a very trivial problem.

Re:macOS Setup after 15 Years of Linux by jftuga on Thursday December 30, 2021 @10:00PM (#29744390)
Here is my .tmux.conf. It includes a quick tutorial at the top of the file.

I have set PREFIX to be ctrl-a, which mimics GNU screen.

'Ctrl-a m' toggles "mouse" mode, which allows you to resize windows and set focus with the mouse.

https://raw.githubusercontent.com/jftuga/universe/master/tmu...

Re:macOS Setup after 15 Years of Linux by k1rcher on Thursday December 30, 2021 @09:16PM (#29744105)
+1 for alacritty.

However now that I don’t daily drive mac as much, I’ve defaulted back to iTerm 2 for when I do happen to be doing something on my mac. The default configuration is quite good out of the box. All I really need to do post-install is get my beloved zsh + ohmyzsh plug-ins and I’m good to go :-)

And also my tmux dot files ;)

Re:macOS Setup after 15 Years of Linux by raverbashing on Friday December 31, 2021 @02:20AM (#29745783)
Kitty has more features and is easier to use than Alacritty IMHO

https://sw.kovidgoyal.net/kitty/

Re:macOS Setup after 15 Years of Linux by manish_gill on Friday December 31, 2021 @03:04AM (#29745949)
As a recent convert from Alacritty to Kitty, I can confirm this. Kitty blew Alacritty out of the water in the first 10 mins of my experience with it.

Like holy crap, it's a very well written and well thought out piece of software. And it's fast. I'm all about the Rust hype, but Kitty reduced latency drastically.

Re:macOS Setup after 15 Years of Linux by akho on Friday December 31, 2021 @03:57AM (#29746173)
Still slower than xterm. And I have yet to see a feature I need that's not in (famously bloated) xterm, and which Alacritty or Kitty provide.
Re:macOS Setup after 15 Years of Linux by petepete on Friday December 31, 2021 @08:20AM (#29747728)
By what measure is it slower?

I don't really notice any difference in doing day-to-day stuff, but I tried out tree across my entire ~/projects dir and got the following results:

XTERM:

28032 directories, 196844 files tree projects 0.65s user 1.19s system 56% cpu 3.229 total

KITTY:

28032 directories, 196844 files tree projects 0.62s user 0.75s system 55% cpu 2.475 total

Re:macOS Setup after 15 Years of Linux by akho on Saturday January 01, 2022 @03:30PM (#29762376)
Latency and startup time are largest contributors to my feeling. I don’t have a measurement, and both are difficult to measure.
Re:macOS Setup after 15 Years of Linux by GekkePrutser on Thursday December 30, 2021 @11:04PM (#29744755)
With Mac you can usually just copy your entire ~/Library/Preferences folder to get all your apps back the way they were on a new Mac. It's a collection of pliat files that basically are equivalent to the registry on Windows.

There's even a system wide equivalent at /Library/Preferences

Re:macOS Setup after 15 Years of Linux by smohare on Thursday December 30, 2021 @11:59PM (#29745080)
For a very limited set of apps perhaps.
Re:macOS Setup after 15 Years of Linux by wlesieutre on Friday December 31, 2021 @12:38AM (#29745318)
You also want ~/Library/Application Support

Of course if you're using a lot of cross platform stuff it tends to ignore those conventions in favor of a bunch of ~/.stuff/ folders

Re:macOS Setup after 15 Years of Linux by GekkePrutser on Friday December 31, 2021 @12:01PM (#29749907)
Yeah my post was not meant to be an exhaustive list of course :)

But apps that play by Apple's ideas do generally do this. Application Support is more for files rather than settings.