Adapt zsh config for macOS
This commit is contained in:
parent
eb98ee4112
commit
0f1f598c76
@ -55,7 +55,7 @@ autoload -Uz cf
|
||||
# Make a directory, then change into it
|
||||
|
||||
mkcd() {
|
||||
[[ ! -d "${1}" ]] && mkdir --parents -- "${1}"
|
||||
[[ ! -d "${1}" ]] && gmkdir --parents -- "${1}"
|
||||
cd "${1}" || exit
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
# ---------- Normal Aliases ----------
|
||||
# Common commands
|
||||
alias cp='cp -piv'
|
||||
alias mv='mv -iv'
|
||||
alias cp='gcp -piv'
|
||||
alias mv='gmv -iv'
|
||||
# Use safe-rm instead of rm
|
||||
alias rm='safe-rm -iv'
|
||||
alias rmdir='rmdir -v'
|
||||
alias rmdir='grmdir -v'
|
||||
|
||||
# Games
|
||||
alias add-modrinth='ferium add-modrinth'
|
||||
@ -73,10 +73,10 @@ alias pr='makepkg --force --clean --cleanbuild --syncdeps --rmdeps && addpkg rpm
|
||||
# Personal
|
||||
alias :q='exit'
|
||||
alias ct='cptemplate'
|
||||
alias less='less -i --'
|
||||
alias la='ls --almost-all --color --group-directories-first --human-readable -l'
|
||||
alias ls='ls --color --group-directories-first'
|
||||
alias ll='ls --classify --color --group-directories-first --human-readable -l'
|
||||
#alias less='less -i --'
|
||||
alias la='gls --almost-all --color --group-directories-first --human-readable -l'
|
||||
alias ls='gls --color --group-directories-first'
|
||||
alias ll='gls --classify --color --group-directories-first --human-readable -l'
|
||||
alias python='python3'
|
||||
alias spcli='speedtest-cli --secure'
|
||||
alias sshconfig='"${EDITOR}" -- ${HOME}/.ssh/config'
|
||||
@ -150,3 +150,8 @@ stow-config () {
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
getwifipassword() {
|
||||
security find-generic-password -ga "$1" | rg "password
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,2 @@
|
||||
# bindkey -M viins '^r' history-incremental-search-backward
|
||||
# bindkey -M vicmd '^r' history-incremental-search-backward
|
||||
|
||||
# vim: syntax=zsh
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
# Auto-completion
|
||||
# ---------------
|
||||
[[ $- == *i* ]] && source "/usr/share/fzf/completion.zsh"
|
||||
[[ $- == *i* ]] && source "/usr/local/Cellar/fzf/0.33.0/shell/completion.zsh"
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
source "/usr/share/fzf/key-bindings.zsh"
|
||||
source "/usr/local/Cellar/fzf/0.33.0/shell/key-bindings.zsh"
|
||||
|
@ -10,5 +10,3 @@ setopt correctall
|
||||
|
||||
# prevent accidental overwriting of a file
|
||||
setopt noclobber
|
||||
|
||||
# vim: syntax=zsh
|
||||
|
@ -1,4 +1,4 @@
|
||||
# PATH variable configuration
|
||||
path=("${HOME}/Scripts/Arch Linux Helpers" $path)
|
||||
path=("${HOME}/Scripts/macOS Helpers" "${HOME}/.local/bin" $path)
|
||||
|
||||
export PATH
|
||||
|
@ -1,8 +0,0 @@
|
||||
# Notify on ssh login
|
||||
if [[ -n $SSH_CONNECTION ]]; then
|
||||
IP="$(echo $SSH_CONNECTION | cut -d " " -f 1)"
|
||||
HOSTNAME=$(hostname)
|
||||
NOW=$(date +"%e %b %Y, %a %r")
|
||||
EMAIL='erictorres4@pm.me'
|
||||
echo "Login from ${IP} on ${HOSTNAME} on ${NOW}" | neomutt -s 'SSH Login Notification' "${EMAIL}" 2>/dev/null
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user