Skip to content

Commit

Permalink
chore: ♻️ refactor the defaults order
Browse files Browse the repository at this point in the history
  • Loading branch information
ivaquero committed Apr 6, 2024
1 parent 58c0135 commit 0a9a5e4
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 62 deletions.
133 changes: 73 additions & 60 deletions defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,22 @@ export OX_BACKUP=${HOME}/Documents/backup

# the oxidizer backup path
OX_OXIDE[bkox]=${OX_BACKUP}/shell/custom.sh
# OX_OXIDE[bkvi]=${OX_BACKUP}/shell/.vimrc

##########################################################
# vim & neovim
##########################################################

OX_OXIDE[bkvi]=${OX_BACKUP}/shell/.vimrc

up_vim() {
z "$HOME/.config/nvim"
git fetch origin main
git reset --hard origin/main
}

##########################################################
# terminal
##########################################################
case $(uname -a) in
*Darwin* | *Ubuntu* | *Debian*)
OX_ELEMENT[wz]=${HOME}/.config/wezterm/wezterm.lua
Expand Down Expand Up @@ -100,65 +113,6 @@ declare -A OX_PROXY=(
# [bzk]="mirrors.ustc.edu.cn/git/homebrew"
# )

##########################################################
# brew settings
##########################################################

case $(uname -a) in
*Darwin* | *Ubuntu* | *Debian*)
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_ENV_HINTS=1
export HOMEBREW_CLEANUP_MAX_AGE_DAYS="3"

# predefined brew services
# set the length of key <= 3
declare -A HOMEBREW_SERVICE=(
[pu]="pueue"
[pg]="postgresql@15"
[pd]="podman"
)
;;
esac

##########################################################
# pueue settings
##########################################################

# pueue demo
upp() {
pueue group add up_all
pueue parallel 3 -g up_all
pueue add -g up_all 'brew update && brew upgrade'
pueue add -g up_all 'conda update --all --yes'
# or use predefined items in pueue_aliases
# pueue add -g up_all 'cup'
}

##########################################################
# conda settings
##########################################################

# # predefined conda environments
# # set the length of key <= 3
# declare -A OX_CONDA_ENV=(
# [b]="base"
# [k]="kaggle"
# )

# # conda env stats with bkce, and should be consistent with OX_CONDA_ENV
# OX_OXIDE[bkceb]=${OX_BACKUP}/conda/conda-base.txt

##########################################################
# others settings
##########################################################

# git
OX_OXIDE[bkg]=${OX_BACKUP}/.gitconfig
OX_OXIDE[bkgi]=${OX_BACKUP}/git/.gitignore
# OX_OXIDE[bkesb]=${OX_BACKUP}/espanso/match/base.yml
# vscode
# OX_OXIDE[bkvs]=${OX_BACKUP}/vscode/settings.jsonc

##########################################################
# common aliases
##########################################################
Expand Down Expand Up @@ -258,6 +212,65 @@ startup() {
cd "${HOME}"/Desktop || exit
}

##########################################################
# brew settings
##########################################################

case $(uname -a) in
*Darwin* | *Ubuntu* | *Debian*)
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_ENV_HINTS=1
export HOMEBREW_CLEANUP_MAX_AGE_DAYS="3"

# predefined brew services
# set the length of key <= 3
declare -A HOMEBREW_SERVICE=(
[pu]="pueue"
[pg]="postgresql@15"
[pd]="podman"
)
;;
esac

##########################################################
# pueue settings
##########################################################

# pueue demo
upp() {
pueue group add up_all
pueue parallel 3 -g up_all
pueue add -g up_all 'brew update && brew upgrade'
pueue add -g up_all 'conda update --all --yes'
# or use predefined items in pueue_aliases
# pueue add -g up_all 'cup'
}

##########################################################
# conda settings
##########################################################

# # predefined conda environments
# # set the length of key <= 3
# declare -A OX_CONDA_ENV=(
# [b]="base"
# [k]="kaggle"
# )

# # conda env stats with bkce, and should be consistent with OX_CONDA_ENV
# OX_OXIDE[bkceb]=${OX_BACKUP}/conda/conda-base.txt

##########################################################
# others settings
##########################################################

# git
OX_OXIDE[bkg]=${OX_BACKUP}/.gitconfig
OX_OXIDE[bkgi]=${OX_BACKUP}/git/.gitignore
# OX_OXIDE[bkesb]=${OX_BACKUP}/espanso/match/base.yml
# vscode
# OX_OXIDE[bkvs]=${OX_BACKUP}/vscode/settings.jsonc

##########################################################
# notes apps
##########################################################
Expand Down
2 changes: 0 additions & 2 deletions oxidizer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ case ${SHELL} in
;;
esac

OX_OXIDE[bkvi]=${OX_BACKUP}/shell/.vimrc

##########################################################
# Oxidizer Management
##########################################################
Expand Down

0 comments on commit 0a9a5e4

Please sign in to comment.