Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

October 2023 macOS updates #8

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions macos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@

## iTerm2 profile

The [files for iTerm2](iterm2/) must be copied manually.

To install a profile, copy its JSON file to `~/Library/Application\ Support/iTerm2/DynamicProfiles`.
The profile configuration files for iTerm2 must be copied manually. See the [instructions](iterm2/README.md).

## Default shell

The default shell in macOS is `zsh`. To set it to `bash`:

```sh
# This will show something like /opt/homebrew/bin/bash
ls -a bash
which -a bash

# chsh requires shells to be declared in /etc/shells
echo /opt/homebrew/bin/bash | sudo tee -a /etc/shells
Expand Down Expand Up @@ -40,4 +38,3 @@ Note that `.bash_profile` handles this already.
## MacTex

Install [MacTeX](https://www.tug.org/mactex/mactex-download.html). Besides getting you LaTeX, this also lets you render Markdown as PDF with [`pandoc`](https://pandoc.org/).

5 changes: 1 addition & 4 deletions macos/install-brew
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/usr/bin/env bash

# This won't work in GNU Make 3.81, which is what ships with macOS.
# From https://brew.sh
# shellcheck disable=SC2016
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

# After you install Homebrewk, it tells you to run something like this to add it to PATH.
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> "$HOME/.bash_profile.plugins"
25 changes: 23 additions & 2 deletions macos/iterm2/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
## iTerm2 hex codes
# iTerm2 Profile Configuration

## Installing the profile

First:

```sh
cp Profiles.json ~/Library/Application\ Support/iTerm2/DynamicProfiles
```

Under **Preferences** in iTerm2, select `Brian's Profile` and click **Other Actions...** -> **Set as Default**.

Then under **Keys** -> **Key Mappings** -> **Presets...**, click **Import**.
Navigate to this directory and open `keys.itermkeymap`.

Once the key map has gone into effect, you should be able to:
- Move the cursor to the previous/next word with Option+Left and Option+Right
- Move the cursor to the beginning/end of the line with Command+Left and Command+Right
- Delete the last word with Option+Delete
- Delete the line with Command+Delete

## References

- [iterm - Understanding "sending hex code" - Ask Different](https://apple.stackexchange.com/questions/265108/understanding-sending-hex-code)
- [GNU Readline Library](https://tiswww.cwru.edu/php/chet/readline/readline.html)
- [Where do I find a list of terminal key codes to remap shortcuts in bash? - Unix & Linux Stack Exchange](https://unix.stackexchange.com/questions/76566/where-do-i-find-a-list-of-terminal-key-codes-to-remap-shortcuts-in-bash)
- [Mac OS X, iTerm and the meta key | Think In Geek](https://thinkingeek.com/2012/11/17/mac-os-x-iterm-meta-key/)
- [Mac OS X, iTerm and the meta key | Think In Geek](https://thinkingeek.com/2012/11/17/mac-os-x-iterm-meta-key/)
Loading