Prepare to split out Distrobox and Host configs
This commit is contained in:
parent
9ceb5cf6db
commit
e08678ffea
|
@ -51,5 +51,8 @@ alias mpv="flatpak run io.mpv.Mpv"
|
|||
# Detect if I'm in a toolbox
|
||||
alias istoolbox='[ -f "/run/.toolboxenv" ] && grep -oP "(?<=name=\")[^\";]+" /run/.containerenv'
|
||||
|
||||
# Script to restore toolbox after it was replaced with distrobox and removed the default 'toolbox' name
|
||||
alias toolbox="$HOME/scripts/toolbox.sh"
|
||||
if [ $(istoolbox) ]; then
|
||||
source $HOME/.dotfiles/bash/bash_aliases.distrobox
|
||||
else
|
||||
source $HOME/.dotfiles/bash/bash_aliases.host
|
||||
fi
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
# Already in a toolbox
|
||||
alias toolbox="echo You are already in a toolbox"
|
|
@ -0,0 +1,2 @@
|
|||
# Script to restore toolbox after it was replaced with distrobox and removed the default 'toolbox' name
|
||||
alias toolbox="$HOME/scripts/toolbox.sh"
|
|
@ -42,10 +42,8 @@ if [ ! -e ${HOME}/.spool/last_login_gui ]; then
|
|||
echo "Use 'startsway' or 'starti3' to launch a GUI"
|
||||
fi
|
||||
|
||||
# Distrobox only
|
||||
if [ -f "/run/.containerenv" ]; then
|
||||
:
|
||||
# Host only
|
||||
if [ -f "/run/.containerenv" ] && grep -oP "(?<=name=\")[^\";]+" /run/.containerenv; then
|
||||
source $HOME/.dotfiles/bash/bash_login.distrobox
|
||||
else
|
||||
:
|
||||
source $HOME/.dotfiles/bash/bash_login.host
|
||||
fi
|
||||
|
|
|
@ -11,3 +11,9 @@ fi
|
|||
if [ "$SHLVL" = 1 ]; then
|
||||
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
|
||||
fi
|
||||
|
||||
if [ -f "/run/.containerenv" ] && grep -oP "(?<=name=\")[^\";]+" /run/.containerenv; then
|
||||
source $HOME/.dotfiles/bash/bash_logout.distrobox
|
||||
else
|
||||
source $HOME/.dotfiles/bash/bash_logout.host
|
||||
fi
|
||||
|
|
|
@ -15,3 +15,9 @@ PERL5LIB="${HOME}/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
|
|||
PERL_LOCAL_LIB_ROOT="${HOME}/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
|
||||
PERL_MB_OPT="--install_base \"${HOME}/perl5\""; export PERL_MB_OPT;
|
||||
PERL_MM_OPT="INSTALL_BASE=${HOME}/perl5"; export PERL_MM_OPT;
|
||||
|
||||
if [ -f "/run/.containerenv" ] && grep -oP "(?<=name=\")[^\";]+" /run/.containerenv; then
|
||||
source $HOME/.dotfiles/bash/bash_profile.distrobox
|
||||
else
|
||||
source $HOME/.dotfiles/bash/bash_profile.host
|
||||
fi
|
||||
|
|
|
@ -104,10 +104,8 @@ if [ -z $SSH_AGENT_PID ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Distrobox only
|
||||
if [ -f "/run/.containerenv" ]; then
|
||||
:
|
||||
# Host only
|
||||
if [ -f "/run/.containerenv" ] && grep -oP "(?<=name=\")[^\";]+" /run/.containerenv; then
|
||||
source $HOME/.dotfiles/bash/bashrc.distrobox
|
||||
else
|
||||
:
|
||||
source $HOME/.dotfiles/bash/bashrc.host
|
||||
fi
|
||||
|
|
|
@ -30,5 +30,11 @@ fi
|
|||
# Perl
|
||||
PATH="${HOME}/perl5/bin:$PATH"
|
||||
|
||||
if [ -f "/run/.containerenv" ] && grep -oP "(?<=name=\")[^\";]+" /run/.containerenv; then
|
||||
source $HOME/.dotfiles/bash/path.distrobox
|
||||
else
|
||||
source $HOME/.dotfiles/bash/path.host
|
||||
fi
|
||||
|
||||
# Export PATH
|
||||
export PATH="$PATH"
|
||||
|
|
Loading…
Reference in New Issue