1
mirror of https://github.com/jakejarvis/dotfiles.git synced 2025-04-25 15:35:21 -04:00

🚀 massive overhaul using zinit & starship

This commit is contained in:
Jake Jarvis 2023-01-19 22:00:11 -05:00
parent 2f51d538a5
commit 5bcbf0afd1
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
37 changed files with 1317 additions and 4188 deletions

View File

@ -1,11 +0,0 @@
version: 2
updates:
- package-ecosystem: gitsubmodule
directory: "/"
schedule:
interval: weekly
time: "08:00"
timezone: America/New_York
open-pull-requests-limit: 99
labels:
- dependencies

3
.gitignore vendored
View File

@ -1,4 +1,5 @@
# oopsie proofing
**/.ssh/known_hosts*
**/.ssh/config_private
*id_rsa*
*id_ed25519*
**/*.local*

6
.gitmodules vendored
View File

@ -1,6 +0,0 @@
[submodule "zsh/plugins/zsh-autosuggestions"]
path = zsh/plugins/zsh-autosuggestions
url = https://github.com/zsh-users/zsh-autosuggestions.git
[submodule "zsh/plugins/zsh-syntax-highlighting"]
path = zsh/plugins/zsh-syntax-highlighting
url = https://github.com/zsh-users/zsh-syntax-highlighting.git

View File

@ -1,4 +1,3 @@
###############################
# Binaries #
###############################
@ -8,7 +7,6 @@ brew "zsh"
# Better bash as a backup
brew "bash"
brew "bash-completion"
# GNU utilities (those that come with macOS are outdated)
brew "coreutils"
@ -32,6 +30,7 @@ brew "vim" #, args: ["with-override-system-vi"]
brew "gcc"
brew "grep"
brew "make"
brew "nano"
brew "openssh"
brew "screen"
brew "gmp"
@ -41,24 +40,16 @@ brew "curl", link: true
brew "ack"
brew "imagemagick" #, args: ["with-webp"]
brew "ffmpeg" #, args: ["with-libvpx"]
brew "gawk"
brew "less"
brew "lua"
brew "mtr"
brew "nano"
brew "p7zip"
brew "rename"
brew "rlwrap"
brew "ssh-copy-id", link: true
brew "tree"
brew "vbindiff"
brew "zopfli"
brew "the_silver_searcher"
# Git
brew "git"
brew "git-lfs"
brew "git-crypt"
brew "gh"
# Mostly ordinary binaries
@ -77,36 +68,29 @@ brew "cocoapods"
brew "composer"
brew "dart-lang/dart/dart"
brew "deno"
brew "docker-credential-helper-ecr"
brew "doctl"
brew "elixir"
brew "erlang"
brew "fx"
brew "geoip"
brew "go"
brew "guetzli"
brew "heroku/brew/heroku"
brew "heroku/brew/heroku-node"
brew "htop"
brew "httpie"
brew "httrack"
brew "hugo", args: ["HEAD"]
brew "hydra"
brew "iproute2mac"
brew "jq"
brew "libsass", args: ["HEAD"]
brew "mas"
brew "mcrypt"
brew "mhash"
brew "mkcert"
brew "mosh"
brew "mariadb"
brew "mysql-client"
brew "ncurses"
brew "netcat"
brew "openvpn"
brew "optipng"
brew "packer"
brew "pandoc"
brew "php"
brew "pkg-config"
@ -114,7 +98,7 @@ brew "planetscale/tap/pscale"
brew "pngcheck"
brew "pngcrush"
brew "postgresql"
brew "python@3.9"
brew "python@3"
brew "python"
brew "pyenv"
brew "qemu"
@ -124,7 +108,6 @@ brew "rust"
brew "rbenv"
brew "rclone"
brew "s3cmd"
brew "s3fs"
brew "sass/sass/migrator"
brew "sass/sass/sass"
brew "serverless"
@ -140,7 +123,8 @@ brew "wireguard-tools"
brew "wireguard-go"
brew "wp-cli"
brew "xz"
brew "youtube-dl"
# brew "youtube-dl"
brew "yt-dlp"
brew "yq"
brew "zopfli"
@ -183,7 +167,7 @@ brew "bettercap"
brew "hashcat"
brew "nikto"
brew "tcpdump"
brew "wpscanteam/tap/wpscan"
# brew "wpscanteam/tap/wpscan"
brew "dnsx"
brew "httpx"
brew "naabu"
@ -216,7 +200,6 @@ cask "vnc-viewer"
cask "1password"
cask "authy"
cask "gpg-suite"
cask "keybase"
cask "little-snitch"
cask "tor-browser"
cask "tunnelblick"
@ -244,6 +227,7 @@ cask "docker"
cask "parallels"
# cask "virtualbox"
# cask "virtualbox-extension-pack"
cask "homebrew/cask-versions/virtualbox-beta" # supports M1!
# cask "vagrant"
# cask "vmware-fusion"
@ -259,13 +243,10 @@ cask "spotify"
cask "discord"
cask "skype"
cask "slack"
cask "whatsapp"
cask "zoomus"
# Gaming
cask "steam"
cask "minecraft"
cask "nvidia-geforce-now"
# Pentesting
cask "burp-suite"

View File

View File

@ -1,33 +1,36 @@
# My .files 🏡
# 💻 My .files
[![Lint](https://github.com/jakejarvis/dotfiles/workflows/Lint/badge.svg)](https://github.com/jakejarvis/dotfiles/actions) [![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=jakejarvis/dotfiles)](https://dependabot.com)
![iTerm screenshot](misc/screenshot.png)
Just a personal backup of my MacBook Pro's setup. Certainly not a drop-in solution for anybody's machine except my own, but maybe a few lines will prove useful to you.
Just a personal backup of my MacBook's setup. Certainly not a drop-in solution for anybody's machine except my own, but maybe a few lines will prove useful to you.
(...in other words, after stealing so many sick bash hacks from people on here who are much smarter than me, I felt obligated to keep the repo public. And in even more words, **_use the automated scripts at your own risk!_**)
All of the juicy stuff you're probably looking for is in [`zsh/aliases.zsh`](zsh/aliases.zsh) and [`zsh/functions.zsh`](zsh/functions.zsh) for my ZSH hacks, [`macos/defaults.sh`](macos/defaults.sh) for my macOS defaults, and [`Brewfile`](Brewfile) for my far-too-long list of binaries and apps I "need" installed. My [Firefox preferences](firefox/user.js) and [VS Code settings](vscode/) also live here. Also see my [**/uses page** for more details](https://jarv.is/uses/).
All of the juicy stuff you're probably looking for is at:
Thanks for visiting, the `exit` is that way!
❤️ [Jake](https://jarv.is/)
- [`zsh/custom/plugins.zsh`](zsh/custom/plugins.zsh), [`zsh/custom/aliases.zsh`](zsh/custom/aliases.zsh), and [`zsh/custom/functions.zsh`](zsh/custom/functions.zsh) for my ZSH hacks.
- [`macos/defaults.sh`](macos/defaults.sh) for my macOS defaults.
- [`Brewfile`](Brewfile) for my far-too-long list of binaries and apps I "need" installed.
- [`firefox/user.js`](firefox/user.js) for my Firefox settings.
- [`vscode/`](vscode/) for my VS Code settings and keybinds.
- See [my /uses page](https://jarv.is/uses/) for even more details.
## Usage
Designed for macOS, kinda works on Linux (requires [ZSH to be installed](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH#ubuntu-debian--derivatives-windows-10-wsl--native-linux-kernel-with-windows-10-build-1903) first):
```bash
git clone --recurse-submodules https://github.com/jakejarvis/dotfiles.git ~/.dotfiles
git clone https://github.com/jakejarvis/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
bash install.sh
./install.sh
```
or:
```bash
curl -sL jrvs.io/bootstrap | bash # probably don't do this if you're not me
curl -fsSL jrvs.io/bootstrap | bash # but probably don't do this if you're not me
```
## License
This project is distributed under the [MIT license](LICENSE.md).
[MIT](LICENSE)

View File

@ -1,17 +0,0 @@
#!/usr/bin/env bash
USERNAME=$(whoami)
sudo apt-get update
sudo apt-get -y install man
# set shell to zsh
sudo chsh -s /usr/bin/zsh "$USERNAME"
# re-find bearings
ln -sf "$YOU_ARE_HERE" ~/.dotfiles
# install zplug
export ZPLUG_HOME=~/.zplug
# curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh | zsh
git clone https://github.com/zplug/zplug $ZPLUG_HOME

View File

@ -117,9 +117,6 @@ user_pref("geo.enabled", false);
user_pref("geo.provider.network.url", "");
user_pref("intl.accept_languages", "en-US, en");
user_pref("javascript.use_us_english_locale", true);
user_pref("layout.css.font-visibility.private", 1);
user_pref("layout.css.font-visibility.standard", 1);
user_pref("layout.css.font-visibility.trackingprotection", 1);
user_pref("layout.spellcheckDefault", 2);
user_pref("lightweightThemes.getMoreURL", "");
user_pref("media.videocontrols.picture-in-picture.video-toggle.has-used", true);
@ -154,10 +151,9 @@ user_pref("privacy.partition.network_state.ocsp_cache", true);
user_pref("privacy.partition.serviceWorkers", true);
user_pref("privacy.trackingprotection.cryptomining.enabled", true);
user_pref("privacy.trackingprotection.enabled", true);
user_pref("privacy.trackingprotection.fingerprinting.enabled", true);
user_pref("privacy.trackingprotection.socialtracking.enabled", true);
user_pref("security.cert_pinning.enforcement_level", 2);
user_pref("security.OCSP.enabled", 1);
user_pref("security.OCSP.enabled", 0);
user_pref("security.OCSP.require", true);
user_pref("security.ssl.require_safe_negotiation", true);
user_pref("security.ssl.treat_unsafe_negotiation_as_broken", true);

View File

@ -2,42 +2,49 @@
set -euo pipefail
# what a mess. https://stackoverflow.com/a/53183593
YOU_ARE_HERE="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
echo "🙏 Deep breaths, everything will (probably) be fine!"
echo ""
echo "👋 Deep breaths, everything will (probably) be fine!"
# location of the *full repo* (defaults to ~/.dotfiles)
DOTFILES_PATH="${DOTFILES_PATH:="$HOME/.dotfiles"}"
# Clone this repo if we haven't already
git clone --recurse-submodules https://github.com/jakejarvis/dotfiles.git "$YOU_ARE_HERE" || true
# override location when running on GitHub Codespaces since it's cloned automatically:
# https://docs.github.com/en/codespaces/troubleshooting/troubleshooting-personalization-for-codespaces#troubleshooting-dotfiles
if [[ "$CODESPACES" = "true" ]]; then
DOTFILES_PATH="/workspaces/.codespaces/.persistedshare/dotfiles"
ln -sf "$DOTFILES_PATH" ~/.dotfiles
elif [[ ! -f "README.md" ]]; then
# clone this repo if this script is all by its lonesome
git clone https://github.com/jakejarvis/dotfiles.git "$DOTFILES_PATH"
# Set up symbolic links for ZSH and Git pointing to this cloned repo
ln -sf "$YOU_ARE_HERE/zsh/.zshrc" ~/.zshrc
ln -sf "$YOU_ARE_HERE/git/.gitconfig" ~/.gitconfig
ln -sf "$YOU_ARE_HERE/git/.gitignore_global" ~/.gitignore_global
ln -sf "$YOU_ARE_HERE/nano/.nanorc" ~/.nanorc
mkdir -p ~/.ssh
ln -sf "$YOU_ARE_HERE/ssh/.ssh/config" ~/.ssh/config
# Suppress terminal login banners
touch ~/.hushlogin
# Get Oh My ZSH up and running
if [ ! -e ~/.oh-my-zsh ]; then
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
fi
# Use Git submodules to get OMZ plugins
git submodule update --init --recursive
if [ "$(uname)" = "Darwin" ]; then
# shellcheck disable=SC1090,SC1091
source "$YOU_ARE_HERE/macos/macos.sh"
elif [ "$CODESPACES" = "true" ]; then
# shellcheck disable=SC1090,SC1091
source "$YOU_ARE_HERE/codespaces/codespaces.sh"
else
echo ""
echo "This isn't a Mac, so we're all done here!"
echo "Logout/restart now for the full effects."
echo "Successfully cloned the full repo to '$DOTFILES_PATH'"
echo "Run install.sh from that directory to continue. Exiting now..."
exit 0
fi
# set up symlinks from various default paths to files in this repo
if [[ ! -d ~/.config ]]; then
mkdir -p ~/.config
fi
ln -sf "$DOTFILES_PATH/zsh/.zshrc" ~/.zshrc
ln -sf "$DOTFILES_PATH/zsh/.zprofile" ~/.zprofile
ln -sf "$DOTFILES_PATH/git/.gitconfig" ~/.gitconfig
ln -sf "$DOTFILES_PATH/git/.gitignore_global" ~/.gitignore_global
ln -sf "$DOTFILES_PATH/nano/.nanorc" ~/.nanorc
ln -sf "$DOTFILES_PATH/starship/config.toml" ~/.config/starship.toml
if [[ "$(uname)" = "Darwin" ]]; then
# suppress terminal login banners
touch ~/.hushlogin
# final symlinks
if [[ ! -d ~/.ssh ]]; then
mkdir -p ~/.ssh && chmod 700 ~/.ssh
fi
ln -sf "$DOTFILES_PATH/ssh/.ssh/config" ~/.ssh/config
# shellcheck disable=SC1090,SC1091
source "$DOTFILES_PATH/macos/macos.sh"
fi
echo "🎉 Done!"

View File

@ -3,63 +3,74 @@
<plist version="1.0">
<dict>
<key>build</key>
<string>1164</string>
<string>1204</string>
<key>preferences</key>
<dict>
<key>Battery_MenubarMode</key>
<array>
<dict>
<key>key</key>
<string>1</string>
<key>uuid</key>
<string>7E56833D-E8AD-4038-9B0A-E7E1764D4D8F</string>
</dict>
<dict>
<key>key</key>
<string>2</string>
<key>uuid</key>
<string>16ED041D-EFD7-4609-9D04-2BA918554AB3</string>
</dict>
</array>
<key>Battery_TimeSize</key>
<integer>11</integer>
<key>CPU_CombineLogicalCores</key>
<integer>1</integer>
<key>CPU_DropdownOrderDisabled</key>
<string></string>
<key>CPU_MenubarGraphBreakdowns</key>
<integer>1</integer>
<key>CPU_MenubarGroupItems</key>
<integer>1</integer>
<key>CPU_MenubarMode</key>
<key>CPU_ProcessCount</key>
<integer>15</integer>
<key>Disks_DropdownActivityDisplayMode</key>
<integer>2</integer>
<key>Disks_DropdownOrderDisabled</key>
<string>unmounted</string>
<key>Disks_DropdownShowAllActivity</key>
<integer>0</integer>
<key>Disks_HidePurgable</key>
<integer>0</integer>
<key>Disks_MenubarItems</key>
<array>
<dict>
<key>key</key>
<string>77222F6D-94A5-4B3B-91BF-0A850CDF12E4</string>
<key>name</key>
<string>Macintosh HD</string>
</dict>
</array>
<key>Disks_MenubarMode</key>
<array>
<dict>
<key>key</key>
<string>100</string>
<key>uuid</key>
<string>8F722CCF-D82B-4D8D-83B0-73C7E59AB2CC</string>
<string>8E300A5F-38A2-4F82-A466-EEF6004D70B9</string>
</dict>
<dict>
<key>key</key>
<string>6</string>
<string>0</string>
<key>uuid</key>
<string>969E31C3-9F6D-4195-924C-A4733CE99A32</string>
</dict>
</array>
<key>CPU_ProcessCount</key>
<integer>15</integer>
<key>Disks_DropdownOrderDisabled</key>
<string>removable</string>
<key>Disks_HidePurgable</key>
<integer>1</integer>
<key>Disks_MenubarItems</key>
<array>
<dict>
<key>boot</key>
<true/>
<key>key</key>
<string>F0C607FC-F570-4356-9D2C-4585952893F8</string>
<string>C2AFF963-B9AE-4BF8-8884-ED913411E137</string>
</dict>
</array>
<key>Disks_ProcessCount</key>
<integer>15</integer>
<key>DropdownGraphBackground</key>
<integer>1</integer>
<key>DropdownTheme-Dark</key>
<integer>1</integer>
<key>DropdownTheme-Light</key>
<integer>2</integer>
<key>FanControl_Enabled</key>
<false/>
<key>FanControl_Sets</key>
<array/>
<key>Memory_AppFormat</key>
<integer>0</integer>
<key>Memory_DropdownOrder</key>
<string>memory,processes,pressure,swap,pages,buttons</string>
<key>Memory_DropdownOrderDisabled</key>
<string></string>
<string>pressure</string>
<key>Memory_MenubarGraphBreakdowns</key>
<integer>1</integer>
<key>Memory_MenubarMode</key>
@ -68,54 +79,66 @@
<key>key</key>
<string>100</string>
<key>uuid</key>
<string>9157E547-B6F1-46B0-B766-988A5EE2B5CC</string>
<string>90B3ECC4-6F52-470B-B321-B57FF9101802</string>
</dict>
<dict>
<key>key</key>
<string>6</string>
<key>uuid</key>
<string>F0C02F46-753B-42A4-9565-70AD54EA2435</string>
<string>E44DAA8A-4F57-498E-91BD-284828010F04</string>
</dict>
</array>
<key>Memory_ProcessCount</key>
<integer>15</integer>
<key>Menubar-DetectedColor</key>
<string>0.00 0.00 0.00 0.85</string>
<key>MenubarGraphOpacity-Dark-Modern</key>
<real>0.14743457734584808</real>
<key>MenubarGraphOpacity-Modern</key>
<real>0.34533438086509705</real>
<key>MenubarTheme</key>
<integer>1</integer>
<key>Migrated_6.0</key>
<true/>
<key>Migrated_6.22</key>
<true/>
<key>Migrated_6.5</key>
<true/>
<key>Migrated_6.52</key>
<true/>
<key>Migrated_6.60_ARM</key>
<true/>
<key>Network_AppSort</key>
<integer>0</integer>
<key>Network_DecimalLevelKB</key>
<integer>0</integer>
<key>Network_DecimalLevelMB</key>
<integer>2</integer>
<key>Network_DropdownCombineBandwidth</key>
<integer>1</integer>
<key>Network_DropdownOrderDisabled</key>
<string></string>
<string>inactive</string>
<key>Network_GraphMode</key>
<integer>1</integer>
<key>Network_GraphShowBackground</key>
<integer>0</integer>
<key>Network_GraphWidth</key>
<real>24</real>
<real>30</real>
<key>Network_IPV6Group</key>
<integer>1</integer>
<key>Network_IPV6ShowDeprecated</key>
<integer>0</integer>
<key>Network_MenubarMode</key>
<array>
<dict>
<key>key</key>
<string>4</string>
<string>100</string>
<key>uuid</key>
<string>25A36940-66EF-49EA-8454-7A4BC218A969</string>
<string>3D976805-CA57-40FF-B5FA-0986865859CE</string>
</dict>
<dict>
<key>key</key>
<string>1</string>
<key>uuid</key>
<string>6E6AAC74-763A-445C-86ED-C56F298CB3A4</string>
<string>3E479985-8C40-47F6-8238-D7762E82C8B0</string>
</dict>
</array>
<key>Network_ProcessCount</key>
<integer>15</integer>
<key>Network_ShowBSD</key>
<integer>1</integer>
<key>Notifications-Enabled</key>
<false/>
<key>Notifications-Items</key>
@ -128,7 +151,7 @@
<key>rule-type</key>
<string>18</string>
<key>uuid</key>
<string>5A377129-7049-452C-913B-C4150F470DDD</string>
<string>3BDA4498-0C70-48B2-B5D9-FE28E6D02A4C</string>
<key>value</key>
<string>978332400</string>
</dict>
@ -140,7 +163,7 @@
<key>rule-type</key>
<string>17</string>
<key>uuid</key>
<string>899753EB-CF97-430B-8DA5-DDD40BE8EB1F</string>
<string>2F6A266A-47E4-4BE5-9B2C-D3A347152B55</string>
<key>value</key>
<string>1.00</string>
</dict>
@ -152,7 +175,7 @@
<key>rule-type</key>
<string>14</string>
<key>uuid</key>
<string>03C999A1-5E87-4A0E-9245-20EA49B76D27</string>
<string>4D726ED7-6BEC-4530-A444-F3EE5A60954D</string>
<key>value</key>
<string>10.00</string>
</dict>
@ -164,7 +187,7 @@
<key>rule-type</key>
<string>20</string>
<key>uuid</key>
<string>AA659D69-C8D3-4EE9-957C-66BE6FBD8C21</string>
<string>B80FB10F-D841-4925-BD1B-E89AA45DBA4F</string>
<key>value</key>
<string>10.00</string>
</dict>
@ -173,15 +196,17 @@
<true/>
<key>Sensors_DropdownOrderDisabled</key>
<string></string>
<key>Sensors_MenubarFontStyle</key>
<integer>0</integer>
<key>Sensors_TemperatureMode</key>
<integer>0</integer>
<key>StatusItems-Order</key>
<array>
<integer>3</integer>
<integer>4</integer>
<integer>1</integer>
<integer>3</integer>
<integer>2</integer>
<integer>1</integer>
</array>
<key>Theme-SeperateStyles</key>
<true/>
<key>Time_MenubarFormat</key>
<array>
<dict>
@ -197,8 +222,20 @@
</array>
</dict>
</array>
<key>TimerFrequency</key>
<integer>2</integer>
<key>Zarya-TLE</key>
<dict>
<key>time</key>
<real>1668012542.6079049</real>
<key>tle</key>
<string>ISS (ZARYA)
1 25544U 98067A 22313.59953684 .00013763 00000+0 24956-3 0 9998
2 25544 51.6444 336.2388 0006809 53.3161 93.8274 15.49887825367737
</string>
</dict>
</dict>
<key>version</key>
<string>6.51</string>
<string>6.63</string>
</dict>
</plist>

View File

@ -1,529 +0,0 @@
{
"Ansi 5 Color" : {
"Green Component" : 0.26314744353294373,
"Red Component" : 0.42564234137535095,
"Blue Component" : 0.65052211284637451
},
"Working Directory" : "\/Users\/jake",
"Prompt Before Closing 2" : false,
"Selected Text Color" : {
"Green Component" : 1,
"Red Component" : 1,
"Blue Component" : 1
},
"Rows" : 40,
"Ansi 11 Color" : {
"Green Component" : 0.82281720845913986,
"Red Component" : 1,
"Blue Component" : 0.25792301594327316
},
"Use Italic Font" : true,
"Foreground Color" : {
"Green Component" : 0.98048108816146851,
"Red Component" : 1,
"Blue Component" : 0.95548701286315918
},
"Right Option Key Sends" : 0,
"Show Status Bar" : true,
"Character Encoding" : 4,
"Selection Color" : {
"Green Component" : 0.16498950123786926,
"Red Component" : 0,
"Blue Component" : 0.23076923191547394
},
"Show Mark Indicators" : false,
"Mouse Reporting" : true,
"Ansi 4 Color" : {
"Green Component" : 0.55481654405593872,
"Red Component" : 0,
"Blue Component" : 0.97294086217880249
},
"Non-ASCII Anti Aliased" : true,
"Sync Title" : false,
"Disable Window Resizing" : true,
"Description" : "Default",
"Close Sessions On End" : true,
"Jobs to Ignore" : [
"rlogin",
"ssh",
"slogin",
"telnet"
],
"Scrollback Lines" : 0,
"Draw Powerline Glyphs" : true,
"Status Bar Layout" : {
"components" : [
{
"class" : "iTermStatusBarHostnameComponent",
"configuration" : {
"knobs" : {
"base: priority" : 5,
"maxwidth" : 1.7976931348623157e+308,
"minwidth" : "0",
"base: compression resistance" : 1,
"shared text color" : {
"Red Component" : 0.59999999999999998,
"Color Space" : "sRGB",
"Blue Component" : 0.59999999999999998,
"Alpha Component" : 1,
"Green Component" : 0.59999999999999998
},
"path" : "hostname",
"abbreviate-localhost" : ""
},
"layout advanced configuration dictionary value" : {
"remove empty components" : false,
"font" : ".AppleSystemUIFont 12",
"algorithm" : 1,
"auto-rainbow style" : 0
}
}
},
{
"class" : "iTermStatusBarSpringComponent",
"configuration" : {
"knobs" : {
"iTermStatusBarSpringComponentSizeMultipleKey" : 1,
"base: priority" : 5,
"iTermStatusBarSpringComponentSpringConstantKey" : 0.01,
"base: compression resistance" : 1,
"shared text color" : {
"Red Component" : 0.87515999999999994,
"Color Space" : "sRGB",
"Blue Component" : 0.63,
"Alpha Component" : 1,
"Green Component" : 0.90000000000000002
}
},
"layout advanced configuration dictionary value" : {
"remove empty components" : false,
"font" : ".AppleSystemUIFont 12",
"algorithm" : 1,
"auto-rainbow style" : 0
}
}
},
{
"class" : "iTermStatusBarCPUUtilizationComponent",
"configuration" : {
"knobs" : {
"base: priority" : 5,
"shared text color" : {
"Red Component" : 0.62999999523162842,
"Color Space" : "sRGB",
"Blue Component" : 0.6796799898147583,
"Alpha Component" : 1,
"Green Component" : 0.89999997615814209
}
},
"layout advanced configuration dictionary value" : {
"remove empty components" : false,
"font" : ".AppleSystemUIFont 12",
"algorithm" : 1,
"auto-rainbow style" : 0
}
}
},
{
"class" : "iTermStatusBarMemoryUtilizationComponent",
"configuration" : {
"knobs" : {
"base: priority" : 5,
"shared text color" : {
"Red Component" : 0.62999999523162842,
"Color Space" : "sRGB",
"Blue Component" : 0.89999997615814209,
"Alpha Component" : 1,
"Green Component" : 0.82547998428344727
}
},
"layout advanced configuration dictionary value" : {
"remove empty components" : false,
"font" : ".AppleSystemUIFont 12",
"algorithm" : 1,
"auto-rainbow style" : 0
}
}
},
{
"class" : "iTermStatusBarNetworkUtilizationComponent",
"configuration" : {
"knobs" : {
"base: priority" : 5,
"shared text color" : {
"Red Component" : 0.72935998439788818,
"Color Space" : "sRGB",
"Blue Component" : 0.89999997615814209,
"Alpha Component" : 1,
"Green Component" : 0.62999999523162842
}
},
"layout advanced configuration dictionary value" : {
"remove empty components" : false,
"font" : ".AppleSystemUIFont 12",
"algorithm" : 1,
"auto-rainbow style" : 0
}
}
},
{
"class" : "iTermStatusBarBatteryComponent",
"configuration" : {
"knobs" : {
"ShowPercentage" : 1,
"base: priority" : 5,
"shared text color" : {
"Red Component" : 0.89999997615814209,
"Color Space" : "sRGB",
"Blue Component" : 0.77579998970031738,
"Alpha Component" : 1,
"Green Component" : 0.62999999523162842
},
"ShowTime" : 0
},
"layout advanced configuration dictionary value" : {
"remove empty components" : false,
"font" : ".AppleSystemUIFont 12",
"algorithm" : 1,
"auto-rainbow style" : 0
}
}
}
],
"advanced configuration" : {
"remove empty components" : false,
"font" : ".AppleSystemUIFont 12",
"algorithm" : 1,
"auto-rainbow style" : 0
}
},
"Hide After Opening" : false,
"Flashing Bell" : false,
"Cursor Guide Color" : {
"Red Component" : 0.70213186740875244,
"Color Space" : "sRGB",
"Blue Component" : 1,
"Alpha Component" : 0.25,
"Green Component" : 0.9268307089805603
},
"BM Growl" : true,
"Ansi 3 Color" : {
"Green Component" : 0.72656995058059692,
"Red Component" : 1,
"Blue Component" : 0
},
"Icon" : 1,
"Use Non-ASCII Font" : false,
"Link Color" : {
"Red Component" : 0,
"Color Space" : "sRGB",
"Blue Component" : 0.73423302173614502,
"Alpha Component" : 1,
"Green Component" : 0.35916060209274292
},
"Shortcut" : "",
"Background Image Location" : "",
"Bold Color" : {
"Red Component" : 0.73150634765625,
"Color Space" : "sRGB",
"Blue Component" : 0.73150634765625,
"Alpha Component" : 1,
"Green Component" : 0.73150634765625
},
"Unlimited Scrollback" : true,
"Custom Command" : "No",
"Smart Selection Rules" : [
{
"notes" : "Word bounded by whitespace",
"regex" : "\\S+",
"precision" : "low"
},
{
"notes" : "C++ namespace::identifier",
"regex" : "([a-zA-Z0-9_]+::)+[a-zA-Z0-9_]+",
"precision" : "normal"
},
{
"notes" : "Paths",
"regex" : "\\~?\/?([[:letter:][:number:]._-]+\/+)+[[:letter:][:number:]._-]+\/?",
"precision" : "normal"
},
{
"notes" : "Quoted string",
"regex" : "@?\"(?:[^\"\\\\]|\\\\.)*\"",
"precision" : "normal"
},
{
"notes" : "Java\/Python include paths",
"regex" : "([[:letter:][:number:]._]+\\.)+[[:letter:][:number:]._]+",
"precision" : "normal"
},
{
"notes" : "mailto URL",
"regex" : "\\bmailto:([a-z0-9A-Z_]+@)?([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9\\-]+\\b",
"precision" : "normal"
},
{
"notes" : "Obj-C selector",
"regex" : "@selector\\([^)]+\\)",
"precision" : "high"
},
{
"notes" : "email address",
"regex" : "\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}\\b",
"precision" : "high"
},
{
"notes" : "HTTP URL",
"regex" : "https?:\/\/([a-z0-9A-Z]+(:[a-zA-Z0-9]+)?@)?([a-z0-9A-Z][-a-z0-9A-Z]*\\.)+[A-Za-z][-A-Za-z]*((:[0-9]+)?)(\/[a-zA-Z0-9;\/\\.\\-_+%?&@=#\\(\\)~]*)?",
"precision" : "very_high"
},
{
"notes" : "SSH URL",
"precision" : "very_high",
"regex" : "\\bssh:([a-z0-9A-Z_]+@)?([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9\\-]+\\b",
"actions" : [
]
},
{
"notes" : "Telnet URL",
"regex" : "\\btelnet:([a-z0-9A-Z_]+@)?([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9\\-]+\\b",
"precision" : "very_high"
}
],
"Title Components" : 2,
"Keyboard Map" : {
"0x5e-0x60000" : {
"Text" : "0x1e",
"Action" : 11
},
"0xf702-0x280000" : {
"Action" : 10,
"Text" : "b"
},
"0xf702-0x260000" : {
"Text" : "0x1b 0x1b 0x5b 0x44",
"Action" : 11
},
"0xf703-0x280000" : {
"Action" : 10,
"Text" : "f"
},
"0xf70a-0x20000" : {
"Text" : "[28~",
"Action" : 10
},
"0xf703-0x260000" : {
"Text" : "[C",
"Action" : 10
},
"0x2d-0x40000" : {
"Text" : "0x1f",
"Action" : 11
},
"0xf702-0x220000" : {
"Text" : "[D",
"Action" : 10
},
"0xf703-0x240000" : {
"Text" : "[5C",
"Action" : 10
},
"0xf703-0x220000" : {
"Text" : "[C",
"Action" : 10
},
"0xf700-0x280000" : {
"Text" : "[A",
"Action" : 10
},
"0xf72b-0x20000" : {
"Text" : "[F",
"Action" : 10
},
"0xf700-0x260000" : {
"Text" : "[A",
"Action" : 10
},
"0xf701-0x280000" : {
"Text" : "[B",
"Action" : 10
},
"0xf700-0x240000" : {
"Text" : "[A",
"Action" : 10
},
"0xf701-0x260000" : {
"Text" : "[B",
"Action" : 10
},
"0xf700-0x220000" : {
"Text" : "[A",
"Action" : 10
},
"0xf701-0x240000" : {
"Text" : "[B",
"Action" : 10
},
"0xf72b-0x40000" : {
"Text" : "",
"Action" : 4
},
"0xf708-0x20000" : {
"Text" : "[25~",
"Action" : 10
},
"0xf701-0x220000" : {
"Text" : "[B",
"Action" : 10
},
"0xf709-0x20000" : {
"Text" : "[26~",
"Action" : 10
},
"0xf70b-0x20000" : {
"Text" : "[29~",
"Action" : 10
},
"0xf702-0x240000" : {
"Text" : "[5D",
"Action" : 10
},
"0xf729-0x20000" : {
"Text" : "[H",
"Action" : 10
},
"0xf729-0x40000" : {
"Text" : "",
"Action" : 5
}
},
"Ansi 14 Color" : {
"Green Component" : 1,
"Red Component" : 0.4042010611351281,
"Blue Component" : 0.94094775504779782
},
"Ansi 2 Color" : {
"Green Component" : 0.88189995288848877,
"Red Component" : 0.54928803443908691,
"Blue Component" : 0.04123397171497345
},
"Send Code When Idle" : false,
"ASCII Anti Aliased" : true,
"Tags" : [
],
"Ansi 9 Color" : {
"Green Component" : 0.15470406080870669,
"Red Component" : 1,
"Blue Component" : 0.24923402424592656
},
"Use Bold Font" : true,
"Silence Bell" : false,
"Ansi 12 Color" : {
"Green Component" : 0.5733030673510271,
"Red Component" : 0.00053359762918048226,
"Blue Component" : 1
},
"Window Type" : 0,
"Allow Title Reporting" : false,
"Use Bright Bold" : true,
"Has Hotkey" : false,
"Cursor Text Color" : {
"Green Component" : 0,
"Red Component" : 1,
"Blue Component" : 0.0940093994140625
},
"Default Bookmark" : "No",
"Cursor Color" : {
"Green Component" : 0,
"Red Component" : 1,
"Blue Component" : 0.0940093994140625
},
"Ansi 1 Color" : {
"Green Component" : 0,
"Red Component" : 1,
"Blue Component" : 0.058871746063232422
},
"Name" : "JJ-ZSH",
"Blinking Cursor" : true,
"Guid" : "EDCECF3F-4620-4117-8E79-0B8C58327F3E",
"Ansi 8 Color" : {
"Green Component" : 0.26696832579185525,
"Red Component" : 0.26696832579185525,
"Blue Component" : 0.26696832579185525
},
"Ansi 10 Color" : {
"Green Component" : 0.88189995290000001,
"Red Component" : 0.67126059688058637,
"Blue Component" : 0.35646489677720017
},
"Idle Code" : 0,
"Badge Color" : {
"Red Component" : 1,
"Color Space" : "sRGB",
"Blue Component" : 0,
"Alpha Component" : 0.5,
"Green Component" : 0.1491314172744751
},
"Ambiguous Double Width" : false,
"Blur Radius" : 8.6593730171319798,
"Cursor Type" : 1,
"Ansi 0 Color" : {
"Green Component" : 0.13574660633484159,
"Red Component" : 0.13574660633484159,
"Blue Component" : 0.13574660633484159
},
"Session Close Undo Timeout" : 15,
"Blur" : true,
"Normal Font" : "Menlo-Regular 12",
"Vertical Spacing" : 1.3,
"Ansi 7 Color" : {
"Green Component" : 1,
"Red Component" : 1,
"Blue Component" : 1
},
"Command" : "",
"Terminal Type" : "xterm-256color",
"Horizontal Spacing" : 1,
"Option Key Sends" : 2,
"Only The Default BG Color Uses Transparency" : true,
"Blink Allowed" : false,
"Ansi 15 Color" : {
"Green Component" : 1,
"Red Component" : 1,
"Blue Component" : 1
},
"Open Toolbelt" : false,
"Unicode Version" : 9,
"Ansi 6 Color" : {
"Green Component" : 0.84575581550598145,
"Red Component" : 0,
"Blue Component" : 0.92260181903839111
},
"Transparency" : 0,
"Background Color" : {
"Red Component" : 0.04681396484375,
"Color Space" : "sRGB",
"Blue Component" : 0.04681396484375,
"Alpha Component" : 1,
"Green Component" : 0.04681396484375
},
"Screen" : -1,
"Initial Use Transparency" : false,
"Bound Hosts" : [
],
"Non Ascii Font" : "Monaco 12",
"Ansi 13 Color" : {
"Green Component" : 0.37417232689266022,
"Red Component" : 0.60504487800788187,
"Blue Component" : 0.92307692307692313
},
"Columns" : 120,
"Visual Bell" : true,
"Custom Directory" : "No",
"Thin Strokes" : 4,
"ASCII Ligatures" : true
}

File diff suppressed because it is too large Load Diff

469
iterm/default.json Normal file
View File

@ -0,0 +1,469 @@
{
"ASCII Ligatures" : true,
"Working Directory" : "\/Users\/jake",
"Prompt Before Closing 2" : false,
"Selected Text Color" : {
"Red Component" : 0,
"Color Space" : "sRGB",
"Blue Component" : 0,
"Alpha Component" : 1,
"Green Component" : 0
},
"Rows" : 38,
"Ansi 11 Color" : {
"Red Component" : 0.95294123888015747,
"Color Space" : "sRGB",
"Blue Component" : 0.61568623781204224,
"Alpha Component" : 1,
"Green Component" : 0.97647064924240112
},
"Use Italic Font" : true,
"Foreground Color" : {
"Red Component" : 0.93725490570068359,
"Color Space" : "sRGB",
"Blue Component" : 0.92156857252120972,
"Alpha Component" : 1,
"Green Component" : 0.94117647409439087
},
"Right Option Key Sends" : 0,
"Show Status Bar" : false,
"Character Encoding" : 4,
"Selection Color" : {
"Red Component" : 0.57319694757461548,
"Color Space" : "sRGB",
"Blue Component" : 0.81719964742660522,
"Alpha Component" : 1,
"Green Component" : 0.73586553335189819
},
"Blend" : 0.50457144474637694,
"Show Mark Indicators" : false,
"Mouse Reporting" : true,
"Ansi 4 Color" : {
"Red Component" : 0.34117650985717773,
"Color Space" : "sRGB",
"Blue Component" : 0.99999994039535522,
"Alpha Component" : 1,
"Green Component" : 0.78039222955703735
},
"Non-ASCII Anti Aliased" : true,
"Sync Title" : false,
"Disable Window Resizing" : true,
"Description" : "Default",
"Close Sessions On End" : true,
"Jobs to Ignore" : [
"rlogin",
"ssh",
"slogin",
"telnet"
],
"Scrollback Lines" : 0,
"Draw Powerline Glyphs" : false,
"Status Bar Layout" : {
"components" : [
{
"class" : "iTermStatusBarSpringComponent",
"configuration" : {
"knobs" : {
"base: priority" : 5,
"iTermStatusBarSpringComponentSpringConstantKey" : 0.01,
"base: compression resistance" : 1,
"iTermStatusBarSpringComponentSizeMultipleKey" : 1
},
"layout advanced configuration dictionary value" : {
"auto-rainbow style" : 0,
"algorithm" : 1,
"remove empty components" : false
}
}
}
],
"advanced configuration" : {
"remove empty components" : true,
"font" : ".AppleSystemUIFont 12",
"algorithm" : 1,
"auto-rainbow style" : 0
}
},
"Hide After Opening" : false,
"Brighten Bold Text" : true,
"Flashing Bell" : false,
"Cursor Guide Color" : {
"Red Component" : 0.70213186740875244,
"Color Space" : "sRGB",
"Blue Component" : 1,
"Alpha Component" : 0.25,
"Green Component" : 0.9268307089805603
},
"BM Growl" : false,
"AWDS Window Directory" : "",
"Open Password Manager Automatically" : false,
"Icon" : 1,
"Link Color" : {
"Red Component" : 0.29264676570892334,
"Color Space" : "sRGB",
"Blue Component" : 0.85775750875473022,
"Alpha Component" : 1,
"Green Component" : 0.66938728094100952
},
"Shortcut" : "",
"Use Non-ASCII Font" : false,
"Ansi 3 Color" : {
"Red Component" : 0.95294123888015747,
"Color Space" : "sRGB",
"Blue Component" : 0.61568623781204224,
"Alpha Component" : 1,
"Green Component" : 0.97647064924240112
},
"Background Image Location" : "",
"Bold Color" : {
"Red Component" : 0.97102361917495728,
"Color Space" : "sRGB",
"Blue Component" : 0.97102349996566772,
"Alpha Component" : 1,
"Green Component" : 0.97102349996566772
},
"Unlimited Scrollback" : true,
"Custom Command" : "No",
"AWDS Tab Option" : "No",
"Smart Selection Rules" : [
{
"notes" : "Word bounded by whitespace",
"regex" : "\\S+",
"precision" : "low"
},
{
"notes" : "C++ namespace::identifier",
"regex" : "([a-zA-Z0-9_]+::)+[a-zA-Z0-9_]+",
"precision" : "normal"
},
{
"notes" : "Paths",
"regex" : "\\~?\/?([[:letter:][:number:]._-]+\/+)+[[:letter:][:number:]._-]+\/?",
"precision" : "normal"
},
{
"notes" : "Quoted string",
"regex" : "@?\"(?:[^\"\\\\]|\\\\.)*\"",
"precision" : "normal"
},
{
"notes" : "Java\/Python include paths",
"regex" : "([[:letter:][:number:]._]+\\.)+[[:letter:][:number:]._]+",
"precision" : "normal"
},
{
"notes" : "mailto URL",
"regex" : "\\bmailto:([a-z0-9A-Z_]+@)?([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9\\-]+\\b",
"precision" : "normal"
},
{
"notes" : "Obj-C selector",
"regex" : "@selector\\([^)]+\\)",
"precision" : "high"
},
{
"notes" : "email address",
"regex" : "\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}\\b",
"precision" : "high"
},
{
"notes" : "HTTP URL",
"regex" : "https?:\/\/([a-z0-9A-Z]+(:[a-zA-Z0-9]+)?@)?([a-z0-9A-Z][-a-z0-9A-Z]*\\.)+[A-Za-z][-A-Za-z]*((:[0-9]+)?)(\/[a-zA-Z0-9;\/\\.\\-_+%?&@=#\\(\\)~]*)?",
"precision" : "very_high"
},
{
"notes" : "SSH URL",
"precision" : "very_high",
"regex" : "\\bssh:([a-z0-9A-Z_]+@)?([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9\\-]+\\b",
"actions" : [
]
},
{
"notes" : "Telnet URL",
"regex" : "\\btelnet:([a-z0-9A-Z_]+@)?([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9\\-]+\\b",
"precision" : "very_high"
}
],
"Title Components" : 2,
"Keyboard Map" : {
"0x5e-0x60000" : {
"Action" : 11,
"Text" : "0x1e"
},
"0xf702-0x280000" : {
"Text" : "b",
"Action" : 10
},
"0xf702-0x260000" : {
"Action" : 11,
"Text" : "0x1b 0x1b 0x5b 0x44"
},
"0xf703-0x280000" : {
"Text" : "f",
"Action" : 10
},
"0xf70a-0x20000" : {
"Action" : 10,
"Text" : "[28~"
},
"0xf703-0x260000" : {
"Action" : 10,
"Text" : "[C"
},
"0x2d-0x40000" : {
"Action" : 11,
"Text" : "0x1f"
},
"0xf702-0x220000" : {
"Action" : 10,
"Text" : "[D"
},
"0xf703-0x240000" : {
"Action" : 10,
"Text" : "[5C"
},
"0xf703-0x220000" : {
"Action" : 10,
"Text" : "[C"
},
"0xf700-0x280000" : {
"Action" : 10,
"Text" : "[A"
},
"0xf72b-0x20000" : {
"Action" : 10,
"Text" : "[F"
},
"0xf700-0x260000" : {
"Action" : 10,
"Text" : "[A"
},
"0xf701-0x280000" : {
"Action" : 10,
"Text" : "[B"
},
"0xf700-0x240000" : {
"Action" : 10,
"Text" : "[A"
},
"0xf701-0x260000" : {
"Action" : 10,
"Text" : "[B"
},
"0xf700-0x220000" : {
"Action" : 10,
"Text" : "[A"
},
"0xf701-0x240000" : {
"Action" : 10,
"Text" : "[B"
},
"0xf72b-0x40000" : {
"Action" : 4,
"Text" : ""
},
"0xf708-0x20000" : {
"Action" : 10,
"Text" : "[25~"
},
"0xf701-0x220000" : {
"Action" : 10,
"Text" : "[B"
},
"0xf709-0x20000" : {
"Action" : 10,
"Text" : "[26~"
},
"0xf70b-0x20000" : {
"Action" : 10,
"Text" : "[29~"
},
"0xf702-0x240000" : {
"Action" : 10,
"Text" : "[5D"
},
"0xf729-0x20000" : {
"Action" : 10,
"Text" : "[H"
},
"0xf729-0x40000" : {
"Action" : 5,
"Text" : ""
}
},
"Ansi 14 Color" : {
"Red Component" : 0.60392171144485474,
"Color Space" : "sRGB",
"Blue Component" : 0.99607843160629272,
"Alpha Component" : 1,
"Green Component" : 0.92941170930862427
},
"Ansi 2 Color" : {
"Red Component" : 0.35294127464294434,
"Color Space" : "sRGB",
"Blue Component" : 0.55686265230178833,
"Alpha Component" : 1,
"Green Component" : 0.96862751245498657
},
"Send Code When Idle" : false,
"ASCII Anti Aliased" : true,
"Tags" : [
],
"Ansi 9 Color" : {
"Red Component" : 1,
"Color Space" : "sRGB",
"Blue Component" : 0.34117639064788818,
"Alpha Component" : 1,
"Green Component" : 0.36078426241874695
},
"Use Bold Font" : true,
"Silence Bell" : false,
"Ansi 12 Color" : {
"Red Component" : 0.34117650985717773,
"Color Space" : "sRGB",
"Blue Component" : 0.99999994039535522,
"Alpha Component" : 1,
"Green Component" : 0.78039222955703735
},
"Window Type" : 0,
"Allow Title Reporting" : false,
"Use Bright Bold" : true,
"Has Hotkey" : false,
"Cursor Text Color" : {
"Red Component" : 0.15686270594596863,
"Color Space" : "sRGB",
"Blue Component" : 0.21176469326019287,
"Alpha Component" : 1,
"Green Component" : 0.16470584273338318
},
"Default Bookmark" : "No",
"Cursor Color" : {
"Red Component" : 0.91646724939346313,
"Color Space" : "sRGB",
"Blue Component" : 0.91647690534591675,
"Alpha Component" : 1,
"Green Component" : 0.91648870706558228
},
"Ansi 1 Color" : {
"Red Component" : 1,
"Color Space" : "sRGB",
"Blue Component" : 0.34117639064788818,
"Alpha Component" : 1,
"Green Component" : 0.36078426241874695
},
"Name" : "Default",
"Guid" : "EDCECF3F-4620-4117-8E79-0B8C58327F3E",
"Blinking Cursor" : true,
"Ansi 8 Color" : {
"Red Component" : 0.40784323215484619,
"Color Space" : "sRGB",
"Blue Component" : 0.40784311294555664,
"Alpha Component" : 1,
"Green Component" : 0.40784311294555664
},
"Ansi 10 Color" : {
"Red Component" : 0.35294127464294434,
"Color Space" : "sRGB",
"Blue Component" : 0.55686265230178833,
"Alpha Component" : 1,
"Green Component" : 0.96862751245498657
},
"Idle Code" : 0,
"Badge Color" : {
"Red Component" : 1,
"Color Space" : "sRGB",
"Blue Component" : 0,
"Alpha Component" : 0.5,
"Green Component" : 0.1491314172744751
},
"Semantic History" : {
"text" : "",
"action" : "editor",
"editor" : "com.microsoft.VSCode"
},
"Ambiguous Double Width" : false,
"Blur Radius" : 10.045428856382978,
"Cursor Type" : 1,
"Ansi 0 Color" : {
"Red Component" : 0,
"Color Space" : "sRGB",
"Blue Component" : 0,
"Alpha Component" : 1,
"Green Component" : 0
},
"AWDS Pane Directory" : "",
"Blur" : true,
"Normal Font" : "SFMonoNerdFontComplete-Regular 12",
"Vertical Spacing" : 1.3,
"Session Close Undo Timeout" : 15,
"Ansi 7 Color" : {
"Red Component" : 0.94509810209274292,
"Color Space" : "sRGB",
"Blue Component" : 0.94117647409439087,
"Alpha Component" : 1,
"Green Component" : 0.94509810209274292
},
"Space" : 0,
"AWDS Tab Directory" : "",
"AWDS Pane Option" : "No",
"Command" : "",
"Terminal Type" : "xterm-256color",
"Horizontal Spacing" : 1,
"Option Key Sends" : 2,
"Only The Default BG Color Uses Transparency" : true,
"Blink Allowed" : false,
"Minimum Contrast" : 0,
"Ansi 15 Color" : {
"Red Component" : 0.94509810209274292,
"Color Space" : "sRGB",
"Blue Component" : 0.94117647409439087,
"Alpha Component" : 1,
"Green Component" : 0.94509810209274292
},
"Open Toolbelt" : false,
"Unicode Version" : 9,
"Ansi 6 Color" : {
"Red Component" : 0.60392171144485474,
"Color Space" : "sRGB",
"Blue Component" : 0.99607843160629272,
"Alpha Component" : 1,
"Green Component" : 0.92941170930862427
},
"Transparency" : 0.037799202127659574,
"Initial Text" : "",
"Background Color" : {
"Red Component" : 0.078431372549019607,
"Color Space" : "sRGB",
"Blue Component" : 0.078431372549019607,
"Alpha Component" : 1,
"Green Component" : 0.078431372549019607
},
"Screen" : -1,
"Initial Use Transparency" : true,
"AWDS Window Option" : "No",
"Bound Hosts" : [
],
"Non Ascii Font" : "SFMonoNerdFontComplete-Regular 12",
"Ansi 13 Color" : {
"Red Component" : 1,
"Color Space" : "sRGB",
"Blue Component" : 0.75686269998550415,
"Alpha Component" : 1,
"Green Component" : 0.4156862199306488
},
"Columns" : 120,
"Use Tab Color" : false,
"Visual Bell" : true,
"Custom Directory" : "No",
"Ansi 5 Color" : {
"Red Component" : 1,
"Color Space" : "sRGB",
"Blue Component" : 0.75686269998550415,
"Alpha Component" : 1,
"Green Component" : 0.4156862199306488
},
"Thin Strokes" : 4
}

View File

@ -7,24 +7,24 @@
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.18094024062156677</real>
<real>0.0</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.18094304203987122</real>
<real>0.0</real>
<key>Red Component</key>
<real>0.18093785643577576</real>
<real>0.0</real>
</dict>
<key>Ansi 1 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.054613023996353149</real>
<real>0.34117639064788818</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.15000113844871521</real>
<real>0.36078426241874695</real>
<key>Red Component</key>
<real>1</real>
</dict>
@ -33,180 +33,180 @@
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.42974600195884705</real>
<real>0.55686265230178833</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.89148491621017456</real>
<real>0.96862751245498657</real>
<key>Red Component</key>
<real>0.72157114744186401</real>
<real>0.35294127464294434</real>
</dict>
<key>Ansi 11 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.32224351167678833</real>
<real>0.61568623781204224</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.84866994619369507</real>
<real>0.97647064924240112</real>
<key>Red Component</key>
<real>1</real>
<real>0.95294123888015747</real>
</dict>
<key>Ansi 12 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>1</real>
<real>0.99999994039535522</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.65062606334686279</real>
<real>0.78039222955703735</real>
<key>Red Component</key>
<real>0.0</real>
<real>0.34117650985717773</real>
</dict>
<key>Ansi 13 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.93940186500549316</real>
<real>0.75686269998550415</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.48187243938446045</real>
<real>0.4156862199306488</real>
<key>Red Component</key>
<real>0.67381459474563599</real>
<real>1</real>
</dict>
<key>Ansi 14 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.95343631505966187</real>
<real>0.99607843160629272</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.99162548780441284</real>
<real>0.92941170930862427</real>
<key>Red Component</key>
<real>0.45578873157501221</real>
<real>0.60392171144485474</real>
</dict>
<key>Ansi 15 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>1</real>
<real>0.94117647409439087</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>1</real>
<real>0.94509810209274292</real>
<key>Red Component</key>
<real>0.99999600648880005</real>
<real>0.94509810209274292</real>
</dict>
<key>Ansi 2 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.019149409607052803</real>
<real>0.55686265230178833</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.88745319843292236</real>
<real>0.96862751245498657</real>
<key>Red Component</key>
<real>0.60763847827911377</real>
<real>0.35294127464294434</real>
</dict>
<key>Ansi 3 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.0</real>
<real>0.61568623781204224</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.76917916536331177</real>
<real>0.97647064924240112</real>
<key>Red Component</key>
<real>1</real>
<real>0.95294123888015747</real>
</dict>
<key>Ansi 4 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.97967463731765747</real>
<real>0.99999994039535522</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.63372808694839478</real>
<real>0.78039222955703735</real>
<key>Red Component</key>
<real>0.0</real>
<real>0.34117650985717773</real>
</dict>
<key>Ansi 5 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.70985788106918335</real>
<real>0.75686269998550415</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.35739818215370178</real>
<real>0.4156862199306488</real>
<key>Red Component</key>
<real>0.50483828783035278</real>
<real>1</real>
</dict>
<key>Ansi 6 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.93896776437759399</real>
<real>0.99607843160629272</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.87004786729812622</real>
<real>0.92941170930862427</real>
<key>Red Component</key>
<real>0.0</real>
<real>0.60392171144485474</real>
</dict>
<key>Ansi 7 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>1</real>
<real>0.94117647409439087</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>1</real>
<real>0.94509810209274292</real>
<key>Red Component</key>
<real>0.99999600648880005</real>
<real>0.94509810209274292</real>
</dict>
<key>Ansi 8 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.33683216571807861</real>
<real>0.40784311294555664</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.33683684468269348</real>
<real>0.40784311294555664</real>
<key>Red Component</key>
<real>0.33682817220687866</real>
<real>0.40784323215484619</real>
</dict>
<key>Ansi 9 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.31419616937637329</real>
<real>0.34117639064788818</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.26015520095825195</real>
<real>0.36078426241874695</real>
<key>Red Component</key>
<real>1</real>
</dict>
@ -215,13 +215,13 @@
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.04681396484375</real>
<real>0.078431375324726105</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.04681396484375</real>
<real>0.078431375324726105</real>
<key>Red Component</key>
<real>0.04681396484375</real>
<real>0.078431375324726105</real>
</dict>
<key>Badge Color</key>
<dict>
@ -241,26 +241,26 @@
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.73150634765625</real>
<real>0.97102349996566772</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.73150634765625</real>
<real>0.97102349996566772</real>
<key>Red Component</key>
<real>0.73150634765625</real>
<real>0.97102361917495728</real>
</dict>
<key>Cursor Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.11473541706800461</real>
<real>0.91647690534591675</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.15114313364028931</real>
<real>0.91648870706558228</real>
<key>Red Component</key>
<real>1</real>
<real>0.91646724939346313</real>
</dict>
<key>Cursor Guide Color</key>
<dict>
@ -280,65 +280,65 @@
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.11473541706800461</real>
<real>0.21176469326019287</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.15114313364028931</real>
<real>0.16470584273338318</real>
<key>Red Component</key>
<real>1</real>
<real>0.15686270594596863</real>
</dict>
<key>Foreground Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.96449297666549683</real>
<real>0.92156857252120972</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.98419922590255737</real>
<real>0.94117647409439087</real>
<key>Red Component</key>
<real>1</real>
<real>0.93725490570068359</real>
</dict>
<key>Link Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.73423302173614502</real>
<real>0.85775750875473022</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.35916060209274292</real>
<real>0.66938728094100952</real>
<key>Red Component</key>
<real>0.0</real>
<real>0.29264676570892334</real>
</dict>
<key>Selected Text Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>1</real>
<real>0.0</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>1</real>
<real>0.0</real>
<key>Red Component</key>
<real>0.99999600648880005</real>
<real>0.0</real>
</dict>
<key>Selection Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.29662126302719116</real>
<real>0.81719964742660522</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.21898511052131653</real>
<real>0.73586553335189819</real>
<key>Red Component</key>
<real>0.0</real>
<real>0.57319694757461548</real>
</dict>
</dict>
</plist>

View File

@ -37,7 +37,7 @@ defaults write NSGlobalDomain AppleMeasurementUnits -string "Inches"
defaults write NSGlobalDomain AppleMetricUnits -bool false
# Set the timezone (see `sudo systemsetup -listtimezones` for other values)
sudo systemsetup -settimezone "America/New_York" > /dev/null
sudo systemsetup -settimezone "America/New_York" >/dev/null
# Disable audio feedback when volume is changed
defaults write com.apple.sound.beep.feedback -bool false

View File

@ -3,9 +3,9 @@
set -euo pipefail
# This shouldn't be run if not on macOS, but make double sure
if [ ! "$(uname)" = "Darwin" ]; then
if [[ ! "$(uname)" = "Darwin" ]]; then
echo "Skipping macOS steps."
exit 0
return
fi
# Ask for the administrator password upfront
@ -24,14 +24,10 @@ sudo xcodebuild -license accept
# This whole thing kinda hinges on having Homebrew...
# Check for it and install from GitHub if it's not there
# shellcheck disable=SC2230
if [ ! "$(which brew)" ]; then
if [[ ! "$(which brew)" ]]; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# fix zplug
ln -s "$(brew --prefix)/opt/zplug" ~/.zplug
# Disable analytics
# https://docs.brew.sh/Analytics
brew analytics off
@ -49,6 +45,11 @@ chsh -s "$(brew --prefix)/bin/zsh"
chmod 755 "$(brew --prefix)/share/zsh"
chmod 755 "$(brew --prefix)/share/zsh/site-functions"
# install zinit
ZINIT_HOME="$HOME/.local/share/zinit/zinit.git"
mkdir -p "$(dirname "$ZINIT_HOME")"
git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
# 1Password SSH integration
# https://developer.1password.com/docs/ssh/get-started#step-4-configure-your-ssh-or-git-client
mkdir -p ~/.1password
@ -60,5 +61,4 @@ brew bundle || true
# Set macOS defaults
# Needs to be last since this will restart everything when done
# shellcheck disable=SC1091
source ./macos/defaults.sh

BIN
misc/nerd_font.zip Normal file

Binary file not shown.

BIN
misc/screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 700 KiB

View File

@ -1,15 +1,15 @@
# Enable built-in syntax highlighting
include "/opt/homebrew/Cellar/nano/*/share/nano/*.nanorc"
# include "/opt/homebrew/Cellar/nano/*/share/nano/*.nanorc"
# Non-default settings
set historylog # Save the last 100 history searches for later use.
# set positionlog # Saves the cursor position between editing sessions.
set zap # Allows you to highlight text (CTRL+SHIFT+ARROW) and delete it with backspace.
set autoindent # A new line will have the same number of leading spaces as the previous one.
# set tabsize 2
# set tabstospaces
set afterends # Ctrl+Right moves to end of word instead of beginning.
set wordchars "_" # Recognize _ as part of a word.
set autoindent # A new line will have the same number of tabs/leading spaces as the previous one.
# set tabsize 2
# set tabstospaces
# Fix option+left/right word skipping
# https://unix.stackexchange.com/a/392309

View File

@ -3,8 +3,7 @@
set -euo pipefail
# fetch and install Volta (better nvm)
if ! command -v volta &> /dev/null
then
if ! command -v volta &>/dev/null; then
# curl https://get.volta.sh | bash -s -- --skip-setup
brew install volta
fi
@ -30,8 +29,10 @@ packages=(
dtslint
dts-gen
esbuild
eslint
gzip-size-cli
json-server
markdownlint-cli2
netlify-cli
nodemon
np
@ -58,4 +59,6 @@ for p in "${packages[@]}"; do
volta run --no-yarn -- npm install --global "$p" || echo "$p not found"
done
unset p packages
volta list all

View File

@ -47,12 +47,6 @@ Host gitea
User root
ForwardAgent yes
Host tor
# tailscale IP:
HostName 100.118.144.19
User root
ForwardAgent yes
Host y2k
# tailscale IP:
HostName 100.79.167.105
@ -72,12 +66,6 @@ Host seed
User jake
ForwardAgent yes
Host argo
# home net:
HostName 192.168.20.13
User jake
ForwardAgent yes
Host github.com
HostName github.com
User git

105
starship/config.toml Normal file
View File

@ -0,0 +1,105 @@
# https://starship.rs/config/
"$schema" = 'https://starship.rs/config-schema.json'
# A minimal left prompt:
# format = """$character"""
# right_format = """$all"""
[aws]
disabled = true
[battery]
disabled = true
[cmd_duration]
min_time = 2500
[container]
disabled = true
[directory]
truncation_length = 0
truncate_to_repo = false
read_only = " "
[directory.substitutions]
"~" = " ~"
" ~/Documents" = " ~/Documents"
" ~/Downloads" = " ~/Downloads"
" ~/Desktop" = " ~/Desktop"
" ~/Music" = " ~/Music"
" ~/Pictures" = " ~/Pictures"
" ~/Library" = " ~/Library"
" ~/Dropbox" = " ~/Dropbox"
" ~/source" = " ~/source"
" ~/.dotfiles" = " ~/.dotfiles"
[docker_context]
symbol = " "
[gcloud]
disabled = true
[git_branch]
symbol = " "
[git_commit]
tag_symbol = " "
tag_disabled = false
format = '[ $hash$tag]($style) '
[git_status]
style = "bold bright-yellow"
format = '([ $all_status$ahead_behind]($style) )'
ignore_submodules = true
renamed = ""
deleted = ""
stashed = ""
[golang]
symbol = " "
[localip]
disabled = true
[nodejs]
symbol = " "
[os.symbols]
Alpine = " "
Arch = " "
CentOS = " "
Debian = " "
Fedora = " "
FreeBSD = " "
Gentoo = " "
Linux = " "
Macos = " "
Mint = " "
NixOS = " "
OpenBSD = " "
openSUSE = " "
Raspbian = " "
Redhat = " "
RedHatEnterprise = " "
Ubuntu = " "
Unknown = " "
Windows = " "
[package]
symbol = " "
[php]
symbol = " "
[python]
symbol = " "
[ruby]
symbol = " "
[rust]
symbol = " "
[vagrant]
disabled = true

View File

@ -1,8 +1,6 @@
// Place your settings in this file to overwrite the default settings
{
"telemetry.telemetryLevel": "off",
"editor.fontFamily": "'SF Mono', Menlo, Monaco, 'Courier New', monospace",
"editor.fontSize": 12.5,
"editor.lineHeight": 23,
"editor.tabSize": 2,
"editor.rulers": [
@ -40,7 +38,6 @@
"git.scanRepositories": [
"~/source"
],
"html.format.endWithNewline": true,
"css.lint.important": "warning",
"css.lint.unknownVendorSpecificProperties": "warning",
"css.lint.zeroUnits": "warning",
@ -49,19 +46,8 @@
"scss.validate": false,
"scss.lint.zeroUnits": "warning",
"stylelint.reportNeedlessDisables": true,
"go.useLanguageServer": true,
"go.lintTool": "golangci-lint",
"go.lintOnSave": "off",
"go.formatTool": "gofmt",
"go.buildOnSave": "off",
"go.vetOnSave": "off",
"php.validate.run": "onType",
"prettier.requireConfig": true,
"prettier.configPath": ".prettierrc",
"markdown.preview.lineHeight": 1.75,
"aws.telemetry": false,
"aws.profile": "profile:default",
"aws.cdk.explorer.enabled": false,
"githubPullRequests.defaultMergeMethod": "rebase",
"githubIssues.useBranchForIssues": "prompt",
"githubIssues.queries": [
@ -75,34 +61,10 @@
}
],
"dotfiles.repository": "https://github.com/jakejarvis/dotfiles.git",
"codespaces.accountProvider": "GitHub",
"material-icon-theme.activeIconPack": "none",
"material-icon-theme.showReloadMessage": false,
"material-icon-theme.showWelcomeMessage": false,
"material-icon-theme.folders.theme": "specific",
"settingsSync.ignoredSettings": [
],
"settingsSync.ignoredExtensions": [
"amazonwebservices.aws-toolkit-vscode",
"ms-vscode.azure-account",
"msjsdiag.debugger-for-chrome",
"firefox-devtools.vscode-firefox-debug",
"shan.code-settings-sync"
],
"docker.showStartPage": false,
"editor.minimap.enabled": false,
"editor.inlineSuggest.enabled": true,
"github.copilot.advanced": {
},
"github.copilot.enable": {
"*": true,
"yaml": false,
"plaintext": false,
"markdown": false,
"javascript": true
},
"diffEditor.ignoreTrimWhitespace": false,
"javascript.inlayHints.parameterNames.enabled": "all",
"javascript.inlayHints.parameterTypes.enabled": true,
@ -116,8 +78,9 @@
"typescript.inlayHints.parameterNames.enabled": "all",
"javascript.inlayHints.functionLikeReturnTypes.enabled": true,
"javascript.inlayHints.enumMemberValues.enabled": true,
"terminal.integrated.fontFamily": "'SF Mono Powerline', 'Meslo LG M for Powerline', Menlo, Monaco, 'Courier New', monospace",
"terminal.integrated.fontFamily": "'SFMono Nerd Font', 'SF Mono', 'Meslo LG M for Powerline', Menlo, Monaco, 'Courier New', monospace",
"terminal.integrated.defaultProfile.osx": "zsh",
"terminal.integrated.defaultProfile.linux": "zsh",
"terminal.integrated.lineHeight": 1.25,
"editor.renderWhitespace": "none",
"files.associations": {
@ -125,16 +88,12 @@
"*.htm": "html",
"*.mdx": "markdown"
},
"workbench.iconTheme": "material-icon-theme",
"explorer.autoReveal": "focusNoScroll",
"eslint.packageManager": "yarn",
"git.autoStash": true,
"git.defaultCloneDirectory": "~/source/",
"git.rebaseWhenSync": true,
"githubIssues.workingIssueFormatScm": "${issueTitle} (fixes #${issueNumber})",
"gulp.autoDetect": "on",
"html.format.templating": true,
"prettier.trailingComma": "all",
"dotfiles.targetPath": "~/.dotfiles",
"stylelint.packageManager": "yarn",
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": true,
@ -165,14 +124,17 @@
"remoteHub.richNavigation.enabled": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"typescript.updateImportsOnFileMove.enabled": "always",
"terminal.integrated.env.osx": {
"FIG_NEW_SESSION": "1"
},
"editor.accessibilitySupport": "off",
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.implementationsCodeLens.enabled": true,
"typescript.preferences.importModuleSpecifierEnding": "minimal",
"editor.inlayHints.enabled": false,
"editor.inlayHints.enabled": "off",
"editor.fontFamily": "'SF Mono', Menlo, Monaco, 'Courier New', monospace",
"editor.fontSize": 12.5,
"typescript.tsserver.log": "off",
"terminal.integrated.defaultProfile.linux": "zsh",
"workbench.iconTheme": "material-icon-theme",
"editor.unicodeHighlight.allowedCharacters": {
"": true
},
"githubPullRequests.pullBranch": "never"
}

0
zsh/.zprofile Normal file
View File

View File

@ -1,84 +1,14 @@
# uncomment to profile slow startup time
# zmodload zsh/zprof
# path to this directory:
export ZSH_CUSTOM=~/.dotfiles/zsh
# Path to cloned dotfiles repo
export DOTFILES=$HOME/.dotfiles
# Path to oh-my-zsh installation
export ZSH=$HOME/.oh-my-zsh
# Default to nano 'cause I'm a wimp
export EDITOR="nano"
export VISUAL="code"
# export BROWSER="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"
# export BROWSER="/Applications/Firefox.app/Contents/MacOS/firefox"
# Adjust history for speed
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
# Oh My ZSH settings
ZSH_CUSTOM=$DOTFILES/zsh
ZSH_THEME="agnoster"
DEFAULT_USER=jake
# Oh My ZSH plugins
plugins=(
colorize
history
macos
vscode
gitignore
gnu-utils
zsh-syntax-highlighting
zsh-autosuggestions
)
# Perform compinit only once a day for speed
# https://gist.github.com/ctechols/ca1035271ad134841284#gistcomment-2308206
autoload -Uz compinit
for dump in ~/.zcompdump(N.mh+24); do
# echo "reloading compinit"
compinit
# load .zsh files from the above dir in this order:
for _dotzsh in "$ZSH_CUSTOM"/custom/{common,env,path,aliases,functions,plugins,macos}.zsh; do
if [[ -f "$_dotzsh" ]]; then
source "$_dotzsh"
fi
done
compinit -C
unset _dotzsh
# Load everything!
source $ZSH/oh-my-zsh.sh
export ZPLUG_HOME=~/.zplug
source $ZPLUG_HOME/init.zsh
# Fix slow paste problem w/ zsh-syntax-highlighting plugin
# https://github.com/zsh-users/zsh-syntax-highlighting/issues/295
zstyle ':bracketed-paste-magic' active-widgets '.self-*'
# Prettify `ls`
# `man ls` to decode this mess
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
# Other miscellaneous settings
export HOMEBREW_NO_ANALYTICS=1
export HOMEBREW_NO_INSECURE_REDIRECT=1
# export HOMEBREW_CASK_OPTS=--require-sha
export NEXT_TELEMETRY_DISABLED=1
export GATSBY_TELEMETRY_DISABLED=1
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export SAM_CLI_TELEMETRY=0
export AZURE_CORE_COLLECT_TELEMETRY=0
export CHECKPOINT_DISABLE=1
# 1Password integrations
# https://developer.1password.com/docs/ssh/get-started/#step-4-configure-your-ssh-or-git-client
export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock
# https://developer.1password.com/docs/cli/shell-plugins/
source $HOME/.config/op/plugins.sh
# iTerm2
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
# uncomment to profile slow startup time
# zprof
# zmodload -u zsh/zprof
if [[ -f ~/.zshrc.local ]]; then
source ~/.zshrc.local
fi

View File

@ -1,20 +1,16 @@
# Enable aliases to be sudo'ed
# allow sudo-able aliases
alias sudo="sudo "
# restore colors to GNU ls
alias ls="ls -G --color=tty"
# colorful ls
alias ls="ls -G --color=auto"
alias ll="ls -lah"
alias la="ls -a"
alias l="ls -lh"
alias l="ll"
# typos
alias cd..="cd .."
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias ~="cd ~"
# easier dotfile tinkering
alias shreload="exec \$SHELL"
# Git
# git
alias g="git"
alias gc="git commit -m" # + commit message
alias gca="git add . && git commit -m" # + commit message
@ -26,54 +22,43 @@ alias gpom="git push origin main"
alias glom="git pull origin main"
alias gpo="git push origin" # + branch name
alias glo="git pull origin" # + branch name
alias gphm="git push hosted main" # self-hosted git
alias gb="git checkout" # + existing branch name
alias gbn="git checkout -b" # + new branch name
alias grm="git rebase -i origin/main"
alias gsub="git submodule update --recursive --remote"
alias gundo="git reset --soft HEAD~1"
alias greset="git reset"
alias gres="git reset"
alias github="gh repo view --web"
alias gist="gh gist create --web"
glall() {
# pull all remote branches
# https://stackoverflow.com/a/10312587
for remote in `git branch -r`; do git branch --track ${remote#origin/} $remote; done
git fetch --all
git pull --all
}
# Docker
alias d="docker"
# docker
alias dps="docker ps -a"
# build and run:
# https://stackoverflow.com/questions/45141402/build-and-run-dockerfile-with-one-command/59220656#59220656
dbar() {
docker build --no-cache . | tee /dev/tty | tail -n1 | cut -d' ' -f3 | xargs -I{} docker run --rm -i {}
# build and run:
# https://stackoverflow.com/questions/45141402/build-and-run-dockerfile-with-one-command/59220656#59220656
docker build --progress=plain --no-cache . | tee /dev/tty | tail -n1 | cut -d' ' -f3 | xargs -I{} docker run --rm -i {}
}
dsh() {
docker exec -it "$1" /bin/sh
}
dhub() {
# search docker hub by tag
curl -sS "https://registry.hub.docker.com/v2/repositories/$1/tags/" | jq '."results"[]["name"]' | sort
}
alias dc="docker-compose"
alias dcu="docker-compose up -d"
alias dcd="docker-compose down"
alias dcr="docker-compose down && docker-compose up -d"
alias dcl="docker-compose logs -f"
alias dc="docker compose"
alias dcu="docker compose up -d"
alias dcd="docker compose down"
alias dcr="docker compose down && docker compose up -d"
alias dcl="docker compose logs -f"
# Multipass
# multipass
alias mp="multipass"
mpl() {
# creates VM and opens its bash shell
# `mpl test1 20.04`
multipass launch ${2:-22.04} --cpus 4 --mem 4G --disk 20G --name "$1" && \
# `mpl test1 4G 20.04`
multipass launch "${2:-jammy}" --cpus 4 --mem "${3:-2G}" --disk 20G --name "$1" && \
multipass shell "$1"
}
alias mpls="multipass list"
alias mpsh="multipass shell"
alias mpk="multipass stop"
alias mpd="multipass delete"
alias mps="multipass shell"
# Node/NPM/Yarn
alias npr="npm run"
@ -81,36 +66,46 @@ alias fresh_npm="rm -rf node_modules package-lock.json && npm install"
alias fresh_yarn="rm -rf node_modules yarn.lock && yarn install"
# Hugo
# install from source
make_hugo() {
# parentheses lets us cd to Hugo path without changing our current location
(
cd "$GOPATH/src/github.com/gohugoio/hugo" \
&& /bin/bash -c "$GOPATH/bin/hugo env" \
&& bash -c "$GOPATH/bin/hugo env" \
&& git checkout master \
&& mage uninstall \
&& git pull origin master \
&& git reset --hard HEAD \
&& mage -v hugo \
&& HUGO_BUILD_TAGS=extended mage -v install \
&& /bin/bash -c "$GOPATH/bin/hugo env"
&& bash -c "$GOPATH/bin/hugo env"
)
}
# install from brew
alias hugo_brew="brew upgrade hugo --fetch-HEAD --build-from-source"
# run `hugo config` first to make sure we're in a Hugo directory:
alias hugo_clean="hugo config 1>/dev/null && rm -rf public/ resources/ build/"
# SSH
alias sshalt="ssh -p 2222"
alias moshalt="mosh --ssh=\"ssh -p 2222\""
alias pubkey="more ~/.ssh/id_ed25519.pub | pbcopy | echo '=> Public key copied to clipboard.'"
alias pubkey_rsa="more ~/.ssh/id_rsa.pub | pbcopy | echo '=> Public key copied to clipboard.'"
# an original creation, see https://github.com/jakejarvis/simpip
alias ipv4="curl -4 simpip.com --max-time 1 --proto-default https --silent"
alias ipv6="curl -6 simpip.com --max-time 1 --proto-default https --silent"
alias ip="ipv4; ipv6"
alias ip-local="ipconfig getifaddr en0"
alias ips="ip; ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'"
# Tailscale: https://tailscale.com/kb/1080/cli/?tab=macos
# keys
alias pubkey="pbcopy < ~/.ssh/id_ed25519.pub && echo '=> Public key copied to clipboard.'"
alias pubkey_rsa="pbcopy < ~/.ssh/id_rsa.pub && echo '=> Public key copied to clipboard.'"
# tailscale: https://tailscale.com/kb/1080/cli/?tab=macos
alias tailscale="/Applications/Tailscale.app/Contents/MacOS/Tailscale"
alias tscl="tailscale"
# youtube-dl
alias youtube-dl="yt-dlp" # fork: https://github.com/yt-dlp/yt-dlp
alias ytdl="youtube-dl -f bestvideo+bestaudio"
alias ytmp3="youtube-dl -f bestaudio -x --audio-format mp3 --audio-quality 320K"
# fun
# misc.
alias screenfetch="neofetch"
alias weather="curl 'https://wttr.in/?format=v2'"

53
zsh/custom/common.zsh Normal file
View File

@ -0,0 +1,53 @@
autoload -U colors && colors
autoload -Uz url-quote-magic
zle -N self-insert url-quote-magic
autoload -Uz select-word-style
select-word-style shell
# ---
setopt notify
setopt complete_in_word
setopt always_to_end
setopt extended_history
setopt hist_expire_dups_first
# setopt hist_ignore_dups
setopt hist_ignore_space
setopt hist_verify
setopt share_history
setopt inc_append_history
setopt rc_quotes
setopt autocd
setopt extended_glob
setopt glob_dots
unsetopt case_glob
unsetopt beep # kindly stfu
unsetopt correct
unsetopt correct_all
# ---
bindkey -e
bindkey "^[^[[D" backward-word
bindkey "^[^[[C" forward-word
# ---
export LC_ALL="${LC_ALL:-en_US.UTF-8}"
export LANG="${LANG:-en_US.UTF-8}"
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
export HISTFILE=~/.zsh_history
export HISTSIZE=10000
export SAVEHIST=10000
export EDITOR="nano" # don't judge me
export VISUAL="code"
# https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/theme-and-appearance.zsh#L5
# export LS_COLORS="Gxfxcxdxbxegedabagacad"

9
zsh/custom/env.zsh Normal file
View File

@ -0,0 +1,9 @@
export HOMEBREW_NO_ANALYTICS=1
export HOMEBREW_NO_INSECURE_REDIRECT=1
# export HOMEBREW_CASK_OPTS=--require-sha
export NEXT_TELEMETRY_DISABLED=1
export GATSBY_TELEMETRY_DISABLED=1
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export SAM_CLI_TELEMETRY=0
export AZURE_CORE_COLLECT_TELEMETRY=0
export CHECKPOINT_DISABLE=1

84
zsh/custom/functions.zsh Normal file
View File

@ -0,0 +1,84 @@
# Make a new directory and `cd` right into it (this seems like a no-brainer)
mkcd() {
mkdir -p -- "$1" &&
cd -P -- "$1" || return
}
# Start an HTTP server from a directory, optionally specifying the port
serve() {
local port="${1:-8090}"
sleep 1 && open "http://localhost:${port}/" &
# Set the default Content-Type to `text/plain` instead of `application/octet-stream`
# And serve everything as UTF-8 (although not technically correct, this doesn't break anything for binary files)
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port"
}
# Extract a compressed archive without worrying about which tool to use
extract() {
if [[ -f "$1" ]]; then
case "$1" in
*.tar.bz2)
tar xjf "$1"
;;
*.tar.gz)
tar xzf "$1"
;;
*.bz2)
bunzip2 "$1"
;;
*.rar)
unrar x "$1"
;;
*.gz)
gunzip "$1"
;;
*.tar)
tar xf "$1"
;;
*.tbz2)
tar xjf "$1"
;;
*.tgz)
tar xzf "$1"
;;
*.zip)
unzip "$1"
;;
*.Z)
uncompress "$1"
;;
*.7z)
7z x "$1"
;;
*)
echo "'$1' cannot be extracted via extract()"
;;
esac
else
echo "'$1' is not a valid file"
fi
}
# Create a git.io short URL (custom slug optional)
# ex: gitio https://github.com/jakejarvis/dotfiles [jakesdotfiles] => https://git.io/jakesdotfiles
# https://blog.github.com/2011-11-10-git-io-github-url-shortener
gitio() {
local PARAMS RESPONSE
PARAMS="-F \"url=$1\""
if [[ -n "$2" ]]; then
PARAMS="$PARAMS -F \"code=$2\""
fi
RESPONSE=$(eval "curl -i https://git.io $PARAMS 2>&1" | grep "Location: ")
echo "${RESPONSE//Location: /}"
}
# Push a local SSH public key to another machine
# https://github.com/rtomayko/dotfiles/blob/rtomayko/.bashrc
push_ssh_cert() {
local _host
[[ -f ~/.ssh/id_ed25519.pub ]] || ssh-keygen -t ed25519
for _host in "$@"; do
echo "$_host"
ssh "$_host" "\cat >> ~/.ssh/authorized_keys" < ~/.ssh/id_ed25519.pub
done
}

