-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zshrc
752 lines (570 loc) · 19.2 KB
/
dot_zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
# zsh config
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
############## powerlevel10k ###################
POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
p10k_colors () {
for i in {0..255};
do
print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'};
done
}
################################################
# Set the directory we want to store zinit and plugins
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
# Download Zinit, if it's not there yet
if [ ! -d "$ZINIT_HOME" ]; then
mkdir -p "$(dirname $ZINIT_HOME)"
git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
fi
# Source/Load Zinit
source "${ZINIT_HOME}/zinit.zsh"
# ### Added by Zinit's installer
# if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
# print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
# command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
# command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
# print -P "%F{33} %F{34}Installation successful.%f%b" || \
# print -P "%F{160} The clone has failed.%f%b"
# fi
#
# source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
# autoload -Uz _zinit
# (( ${+_comps} )) && _comps[zinit]=_zinit
# Add in Powerlevel10k
zinit ice depth=1; zinit light romkatv/powerlevel10k
# Add in zsh plugins
zinit light zsh-users/zsh-syntax-highlighting
zinit light zsh-users/zsh-completions
zinit light zsh-users/zsh-autosuggestions
zinit light Aloxaf/fzf-tab
# Add in snippets
zinit snippet OMZP::git
zinit snippet OMZP::sudo
zinit snippet OMZP::archlinux
zinit snippet OMZP::aws
zinit snippet OMZP::kubectl
zinit snippet OMZP::kubectx
zinit snippet OMZP::command-not-found
# Auto load zsh-completion on start
autoload -U compinit && compinit -u
zinit cdreplay -q
# History
HISTSIZE=10000
HISTFILE="$HOME/.zsh_history"
SAVEHIST=$HISTSIZE
HISTDUP=erase
setopt appendhistory
setopt sharehistory
setopt hist_ignore_space
setopt hist_ignore_all_dups
setopt hist_save_no_dups
setopt hist_ignore_dups
setopt hist_find_no_dups
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
# [[ -f "$HOME"/.p10k.zsh ]] && source "$HOME"/.p10k.zsh; echo "sourced p10k"
# Keybindings
# bindkey '^f' autosuggest-accept
bindkey -e # emacs mode
bindkey '^p' history-search-backward
bindkey '^n' history-search-forward
# Completion styling
zstyle ':completion:*' matcher_list 'm:{a-z}={A-Za-z}' # match case insensitive
# LS_COLORS='no=00;37:fi=00:di=00;33:ln=04;36:pi=40;33:so=01;35:bd=40;33;01:'
# export LS_COLORS
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
zstyle ':completion:*' menu no
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath'
################## Aliases ######################
# Aliases
alias envs='env | grep -i'
alias reload='source $HOME/.zshrc'
alias editrc='nvim $HOME/.zshrc'
alias editnvim='nvim $HOME/.config/nvim'
alias tm='tmux attach || tmux'
alias ls='ls -GFhsh'
alias ll='ls -lah'
alias mkdir='mkdir -p'
alias distro='cat /etc/*-release'
alias myip='curl http://ipecho.net/plain; echo'
alias server='python -m SimpleHTTPServer 8000'
alias npmhelp='chrome https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/npm'
alias show_remap='nvim $HOME/.config/nvim/lua/glouie/remap.lua'
alias pip='pip3'
alias python='python3'
alias cha='chezmoi add'
alias chu='chezmoi update'
alias chc='chezmoi cd'
#################################################
################## Homebrew #####################
export HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew/Homebrew
# eval "$(brew shellenv)"
[ -f "$HOMEBREW_REPOSITORY"/bin/brew ] && eval $("$HOMEBREW_REPOSITORY"/bin/brew shellenv)
[ -f /opt/homebrew/bin/brew ] && eval $(/opt/homebrew/bin/brew shellenv)
[ -f /usr/local/bin/brew ] && eval $(/usr/local/bin/brew shellenv)
# Install home brew if not found.
if ! type "brew" > /dev/null; then
echo "brew was not found. Installing homebrew..."
echo | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
################### zsh #########################
# install brew:
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
#
# macOS: install XCode Command Line Tool
# $ xcode-select —-install
#
# Run the following command to install ZSH. It gets installed at /usr/local/bin/zsh PS: Mac’s default ZSH is at /bin/zsh
# brew install zsh
#
# Change the default shell
# chsh -s /usr/local/bin/zsh
# Install omg zsh from homebrew to use. Instead of the default zsh.
if ! type "zsh" > /dev/null; then
echo "zsh was not found. Installing zsh from homebrew..."
brew install zsh
echo "Change the shell to the homebrew zsh."
chsh -s zsh
echo "Logout and Log back in."
fi
# Install Oh My ZSH
# https://github.com/ohmyzsh/ohmyzsh#manual-installation
#
# git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh
# plugins=(git)
#
# source $ZSH/oh-my-zsh.sh
#
#################################################
################### Virtualenv ##################
# Get Virtual Env
if [[ $VIRTUAL_ENV != "" ]]
then
# Strip out the path and just leave the env name
# venv="${RED}(${VIRTUAL_ENV##*/})$ORIGINAL"
venv="::${VIRTUAL_ENV##*/}:: "
else
# In case you don't have one activated
venv=''
fi
alias py='/usr/bin/python'
if [ ! -d "$HOME/venv" ]; then
mkdir -p "$(dirname $HOME/venv)"
fi
venv() {
if (( "$#" < "1" ));
then
echo "** Usage: venv <virtualenv name>"
return 1
fi
source "$HOME"/venv/$1/bin/activate
source "$HOME"/.bashrc
}
#################################################
################### Pytest ######################
# export PYTEST_ADDOPTS="-x --index-wait=0 --browser=chrome"
# export PYTEST_ADDOPTS="-x --browser=chrome"
#################################################
################### jjddVjj
export ORIG_PATH=$PATH
export PATH_HISTORY=$PWD
export PKG_HOME=$HOME/pkg
export GIT_HOME=$HOME/gitlab
if [[ -z "$HOSTNAME" ]]
then
export HOSTNAME=$(hostname)
fi
hostname=$HOSTNAME
export REPO=$GIT_HOME
# echo "hostname is: "$hostname
# Sauce Labs
# - either set or source a file containing the user and key
export SAUCE_USER=
export SAUCE_API_KEY=
[[ -f "$HOME"/.sauce_labs ]] && . "$HOME"/.sauce_labs
# Synergy path
export PATH=$PATH:$HOME/bin/synergy/
# MacPorts path variable
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# My own bin directory for scripts, etc.
export PATH=$PATH:$HOME/bin/
# PYTHON STARTUP for autocompletion and history.
export PYTHONSTARTUP=$HOME/.pystartup
cd_git(){
cd "$GIT_HOME"/"$1" || return
}
alias pip-uninstall-all='pip3.8 freeze | grep -v "^-e" | grep -v "@" | xargs pip3.8 uninstall -y'
alias pip='pip3.8'
#################################################
################### webpages ####################
function chrome () {
# chrome <page>
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome "$1"
}
#################################################
################### path history ################
savepath(){
export PATH_HISTORY="$PWD"':'"$PATH_HISTORY"
#echo $PATH_HISTORY
}
pwdh(){
echo "$PATH_HISTORY"
}
pop_savepath(){
export PREV_PATH=$(echo "$PATH_HISTORY" | cut -d ':' -f 1)
export PATH_HISTORY=$(echo "$PATH_HISTORY" | cut -d ':' -f 2-)
}
alias cd='savepath;cd'
alias cdb='pop_savepath;cd $PREV_PATH;pop_savepath'
################### Grep ########################
# GREP_OPTIONS='--color=auto'
# GREP_COLORS='30;43'
alias grep='grep --color=auto'
# alias rgrep='grep --color=auto -ir'
#################################################
################### SSH #########################
sendsshkey(){
# note: for it to work you need to make sure perms are right.
# $ chmod 700 $HOME/.ssh
# $ chmod 600 $HOME/.ssh/authorized_keys
if (( "$#" < "1" ));
then
echo "** Usage: sendsshkey user@hostname"
return 1
fi
cat "$HOME"/.ssh/id_rsa.pub | ssh "$1" 'cat >> $HOME/.ssh/authorized_keys'
}
#################################################
################### misc ########################
# remove jamf (no longer possible)
alias rmcasper='sudo /usr/sbin/jamf removeFramework'
# for osx: ex. fnr *.py s/this/that/g
alias fnr='find . -type f -name "{1}" -exec sed -i "" {2} {} +'
# pretty print csv as a table.
function printcsv()
{
awk -F, '{for (i=1;i<=NF;++i) {if (NR>1) val[i] = "$i"; else key[i] = "$i"}} END {for (j=1;j<i;++j) printf("%2d%30s = %s\\n", j, key[j], val[j])}' "$1"
}
#################################################
################### sublime #####################
#
# https://www.sublimetext.com/docs/3/osx_command_line.html
alias subl='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -a'
alias opensubldir='open $HOME/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/'
#################################################
# VLESS=$(find /usr/local/bin/nvim -name 'less.sh')
# if [ -n "$VLESS" ]; then
# alias less="$VLESS"
# fi
# export LESSOPEN="| /usr/local/bin/src-hilite-lesspipe.sh %s"
export LESS=" -R"
alias vim='nvim'
alias vi='nvim'
alias rmpyc='find . -name "*.pyc" -print0 | xargs -0 rm'
alias rmlog='find . -name "*.log" -print0 | xargs -0 rm'
alias rmhtml='find . -name "*.html" -print0 | xargs -0 rm'
alias rmxml='find . -name "*.xml" -print0 | xargs -0 rm'
alias rmpng='find . -name "screenshot*.png" -print0 | xargs -0 rm'
alias rmeggs='find . -name "*.egg-info" -print0 | xargs -0 rm -rf'
alias rmtestlogs='rmpyc;rmlog;rmhtml;rmxml;rmpng'
alias pyl='pylint -d "C0103,R0902,R0904,R0801,C0302,W0105,R0913"'
#################################################
################### Git #########################
function gitcreatebranch(){
if (( "$#" < "2" ));
then
echo "** Usage: gitcreatebranch <new_branch> <upstream_branch>"
return 1
fi
git checkout -b "$1"
git push -u origin "$1"
git branch --set-upstream-to="$2" "$1"
}
alias ga="git add"
alias ga="git add -p"
alias gb="git branch"
alias gba="git branch -a"
alias gc="git commit -m"
alias gca="git commit -a -m"
alias gcat="git cat-file -p"
alias gco="git checkout"
alias gcoall="git checkout -- ."
alias gd="git diff"
alias gpl="git pull"
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
alias gps="git push"
alias gr="git remote"
alias gre="git reset"
alias gs="git status"
#################################################
################### Docker ######################
# Docker
alias dco="docker compose"
alias dps="docker ps"
alias dpa="docker ps -a"
alias dl="docker ps -l -q"
alias dx="docker exec -it"
# Dirs
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ......="cd ../../../../.."
################### LazyGit #####################
alias lg='lazygit'
#################################################
################### PyCharm #####################
alias pycharm='/usr/local/bin/charm'
################### Jedi ########################
alias installjedivim='cd $HOME/.vim/bundle/ && git clone --recursive https://github.com/davidhalter/jedi-vim.git'
alias installjedi='pip install jedi'
#################################################
################### Vundle ######################
alias installvundle='git clone https://github.com/VundleVim/Vundle.vim.git $HOME/.vim/bundle/Vundle.vim'
#################################################
################### drop keyboard ###############
# usage: masskbupdate massdrop_ctrl_config_ctrl__default_6087.bin
#
# you will need the mdloader_mac executable
# download here: https://github.com/Massdrop/mdloader/releases
#
# configure keyboard keys here:
# https://drop.com/mechanical-keyboards/configurator/
#
# TODO: turn this alias to functions, aliases can't use positional params.
# alias masskbupdate='./mdloader_mac --first --download $1 restart'
# alias samantha='bpython -i ids.py'
#################################################
################### NVM #########################
# NVM (Node Version Manager)
# Install:
# curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -f "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
alias prjson='python -m json.tool'
# TODO: fixme, i don't work in zsh
# function pj () {
# # python3 - << EOF
# # import pprint
# # pprint.pprint("""'$args'""")
# # EOF
# PYCMD='import pprint; pprint.pprint("""'$@'""")'
# python -c"$PYCMD"
# }
#################################################
################### GitLab ######################
# install: brew install glab
# https://glab.readthedocs.io/en/latest/intro.html
# https://github.com/profclems/glab#installation
export GITLAB_TOKEN=
export GITLAB_FEED_TOKEN=
export GITLAB_PERSONAL_TOKEN=
[[ -f "$HOME"/.gitlab_cred ]] && . "$HOME"/.gitlab_cred
alias mymrs='glab mr list --author=@me'
#################################################
################ scm_breeze ####################
# https://github.com/scmbreeze/scm_breeze
[ -s "/Users/glouie/.scm_breeze/scm_breeze.sh" ] && source "/Users/glouie/.scm_breeze/scm_breeze.sh"
#################################################
################### Cheat.sh ###################
# Installation instructions:
#
# PATH_DIR="$HOME/bin" # or another directory on your $PATH
# mkdir -p "$PATH_DIR"
# curl https://cht.sh/:cht.sh > "$PATH_DIR/cht.sh"
# chmod +x "$PATH_DIR/cht.sh"
#
# Global install:
#
# curl -s https://cht.sh/:cht.sh | sudo tee /usr/local/bin/cht.sh && sudo chmod +x /usr/local/bin/cht.sh
#
# install rlwrap, to run in shell mode:
# sudo apt install rlwrap
# brew install rlwrap
#
export PATH_DIR="$HOME/bin"
export CHTSH_CONF="$HOME/.cht.sh/cht.sh.conf"
alias cht='cht.sh'
# to activate tab completion for cht.sh
#
# curl https://cheat.sh/:zsh > ~/.zsh.d/_cht
# echo 'fpath=(~/.zsh.d/ $fpath)' >> ~/.zshrc
#
# Open a new shell to load the plugin
fpath=(~/.zsh.d/ $fpath)
################################################
set -o vi
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# orca aliases
[[ -r ~/.orca_profile ]] && source ~/.orca_profile
################################################
############## Install apps ####################
# doing this because the cmd is rg and not ripgrep
if type "rg" > /dev/null; then
alias ripgrep="rg"
fi
if type "cargo" > /dev/null; then
alias rust="cargo"
fi
export DEFAULT_APP_LIST=(
"atuin"
"bat"
# "cargo"
"direnv"
"eza"
"fzf"
"htop"
"ripgrep"
"rust"
"starship"
"yazi"
"zoxide"
)
# for an_app in $DEFAULT_APP_LIST
# do
# echo "$an_app"
# done
function atuin_load() {
if [[ -e "$HOME/.atium/bin/env" ]]; then
source "$HOME/.atuin/bin/env"
fi
eval "$(atuin init zsh)"
}
function bat_load() {
export BAT_THEME="Catppuccin Mocha"
alias less='bat --color=always'
alias cat='bat --color=always'
}
# function cargo_load() {
function rust_load() {
export PATH="$HOME/.cargo/bin:$PATH"
}
function direnv_load() {
eval "$(direnv hook zsh)"
}
function eza_load() {
alias ls='eza --icons=always'
alias ll='eza -1GlTahx -L 1'
alias tree='eza --tree'
}
function fzf_load() {
eval "$(fzf --zsh)"
[ -f "$HOME"/.fzf.zsh ] && source "$HOME"/.fzf.zsh
# --min-height=20
# --multi
export FZF_DEFAULT_OPTS="
--preview-window=right,70%
--height=50%
--border=double
--prompt='find >'
--info=inline
--pointer='→'
--marker=''
--header='CTRL-c or Esc to quit'
--preview '
([[ -f {} ]] && (bat --color=always {} || cat {} )) ||
([[ -d {} ]] && (tree -C {} | less)) || echo {} 2> /dev/null | head -200'
"
# Use the CLI find to get all files, excluding any filepath
# containing the string "git".
# export FZF_DEFAULT_COMMAND='find . -type f ! -path "*git*"'
# Use the CLI fd to respect ignore files (like '.gitignore'),
# display hidden files, and exclude the '.git' directory.
export FZF_DEFAULT_COMMAND='fd . --hidden'
# Use the CLI ripgrep to respect ignore files (like '.gitignore'),
# display hidden files, and exclude the '.git' directory.
# export FZF_DEFAULT_COMMAND='rg --files --hidden --glob "!.git"'
op(){
nvim $(fzf)
}
}
function htop_load() {
}
function ripgrep_load () {
}
function starship_load() {
export STARSHIP_CONFIG="$HOME"/.config/starship/starship.toml
eval "$(starship init zsh)"
}
function yazi_load(){
function yy() {
yazi "$@" --cwd-file="$tmp"
local tmp="$(mktemp -t "yazi-cwd")"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
cd -- "$cwd"
fi
rm -f -- "$tmp"
}
}
function zoxide_load(){
eval "$(zoxide init --cmd cd zsh)"
}
function load_app_settings() {
# just load the app settings
for app in $DEFAULT_APP_LIST;
do
load_cmd="$app"_load
# echo "Load config $load_cmd."
"$load_cmd"
done
}
function brew_install_apps() {
# echo "\$#: $#"
# echo "\$@: $@"
# echo "Attempting to install apps via brew..."
if [ "$#" -eq 0 ]; then
# echo "No app list was provided."
# echo "Using default list. "
# echo "Default list: $DEFAULT_APP_LIST"
# APP=$APP_LIST
APP=("${DEFAULT_APP_LIST[@]}")
else
# echo "App list was provided."
APP=("${@[@]}")
fi
# echo "APP is $APP"
for app in $APP;
do
# echo "Checking for '$app'..."
if ! type "$app" > /dev/null; then
# echo "'$app' is not installed yet on this system."
# echo "Attempting to install '$app'..."
if type "brew" > /dev/null; then
echo "Installing '$app' with homebrew."
brew install "$app"
load_cmd="$app"_load
# echo "Load config $load_cmd."
"$load_cmd"
else
echo "Can't install '$app', because homebrew is not installed."
fi
else
# echo "'$app' is already installed"
load_cmd="$app"_load
# echo "Load config $load_cmd."
"$load_cmd"
fi
done
# echo "Done with installing brew apps."
}
# brew_install_apps
load_app_settings
unset ripgrep
unset rust
################################################
alias covidmac='ssh [email protected]'
function obsidian () {
/Applications/Obsidian.app/Contents/MacOS/Obsidian &
}
if type "pfetch" > /dev/null; then
source ~/.pfetch
pfetch
fi