Skip to content

Commit

Permalink
chore: 🚸 update startup prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
ivaquero committed Oct 1, 2024
1 parent 64093f4 commit e1dceaa
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 33 deletions.
16 changes: 15 additions & 1 deletion defaults.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ if ( Test-Path "$HOME\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8
$Global:OX_ELEMENT.wt = "$HOME\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json"
$Global:OX_OXIDE.bkwt = "$env:OX_BACKUP\terminal\windows-terminal.jsonc"
}
else{
else {
if ( !(Test-Path "$HOME\.wezterm.lua") ) {
$Global:OX_ELEMENT.wz = "$HOME\.wezterm.lua"
New-Item -Path $Global:OX_ELEMENT.wz -ItemType File
Expand Down Expand Up @@ -182,6 +182,20 @@ function iif { clzf $args }

function tt { hyperfine --warmup 3 --shell powershell '. $PROFILE' }

##########################################################
# Starship
##########################################################

if (Get-Command starship -ErrorAction SilentlyContinue) {
# system files
$env:STARSHIP_CONFIG = "$HOME\.config\starship.toml"
$Global:OX_ELEMENT.ss = $env:STARSHIP_CONFIG
# backup files
$Global:OX_OXIDE.ss = "$env:OX_BACKUP\shell\starship.toml"

Invoke-Expression (&starship init powershell)
}

##########################################################
# startup & daily commands
##########################################################
Expand Down
21 changes: 21 additions & 0 deletions defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,27 @@ tt() {
esac
}

##########################################################
# Starship
##########################################################

if test "$(command -v starship)"; then
# system files
export STARSHIP_CONFIG=${HOME}/.config/starship.toml
OX_ELEMENT[ss]=${STARSHIP_CONFIG}
# backup files
OX_OXIDE[ss]=${OX_BACKUP}/shell/starship.toml

case ${SHELL} in
*zsh)
eval "$(starship init zsh)"
;;
*bash)
eval "$(starship init bash)"
;;
esac
fi

##########################################################
# startup commands
##########################################################
Expand Down
12 changes: 1 addition & 11 deletions oxidizer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,9 @@ function upox {
}

##########################################################
# Starship
# startup
##########################################################

if (Get-Command starship -ErrorAction SilentlyContinue) {
# system files
$env:STARSHIP_CONFIG = "$HOME\.config\starship.toml"
$Global:OX_ELEMENT.ss = $env:STARSHIP_CONFIG
# backup files
$Global:OX_OXIDE.ss = "$env:OX_BACKUP\shell\starship.toml"

Invoke-Expression (&starship init powershell)
}

if ($Global:OX_STARTUP) {
startup
}
Expand Down
21 changes: 0 additions & 21 deletions oxidizer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,27 +141,6 @@ upox() {
cd "${HOME}" || exit
}

##########################################################
# Starship
##########################################################

if test "$(command -v starship)"; then
# system files
export STARSHIP_CONFIG=${HOME}/.config/starship.toml
OX_ELEMENT[ss]=${STARSHIP_CONFIG}
# backup files
OX_OXIDE[ss]=${OX_BACKUP}/shell/starship.toml

case ${SHELL} in
*zsh)
eval "$(starship init zsh)"
;;
*bash)
eval "$(starship init bash)"
;;
esac
fi

if [[ ${OX_STARTUP} ]]; then
startup
fi

0 comments on commit e1dceaa

Please sign in to comment.