View File

@ -1,22 +1,23 @@
# Rosetta hacks for M1 Macs
# all of this is only for macOS
if [[ ! "$(uname)" = "Darwin" ]]; then
return
fi
# export BROWSER="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"
export BROWSER="/Applications/Firefox.app/Contents/MacOS/firefox"
# Rosetta hacks for M1
alias intel="arch -x86_64 /bin/zsh"
alias arm="arch -arm64 "$HOMEBREW_PREFIX"/bin/zsh"
alias arm="arch -arm64 zsh"
# My own creation! See: https://github.com/jakejarvis/simpip
alias ipv4="curl -4 simpip.com --max-time 1 --proto-default https --silent"
alias ipv6="curl -6 simpip.com --max-time 1 --proto-default https --silent"
alias ip="ipv4; ipv6"
alias ip-local="ipconfig getifaddr en0"
alias ips="ip; ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'"
alias dns-clear="networksetup -setdnsservers Wi-Fi"
alias dns-check="networksetup -getdnsservers Wi-Fi"
alias dns-set="networksetup -setdnsservers Wi-Fi "
alias dns-set-cloudflare="dns-set 1.1.1.1 1.0.0.1"
alias dns-set-google="dns-set 8.8.8.8 8.8.4.4"
alias flush="sudo killall -HUP mDNSResponder; sudo killall mDNSResponderHelper; sudo dscacheutil -flushcache"
# Update: brew, npm, gems, pip, app store, macos
# check & install updates for:
# - brew
# - node/npm
# - ruby/gems
# - pip
# - app store
# - macos
# - zinit
system_update() {
NC="\033[0m"
YELLOW="\033[0;33m"
@ -25,6 +26,7 @@ system_update() {
brew update
brew upgrade
# avoid annoying `(latest) != latest` cask updates:
# shellcheck disable=SC2046
brew upgrade $(brew outdated --greedy --verbose | awk '$2 !~ /(latest)/ {print $1}')
brew cleanup
@ -37,8 +39,8 @@ system_update() {
echo -e "${YELLOW}Updating Ruby and gems...${NC}"
CONFIGURE_OPTS="$RUBY_CONFIGURE_OPTS" \
rbenv install --skip-existing $(rbenv install -l | grep -v - | tail -1) && \
rbenv global $(rbenv install -l | grep -v - | tail -1)
rbenv install --skip-existing "$(rbenv install -l | grep -v - | tail -1)" && \
rbenv global "$(rbenv install -l | grep -v - | tail -1)"
gem install bundler foreman
gem update
gem cleanup
@ -54,8 +56,9 @@ system_update() {
echo -e "${YELLOW}Checking for macOS system updates...${NC}"
softwareupdate --list
echo -e "${YELLOW}Updating Oh-My-ZSH...${NC}"
omz update
echo -e "${YELLOW}Updating zinit...${NC}"
zinit self-update
zinit update --all
}
alias rehide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder"
@ -66,18 +69,24 @@ alias verify_sign="codesign --verify --deep --verbose"
alias gpu="system_profiler SPDisplaysDataType"
alias cpu="sysctl -n machdep.cpu.brand_string"
alias screenfetch="neofetch"
alias ripfinder="sudo killall Finder"
alias ripdock="sudo killall Dock"
alias ripmenu="sudo killall SystemUIServer NotificationCenter"
alias ripfinder="killall Finder"
alias ripdock="killall Dock"
alias ripmenu="killall SystemUIServer NotificationCenter"
# open current directory in Finder
alias finder="open -a Finder ./"
alias finder="open -a Finder ."
alias dns-clear="networksetup -setdnsservers Wi-Fi"
alias dns-check="networksetup -getdnsservers Wi-Fi"
alias dns-set="networksetup -setdnsservers Wi-Fi "
alias dns-set-cloudflare="dns-set 1.1.1.1 1.0.0.1"
alias dns-set-google="dns-set 8.8.8.8 8.8.4.4"
alias flush="sudo killall -HUP mDNSResponder; sudo killall mDNSResponderHelper; sudo dscacheutil -flushcache"
# uncomment to use VS Code insiders build
# alias code="code-insiders"
alias vs="code ./"
alias vs="code ."
# Xcode simulators
alias ios="open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app"

49
zsh/custom/path.zsh Normal file
View File

@ -0,0 +1,49 @@
# a lot of this file only applies to macOS
if [[ "$(uname)" = "Darwin" ]]; then
# set PATH, MANPATH, etc., for Homebrew
eval "$(/opt/homebrew/bin/brew shellenv)"
# remap macOS core utils to GNU equivalents (from coreutils, findutils, gnu-*, etc.):
# https://gist.github.com/skyzyx/3438280b18e4f7c490db8a2a2ca0b9da?permalink_comment_id=3049694#gistcomment-3049694
for gbin in "$(brew --prefix)"/opt/*/libexec/gnubin; do
export PATH="$gbin:$PATH"
done
# Ensure `man` refers to the new binaries:
for gman in "$(brew --prefix)"/opt/*/libexec/gnuman; do
export MANPATH="$gman:$MANPATH"
done
unset gbin gman
# OpenJDK
export PATH="$HOMEBREW_PREFIX/opt/openjdk/bin:$PATH"
# metasploit
export PATH="/opt/metasploit-framework/bin:$PATH"
# macOS-only fixes for rbenv/ruby below
# shellcheck disable=SC2155
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1) --with-readline-dir=$(brew --prefix readline) --with-libyaml-dir=$(brew --prefix libyaml)"
fi
# go
export GOPATH="$HOME/golang"
export PATH="$GOPATH/bin:$PATH"
# rbenv
if command -v rbenv 1>/dev/null 2>&1; then
eval "$(rbenv init -)"
fi
# rust/cargo
export PATH="$HOME/.cargo/bin:$PATH"
# pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
# volta
export VOLTA_HOME="$HOME/.volta"
export PATH="$VOLTA_HOME/bin:$PATH"

203
zsh/custom/plugins.zsh Normal file
View File

@ -0,0 +1,203 @@
# check for zinit and clone if not installed
ZINIT_HOME="$HOME/.local/share/zinit/zinit.git"
if [[ ! -d "$ZINIT_HOME" ]]; then
mkdir -p "$(dirname "$ZINIT_HOME")"
git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
fi
# initialize zinit
# shellcheck disable=SC1091
source "$ZINIT_HOME/zinit.zsh"
# ensure compinit recognizes zinit's changes
autoload -Uz _zinit
# shellcheck disable=SC2154
(( ${+_comps} )) && _comps[zinit]=_zinit
# various zinit add-ons
zinit light zdharma-continuum/zinit-annex-patch-dl
# async support
zinit ice wait lucid \
atload"async_init" \
src"async.zsh"
zinit light mafredri/zsh-async
# z
zinit ice wait lucid blockf \
atclone"
mv -vf z.1 ${ZINIT[MAN_DIR]}/man1
" \
atpull"%atclone" \
atload"_Z_DATA=~/.zdata" \
src"z.sh"
zinit light rupa/z
# grab exa (better ls) binary
zinit ice from"gh-r" as"command" \
mv"bin/exa* -> exa" \
atclone"
mv -vf completions/exa.zsh _exa
mv -vf man/exa.1 ${ZINIT[MAN_DIR]}/man1
mv -vf man/exa_colors.5 ${ZINIT[MAN_DIR]}/man5
" \
atpull"%atclone" \
atload"
alias ls='exa --color=auto -GF --icons --group-directories-first'
alias ll='exa --color=auto -1laF --git --icons --group-directories-first --ignore-glob=\".DS_Store*|~*\"'
alias lt='ll -T -L=2'
"
zinit light ogham/exa
# grab bat (better cat) binary
zinit ice from"gh-r" as"command" \
mv"bat-*/bat -> bat" \
atclone"
mv -vf bat-*/autocomplete/bat.zsh _bat
mv -vf bat-*/bat.1 ${ZINIT[MAN_DIR]}/man1
" \
atpull"%atclone" \
atload"alias cat='bat --paging=never --color=auto --style=\"numbers,changes\" --theme=\"Dracula\"'"
zinit light sharkdp/bat
# grab fd binary
# TODO: preview commands are an absolute sh*tshow, maybe use .lessfilter?
# https://github.com/Aloxaf/fzf-tab/wiki/Preview#show-file-contents
# shellcheck disable=SC2016
zinit ice from"gh-r" as"command" \
mv"fd-*/fd -> fd" \
atclone"
mv -vf fd-*/autocomplete/_fd _fd
mv -vf fd-*/fd.1 ${ZINIT[MAN_DIR]}/man1
" \
atpull"%atclone" \
atload'
FZF_FD_OPTS="--color always --hidden --follow --exclude .git --exclude node_modules"
FZF_PREVIEW_FILE_COMMAND="bat --color=always --paging=never --style=plain --theme=Dracula"
FZF_PREVIEW_DIR_COMMAND="exa -1a --color=always --icons --group-directories-first"
FZF_DEFAULT_OPTS="--no-mouse --bind \"tab:accept,ctrl-y:preview-page-up,ctrl-v:preview-page-down,ctrl-e:execute-silent(\${VISUAL:-code} {+} >/dev/null 2>&1)\""
FZF_DEFAULT_COMMAND="fd --type f $FZF_FD_OPTS"
FZF_ALT_C_OPTS="--ansi --preview \"$FZF_PREVIEW_DIR_COMMAND {} 2>/dev/null\""
FZF_ALT_C_COMMAND="fd --type d . $FZF_FD_OPTS"
FZF_CTRL_T_OPTS="--ansi --bind \"ctrl-w:execute(\${EDITOR:-nano} {1} >/dev/tty </dev/tty)+refresh-preview\" --preview \"$FZF_PREVIEW_FILE_COMMAND {} 2>/dev/null\""
FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
'
zinit light sharkdp/fd
# grab fzf binary from release & other files from source
zinit ice from"gh-r" as"command" \
dl"https://raw.githubusercontent.com/junegunn/fzf/master/shell/key-bindings.zsh -> key-bindings.zsh" \
dl"https://raw.githubusercontent.com/junegunn/fzf/master/shell/completion.zsh -> _fzf" \
dl"https://raw.githubusercontent.com/junegunn/fzf/master/man/man1/fzf.1 -> ${ZINIT[MAN_DIR]}/man1/fzf.1" \
dl"https://raw.githubusercontent.com/junegunn/fzf/master/man/man1/fzf-tmux.1 -> ${ZINIT[MAN_DIR]}/man1/fzf-tmux.1" \
src"key-bindings.zsh"
zinit light junegunn/fzf
# all the colors
# https://github.com/sharkdp/vivid/tree/master/themes
# shellcheck disable=SC2016
zinit ice from"gh-r" as"command" \
mv"vivid-*/vivid -> vivid" \
atload'export LS_COLORS="$(vivid generate snazzy)"'
zinit load sharkdp/vivid
# direnv
zinit ice from"gh-r" as"command" \
mv"direnv* -> direnv" \
atclone"./direnv hook zsh > zhook.zsh" \
atpull"%atclone" \
src"zhook.zsh"
zinit light direnv/direnv
# history substring searching
# only bind these keys once they're ready
bindkey -r "^[[A"
bindkey -r "^[[B"
zinit ice wait lucid \
atload"
zmodload zsh/terminfo
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
"
zinit light zsh-users/zsh-history-substring-search
# tab completions via fzf
# TODO: fix git-* completions, apparently there's some conflict with brew's git
# https://github.com/Aloxaf/fzf-tab/wiki/Preview#git
zinit ice wait lucid \
atload"
zstyle ':completion:*' verbose yes
zstyle ':completion:*' list-colors \${(s.:.)LS_COLORS}
zstyle ':completion:*:descriptions' format '[%d]'
zstyle ':completion::complete:*:*:files' ignored-patterns '.DS_Store' 'Icon?' '.Trash'
zstyle ':completion::complete:*:*:globbed-files' ignored-patterns '.DS_Store' 'Icon?' '.Trash'
zstyle ':completion::complete:rm:*:globbed-files' ignored-patterns
zstyle ':fzf-tab:*' fzf-command fzf
zstyle ':fzf-tab:*' fzf-bindings \
'tab:accept' \
'ctrl-y:preview-page-up' \
'ctrl-v:preview-page-down' \
'ctrl-e:execute-silent(${VISUAL:-code} \${realpath:-\$word} >/dev/null 2>&1)' \
'ctrl-w:execute(${EDITOR:-nano} \${realpath:-\$word} >/dev/tty </dev/tty)+refresh-preview'
zstyle ':fzf-tab:*' fzf-min-height 15
zstyle ':fzf-tab:complete:git-(add|diff|restore):*' fzf-preview \
'git --no-pager diff --color=always --no-ext-diff \${realpath:-\$word} | delta'
zstyle ':fzf-tab:complete:git-log:*' fzf-preview \
'git --no-pager log --color=always --format=oneline --abbrev-commit --follow \${realpath:-\$word}'
zstyle ':fzf-tab:complete:man:*' fzf-preview \
'man \$word'
zstyle ':fzf-tab:complete:brew-(install|uninstall|search|info):*-argument-rest' fzf-preview \
'brew info \$word'
zstyle ':fzf-tab:complete:(-command-|-parameter-|-brace-parameter-|export|unset|expand):*' fzf-preview \
'echo \${(P)word}'
zstyle ':fzf-tab:complete:*:options' fzf-preview
zstyle ':fzf-tab:complete:*:options' fzf-flags '--no-preview'
zstyle ':fzf-tab:complete:*:argument-1' fzf-preview
zstyle ':fzf-tab:complete:*:argument-1' fzf-flags '--no-preview'
zstyle ':fzf-tab:complete:*:*' fzf-preview \
'($FZF_PREVIEW_FILE_COMMAND \$realpath || $FZF_PREVIEW_DIR_COMMAND \$realpath) 2>/dev/null'
"
zinit light Aloxaf/fzf-tab
# autosuggestions, trigger precmd hook upon load
zinit ice wait lucid \
atload"_zsh_autosuggest_start"
zinit light zsh-users/zsh-autosuggestions
# additional completions
zinit ice wait lucid blockf as"completion" \
atpull"zinit creinstall -q ."
zinit light zsh-users/zsh-completions
# syntax highlighting
zinit ice wait lucid \
atinit"ZINIT[COMPINIT_OPTS]=-C; zicompinit; zicdreplay"
zinit light zsh-users/zsh-syntax-highlighting
# oh-my-zsh leftovers
# https://github.com/ohmyzsh/ohmyzsh/tree/master/lib
zinit snippet OMZ::lib/clipboard.zsh
zinit snippet OMZ::lib/termsupport.zsh
# iTerm2 integration
zinit ice lucid \
if'[[ "$TERM_PROGRAM" = "iTerm.app" ]]' \
pick"shell_integration/zsh" \
sbin"utilities/*"
zinit light gnachman/iTerm2-shell-integration
# 1Password plugins: https://developer.1password.com/docs/cli/shell-plugins/
zinit ice \
if"command -v op &>/dev/null" \
atclone"op completion zsh > _op || true"
zinit snippet ~/.config/op/plugins.sh
# starship prompt
zinit ice from"gh-r" as"command" \
atclone"
./starship init zsh > init.zsh
./starship completions zsh > _starship
" \
atpull"%atclone" \
src"init.zsh"
zinit light starship/starship

View File

@ -1,171 +0,0 @@
# Make a new directory and `cd` right into it (this seems like a no-brainer)
mkcd() {
mkdir -p -- "$1" &&
cd -P -- "$1"
}
# Start an HTTP server from a directory, optionally specifying the port
serve() {
local port="${1:-8090}"
sleep 1 && open "http://localhost:${port}/" &
# Set the default Content-Type to `text/plain` instead of `application/octet-stream`
# And serve everything as UTF-8 (although not technically correct, this doesn't break anything for binary files)
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port"
}
# Extract a compressed archive without worrying about which tool to use
extract() {
if [ -f $1 ]; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
# Create a git.io short URL (custom slug optional)
# ex: gitio https://github.com/jakejarvis/dotfiles [jakesdotfiles] => https://git.io/jakesdotfiles
# https://blog.github.com/2011-11-10-git-io-github-url-shortener
gitio() {
PARAMS="-F \"url=$1\""
if [ -n "$2" ]; then PARAMS="$PARAMS -F \"code=$2\""; fi
RESPONSE=$(eval "curl -i https://git.io $PARAMS 2>&1" | grep "Location: ")
echo "${RESPONSE//Location: /}"
}
# Push a local SSH public key to another machine
# https://github.com/rtomayko/dotfiles/blob/rtomayko/.bashrc
push_ssh_cert() {
local _host
[ -f ~/.ssh/id_ed25519.pub ] || ssh-keygen -t ed25519
for _host in "$@";
do
echo $_host
ssh $_host 'cat >> ~/.ssh/authorized_keys' < ~/.ssh/id_ed25519.pub
done
}
# upload file(s) to https://transfer.sh
# https://github.com/dutchcoders/transfer.sh#bash-and-zsh-with-delete-url-delete-token-output-and-prompt-before-uploading
transfer()
{
local file
declare -a file_array
file_array=("${@}")
if [[ "${file_array[@]}" == "" || "${1}" == "--help" || "${1}" == "-h" ]]
then
echo "${0} - Upload arbitrary files to \"transfer.sh\"."
echo ""
echo "Usage: ${0} [options] [<file>]..."
echo ""
echo "OPTIONS:"
echo " -h, --help"
echo " show this message"
echo ""
echo "EXAMPLES:"
echo " Upload a single file from the current working directory:"
echo " ${0} \"image.img\""
echo ""
echo " Upload multiple files from the current working directory:"
echo " ${0} \"image.img\" \"image2.img\""
echo ""
echo " Upload a file from a different directory:"
echo " ${0} \"/tmp/some_file\""
echo ""
echo " Upload all files from the current working directory. Be aware of the webserver's rate limiting!:"
echo " ${0} *"
echo ""
echo " Upload a single file from the current working directory and filter out the delete token and download link:"
echo " ${0} \"image.img\" | awk --field-separator=\": \" '/Delete token:/ { print \$2 } /Download link:/ { print \$2 }'"
echo ""
echo " Show help text from \"transfer.sh\":"
echo " curl --request GET \"https://transfer.sh\""
return 0
else
for file in "${file_array[@]}"
do
if [[ ! -f "${file}" ]]
then
echo -e "\e[01;31m'${file}' could not be found or is not a file.\e[0m" >&2
return 1
fi
done
unset file
fi
local upload_files
local curl_output
local awk_output
du --total --block-size="K" --dereference "${file_array[@]}" >&2
# be compatible with "bash"
if [[ "${ZSH_NAME}" == "zsh" ]]
then
read $'upload_files?\e[01;31mDo you really want to upload the above files ('"${#file_array[@]}"$') to "transfer.sh"? (Y/n): \e[0m'
elif [[ "${BASH}" == *"bash"* ]]
then
read -p $'\e[01;31mDo you really want to upload the above files ('"${#file_array[@]}"$') to "transfer.sh"? (Y/n): \e[0m' upload_files
fi
case "${upload_files:-y}" in
"y"|"Y")
# for the sake of the progress bar, execute "curl" for each file.
# the parameters "--include" and "--form" will suppress the progress bar.
for file in "${file_array[@]}"
do
# show delete link and filter out the delete token from the response header after upload.
# it is important to save "curl's" "stdout" via a subshell to a variable or redirect it to another command,
# which just redirects to "stdout" in order to have a sane output afterwards.
# the progress bar is redirected to "stderr" and is only displayed,
# if "stdout" is redirected to something; e.g. ">/dev/null", "tee /dev/null" or "| <some_command>".
# the response header is redirected to "stdout", so redirecting "stdout" to "/dev/null" does not make any sense.
# redirecting "curl's" "stderr" to "stdout" ("2>&1") will suppress the progress bar.
curl_output=$(curl --request PUT --progress-bar --dump-header - --upload-file "${file}" "https://transfer.sh/")
awk_output=$(awk \
'gsub("\r", "", $0) && tolower($1) ~ /x-url-delete/ \
{
delete_link=$2;
print "Delete command: curl --request DELETE " "\""delete_link"\"";
gsub(".*/", "", delete_link);
delete_token=delete_link;
print "Delete token: " delete_token;
}
END{
print "Download link: " $0;
}' <<< "${curl_output}")
# return the results via "stdout", "awk" does not do this for some reason.
echo -e "${awk_output}\n"
# avoid rate limiting as much as possible; nginx: too many requests.
if (( ${#file_array[@]} > 4 ))
then
sleep 5
fi
done
;;
"n"|"N")
return 1
;;
*)
echo -e "\e[01;31mWrong input: '${upload_files}'.\e[0m" >&2
return 1
esac
}

View File

@ -1,52 +0,0 @@
# ignore literally everything here if this isn't macOS
if [ ! "$(uname)" = "Darwin" ]; then
exit 0
fi
# Default paths
export PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin${PATH+:$PATH}"
# Homebrew
export HOMEBREW_PREFIX="/opt/homebrew"
export HOMEBREW_CELLAR="/opt/homebrew/Cellar"
export HOMEBREW_REPOSITORY="/opt/homebrew"
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}"
export MANPATH="/opt/homebrew/share/man${MANPATH+:$MANPATH}:"
export INFOPATH="/opt/homebrew/share/info:${INFOPATH:-}"
# Remap macOS core utils to GNU equivalents (from coreutils, findutils, gnu-*, etc.):
# https://gist.github.com/skyzyx/3438280b18e4f7c490db8a2a2ca0b9da?permalink_comment_id=3049694#gistcomment-3049694
for p in "$(brew --prefix)"/opt/*/libexec/gnubin; do export PATH=$p:$PATH; done
# Ensure `man` refers to the new binaries:
for p in "$(brew --prefix)"/opt/*/libexec/gnuman; do export MANPATH=$p:$MANPATH; done
# Go
export GOPATH="$HOME/golang"
export PATH="$GOPATH/bin:$PATH"
# rbenv
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1) --with-readline-dir=$(brew --prefix readline) --with-libyaml-dir=$(brew --prefix libyaml)"
if command -v rbenv 1>/dev/null 2>&1; then
eval "$(rbenv init -)"
fi
# OpenJDK
export PATH="$(brew --prefix)/opt/openjdk/bin:$PATH"
# Metasploit
export PATH="/opt/metasploit-framework/bin:$PATH"
# Rust/Cargo
export PATH="$HOME/.cargo/bin:$PATH"
# pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
fi
# volta
export VOLTA_HOME="$HOME/.volta"
export PATH="$VOLTA_HOME/bin:$PATH"

@ -1 +0,0 @@
Subproject commit a411ef3e0992d4839f0732ebeb9823024afaaaa8

@ -1 +0,0 @@
Subproject commit b2c910a85ed84cb7e5108e7cb3406a2e825a858f

View File

@ -1,10 +0,0 @@
# Set iTerm color scheme to Intel blue when session running via Rosetta2
# https://cutecoder.org/software/detecting-apple-silicon-shell-script/
if [[ "$(uname -m)" == "x86_64" && "$(sysctl -in sysctl.proc_translated)" == "1" ]]; then
ARCH_BG="003862" # Intel-ish blue
else
ARCH_BG="0B0B0B" # boring black
fi
# https://iterm2.com/documentation-escape-codes.html
echo -ne "\033]1337;SetColors=bg=${ARCH_BG}\007"