···
# Use syntax highlighting when typing commands
zplug "zsh-users/zsh-syntax-highlighting", defer:2
26
-
# Use Arch Linux aliases
27
-
zplug "plugins/archlinux", from:oh-my-zsh
# Press escape twice to prepend `sudo` to the command line
zplug "plugins/sudo", from:oh-my-zsh
···
47
-
# -----------------------------------------------------------------------------
49
-
# -----------------------------------------------------------------------------
44
+
### ENVIRONMENT VARS
···
export PATH="/bin:/sbin:/usr/local/bin"
90
-
# Add homebrew to PATH
91
-
export PATH="/home/linuxbrew/.linuxbrew/bin:${PATH}"
85
+
# Add homebrew to PATH if it exists
86
+
if [ -d "/home/linuxbrew/.linuxbrew/bin" ]; then
87
+
export PATH="/home/linuxbrew/.linuxbrew/bin:${PATH}"
# Add ~/.local/bin to PATH
export PATH="${HOME}/.local/bin:${PATH}"
···
export PATH="${HOME}/.cargo/bin:${PATH}"
104
+
# Automatically remove duplicates from these arrays
105
+
typeset -gU path cdpath manpath fpath
eval "$(starship init zsh)"
113
-
# Automatically remove duplicates from these arrays
114
-
typeset -gU path cdpath manpath fpath
117
-
##############################################################################
119
-
##############################################################################
121
-
if [ -e "/etc/debian_version" ]; then
122
-
alias acs='sudo apt-cache search'
123
-
alias acp='sudo apt-cache policy'
124
-
alias agu='sudo apt update'
125
-
alias agud='sudo apt update && sudo apt dist-upgrade'
126
-
alias agi='sudo apt install'
127
-
alias afs='sudo apt-file search'
128
-
alias afu='sudo apt-file update'
129
-
alias aac='sudo apt autoclean'
130
-
alias agc='sudo apt clean'
131
-
alias agli='sudo apt list --installed'
132
-
alias agp='sudo apt purge'
133
-
alias agr='sudo apt remove'
134
-
alias agar='sudo apt autoremove'
138
-
if [ -e "/etc/redhat-release" ]; then
139
-
alias dnfc='sudo dnf clean all'
140
-
alias dnfgi='sudo dnf groupinstall'
141
-
alias dnfgl='dnf grouplist'
142
-
alias dnfgr='sudo dnf groupremove'
143
-
alias dnfi='sudo dnf install'
144
-
alias dnfl='dnf list'
145
-
alias dnfli='dnf list installed'
146
-
alias dnfmc='dnf makecache'
147
-
alias dnfp='dnf info'
148
-
alias dnfr='sudo dnf remove'
149
-
alias dnfs='dnf search'
150
-
alias dnfu='sudo dnf update'
if test -f /bin/lsd; then
···
174
-
# Display zsh functions with bat
175
-
alias zfun='functions | bat -l zsh'
178
-
if command -v bat >/dev/null; then
# convert just recipes into aliases
for recipe in $(just --justfile ~/.justfile --summary); do
alias $recipe="just --justfile ~/.justfile --working-directory . $recipe"
# Assorted global aliases
142
+
if command -v bat >/dev/null; then
alias -g CC='| xclip -selection clipboard'
194
-
# Get public IP address
195
-
alias pubip4='curl -s -m 5 ipv4.icanhazip.com'
196
-
alias pubip6='curl -s -m 5 ipv6.icanhazip.com'
if test -x "$(command -v firewall-cmd)"; then
···
224
-
##############################################################################
226
-
##############################################################################
key[Home]="${terminfo[khome]}"
···
## keybinding for convenient viewing of man pages
248
-
if test -x "${HOME}/bin/split-man"; then
199
+
if test -x "${HOME}/bin/split_man"; then
250
-
"${HOME}/bin/split-man"
201
+
"${HOME}/bin/split_man"
···
bindkey '^[[1;5A' history-substring-search-up
bindkey '^[[1;5B' history-substring-search-down
272
-
##############################################################################
274
-
##############################################################################
test -x "$(command -v $1)"
···
TZ="$continent/$city" date
349
-
# Generate a pseudo-random 16-character string.
350
-
function genrand() {
351
-
openssl rand -base64 16
354
-
# Remove ~/.ssh/known_hosts*
355
-
function rmknownhosts() {
356
-
rm -v "${HOME}/.ssh/known_hosts"*
359
-
# Copy SSH public key to clipboard (requires xclip -selection clipboard)
360
-
function pubkey() {
361
-
cat "${HOME}/.ssh/id_ed25519.pub" | tr -d '\n' | xclip -selection clipboard
362
-
echo "--> SSH public key copied to clipboard"
365
-
# Remove all .jpeg .jpg .png .svg .webp files from downloads
366
-
function rmpics() {
367
-
find "${HOME}/downloads" \
370
-
\( -name "*.jpg" -o -name "*.jpg_original" -o -name "*.jpeg" -o -name "*.svg" -o -name "*.png" -o -name "*.webp" \) \
374
-
# Remove all ISOs and disc images from downloads
375
-
function rmisos() {
376
-
find "${HOME}/downloads" \
379
-
\( -name "*.iso" -o -name "*.img" \) \
383
-
# Clear downloads folder
385
-
rm -rf "${HOME}/downloads/"*
ansible-playbook -i inventory.yml "$@"
···
517
-
##############################################################################
519
-
##############################################################################
export FZF_DEFAULT_OPTS=" \
--color=bg+:#313244,bg:#1E1E2E,spinner:#F5E0DC,hl:#F38BA8 \
···
--header 'Press CTRL-Y to copy command into clipboard'"
542
-
##############################################################################
544
-
##############################################################################
# See https://zsh-manual.netlify.app/options