Various updates
This commit is contained in:
parent
ff305b446b
commit
a9fc82a83c
@ -1,6 +1,7 @@
|
|||||||
cask_args appdir: "/Applications", require_sha: true
|
cask_args appdir: "/Applications", require_sha: true
|
||||||
|
|
||||||
brew "bat"
|
brew "bat"
|
||||||
|
brew "boxes"
|
||||||
brew "editorconfig"
|
brew "editorconfig"
|
||||||
brew "fzf"
|
brew "fzf"
|
||||||
brew "gh"
|
brew "gh"
|
||||||
@ -18,6 +19,7 @@ brew "pngpaste"
|
|||||||
brew "pwgen"
|
brew "pwgen"
|
||||||
brew "slacknimate"
|
brew "slacknimate"
|
||||||
brew "starship"
|
brew "starship"
|
||||||
|
brew "thefuck"
|
||||||
brew "tldr"
|
brew "tldr"
|
||||||
brew "tmux"
|
brew "tmux"
|
||||||
brew "vim"
|
brew "vim"
|
||||||
|
@ -1,9 +1,29 @@
|
|||||||
# Get editor completions based on the config schema
|
# Get editor completions based on the config schema
|
||||||
"$schema" = 'https://starship.rs/config-schema.json'
|
"$schema" = 'https://starship.rs/config-schema.json'
|
||||||
|
|
||||||
|
format = "$all$character"
|
||||||
|
|
||||||
# Inserts a blank line between shell prompts
|
# Inserts a blank line between shell prompts
|
||||||
add_newline = true
|
add_newline = true
|
||||||
|
|
||||||
# Replace the '❯' symbol in the prompt with '➜'
|
# Replace the '❯' symbol in the prompt with '➜'
|
||||||
# [character] # The name of the module we are configuring is 'character'
|
# [character] # The name of the module we are configuring is 'character'
|
||||||
# success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green'
|
# success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green'
|
||||||
|
|
||||||
|
[sudo]
|
||||||
|
style = 'bold green'
|
||||||
|
symbol = '👩💻 '
|
||||||
|
disabled = false
|
||||||
|
|
||||||
|
[status]
|
||||||
|
style = 'bg:blue'
|
||||||
|
symbol = '🔴 '
|
||||||
|
success_symbol = '🟢 SUCCESS'
|
||||||
|
format = '[\[$symbol$common_meaning$signal_name$maybe_int\]]($style) '
|
||||||
|
map_symbol = true
|
||||||
|
disabled = true
|
||||||
|
|
||||||
|
[custom.iterm_prompt_mark]
|
||||||
|
when = ''' ( it2check ) '''
|
||||||
|
format = "\u001b\\]133;A\u0007"
|
||||||
|
disabled = false
|
||||||
|
38
.zshrc
38
.zshrc
@ -1,11 +1,19 @@
|
|||||||
|
system_type=$(uname -s)
|
||||||
|
|
||||||
# shell options
|
# shell options
|
||||||
setopt auto_cd
|
setopt auto_cd
|
||||||
|
setopt append_history share_history histignorealldups
|
||||||
|
|
||||||
# aliases
|
# aliases
|
||||||
alias ls="ls -F"
|
alias ls="ls -F"
|
||||||
alias bv="brew-visit"
|
alias top10="print -l -- ${(o)history%% *} | uniq -c | sort -nr | head -n 10"
|
||||||
|
|
||||||
|
# Homebrew aliases
|
||||||
|
alias bv="brew-visit" # points to the function below because I'm complicated
|
||||||
alias bi="brew info"
|
alias bi="brew info"
|
||||||
alias bs="brew search"
|
alias bs="brew search"
|
||||||
|
|
||||||
|
# These depend on some installed packages, so just to be safe
|
||||||
[[ "$(command -v bat)" ]] && alias cat="bat"
|
[[ "$(command -v bat)" ]] && alias cat="bat"
|
||||||
[[ "$(command -v htop)" ]] && alias top="htop"
|
[[ "$(command -v htop)" ]] && alias top="htop"
|
||||||
|
|
||||||
@ -13,14 +21,19 @@ alias bs="brew search"
|
|||||||
export CLICOLOR=1
|
export CLICOLOR=1
|
||||||
# export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/opt/homebrew/share/zsh-syntax-highlighting/highlighters
|
# export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/opt/homebrew/share/zsh-syntax-highlighting/highlighters
|
||||||
|
|
||||||
|
# Functions
|
||||||
|
|
||||||
fd() {
|
fd() {
|
||||||
|
# DESC: I forget
|
||||||
|
# ARGS: $1 (optional):
|
||||||
|
# REQS: ???
|
||||||
|
# USAGE: fd [path]
|
||||||
local dir
|
local dir
|
||||||
dir=$(find ${1:-.} -path '*/\.*' -prune \
|
dir=$(find ${1:-.} -path '*/\.*' -prune \
|
||||||
-o -type d -print 2> /dev/null | fzf +m) &&
|
-o -type d -print 2> /dev/null | fzf +m) &&
|
||||||
cd "$dir"
|
cd "$dir"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Open the finder to a specified path or to current directory.
|
|
||||||
f() {
|
f() {
|
||||||
# DESC: Opens the Finder to specified directory. (Default is current oath)
|
# DESC: Opens the Finder to specified directory. (Default is current oath)
|
||||||
# ARGS: $1 (optional): Path to open in finder
|
# ARGS: $1 (optional): Path to open in finder
|
||||||
@ -32,14 +45,22 @@ f() {
|
|||||||
ql() {
|
ql() {
|
||||||
# DESC: Opens files in MacOS Quicklook
|
# DESC: Opens files in MacOS Quicklook
|
||||||
# ARGS: $1 (optional): File to open in Quicklook
|
# ARGS: $1 (optional): File to open in Quicklook
|
||||||
|
# REQS: MacOS
|
||||||
# USAGE: ql [file1] [file2]
|
# USAGE: ql [file1] [file2]
|
||||||
qlmanage -p "${*}" &>/dev/null
|
qlmanage -p "${*}" &>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
brew-visit() {
|
brew-visit() {
|
||||||
|
# DESC: Open a Homebrew formula's web page
|
||||||
|
# ARGS: $1: Homebrew formula name
|
||||||
|
# REQS: MacOS
|
||||||
|
# USAGE: brew-visit [url]
|
||||||
open -a Safari `brew info "${1}" | grep ^http | head -1`
|
open -a Safari `brew info "${1}" | grep ^http | head -1`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# See https://github.com/dduan/tre/blob/main/README.md
|
||||||
|
tre() { command tre "$@" -e && source "/tmp/tre_aliases_$USER" 2>/dev/null; }
|
||||||
|
|
||||||
autoload -Uz compinit
|
autoload -Uz compinit
|
||||||
compinit
|
compinit
|
||||||
|
|
||||||
@ -48,6 +69,17 @@ source <(fzf --zsh)
|
|||||||
[ -f ~/.config/op/plugins.sh ] && source ~/.config/op/plugins.sh
|
[ -f ~/.config/op/plugins.sh ] && source ~/.config/op/plugins.sh
|
||||||
[ -f /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ] && source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
[ -f /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ] && source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
[ -f /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh ] && source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
[ -f /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh ] && source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||||
|
[ -f /opt/homebrew/opt/git-extras/share/git-extras/git-extras-completion.zsh ] && source /opt/homebrew/opt/git-extras/share/git-extras/git-extras-completion.zsh
|
||||||
|
[ -f /opt/homebrew/share/liquidprompt ] && source /opt/homebrew/share/liquidprompt
|
||||||
[ -e "${HOME}/.iterm2_shell_integration.zsh" ] && source "${HOME}/.iterm2_shell_integration.zsh"
|
[ -e "${HOME}/.iterm2_shell_integration.zsh" ] && source "${HOME}/.iterm2_shell_integration.zsh"
|
||||||
|
|
||||||
eval "$(starship init zsh)"
|
if it2check
|
||||||
|
then
|
||||||
|
iterm2_print_user_vars() {
|
||||||
|
it2git
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
eval "$(zoxide init --cmd j zsh)"
|
||||||
|
eval $(thefuck --alias)
|
||||||
|
# eval "$(starship init zsh)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user