From 7f1af531210b9526d8306f37814c5b993f2dd2d1 Mon Sep 17 00:00:00 2001 From: Brian Cristante <33549821+brcrista@users.noreply.github.com> Date: Tue, 24 Oct 2023 15:30:41 -0400 Subject: [PATCH 1/2] Remove duplicate Homebrew in PATH --- macos/install-brew | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/macos/install-brew b/macos/install-brew index 8df39c4..9b73bb9 100755 --- a/macos/install-brew +++ b/macos/install-brew @@ -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" \ No newline at end of file From f4788b9514e6d7ece8243969fc2e4c8978f31667 Mon Sep 17 00:00:00 2001 From: Brian Cristante <33549821+brcrista@users.noreply.github.com> Date: Tue, 24 Oct 2023 15:31:04 -0400 Subject: [PATCH 2/2] Add more detail for how to install the iTerm2 config files --- macos/README.md | 7 ++----- macos/iterm2/README.md | 25 +++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/macos/README.md b/macos/README.md index 0249617..8309d70 100644 --- a/macos/README.md +++ b/macos/README.md @@ -2,9 +2,7 @@ ## 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 @@ -12,7 +10,7 @@ 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 @@ -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/). - diff --git a/macos/iterm2/README.md b/macos/iterm2/README.md index bd20e5d..34e4cb5 100644 --- a/macos/iterm2/README.md +++ b/macos/iterm2/README.md @@ -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/) \ No newline at end of file +- [Mac OS X, iTerm and the meta key | Think In Geek](https://thinkingeek.com/2012/11/17/mac-os-x-iterm-meta-key/)