Clean up distrobox errors
This commit is contained in:
parent
f9031a775d
commit
25de715a12
|
@ -49,9 +49,9 @@ alias blc="${HOME}/scripts/thinkpad/blc.pl --notify"
|
|||
alias mpv="flatpak run io.mpv.Mpv"
|
||||
|
||||
# Detect if I'm in a toolbox
|
||||
alias istoolbox='[ -f "/run/.toolboxenv" ] && grep -oP "(?<=name=\")[^\";]+" /run/.containerenv'
|
||||
alias isdistrobox='[ -f "/run/.toolboxenv" ] && grep -oP "(?<=name=\")[^\";]+" /run/.containerenv'
|
||||
|
||||
if [ $(istoolbox) ]; then
|
||||
if [ $(isdistrobox) ]; then
|
||||
source $HOME/.dotfiles/bash/bash_aliases.distrobox
|
||||
else
|
||||
source $HOME/.dotfiles/bash/bash_aliases.host
|
||||
|
|
|
@ -26,7 +26,7 @@ if [ ! -e ${HOME}/.spool/last_login_gui ]; then
|
|||
echo "Use 'startsway' or 'starti3' to launch a GUI"
|
||||
fi
|
||||
|
||||
if [ -f "/run/.containerenv" ] && grep -oP "(?<=name=\")[^\";]+" /run/.containerenv; then
|
||||
if [ -f "/run/.containerenv" ]; then
|
||||
source $HOME/.dotfiles/bash/bash_login.distrobox
|
||||
else
|
||||
source $HOME/.dotfiles/bash/bash_login.host
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
export SWAYSOCK="${HOME}/.spool/sway-ipc.sock"
|
|
@ -1,6 +1,6 @@
|
|||
# vim: ft=sh
|
||||
|
||||
if [ -f "/run/.containerenv" ] && grep -oP "(?<=name=\")[^\";]+" /run/.containerenv; then
|
||||
if [ -f "/run/.containerenv" ]; then
|
||||
source $HOME/.dotfiles/bash/bash_logout.distrobox
|
||||
else
|
||||
source $HOME/.dotfiles/bash/bash_logout.host
|
||||
|
|
|
@ -16,7 +16,7 @@ PERL_LOCAL_LIB_ROOT="${HOME}/perl5${PERL_LOCAL_LIB_ROOT:+:${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
|
||||
if [ -f "/run/.containerenv" ]; then
|
||||
source $HOME/.dotfiles/bash/bash_profile.distrobox
|
||||
else
|
||||
source $HOME/.dotfiles/bash/bash_profile.host
|
||||
|
|
|
@ -22,6 +22,7 @@ export EDITOR="flatpak run io.neovim.nvim"
|
|||
# don't put duplicate lines or lines starting with space in the history.
|
||||
shopt -s histappend
|
||||
HISTCONTROL=ignoreboth
|
||||
HISTFILE=${HOME}/.spool/bash_history
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
|
@ -92,7 +93,7 @@ export TERM="xterm"
|
|||
# Set initial title
|
||||
echo -e -n "\033]2;Welcome to Bash\007"
|
||||
|
||||
if [ -f "/run/.containerenv" ] && grep -oP "(?<=name=\")[^\";]+" /run/.containerenv; then
|
||||
if [ -f "/run/.containerenv" ]; then
|
||||
source $HOME/.dotfiles/bash/bashrc.distrobox
|
||||
else
|
||||
source $HOME/.dotfiles/bash/bashrc.host
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
export DISTROBOX=`grep -oP "(?<=name=\")[^\";]+" /run/.containerenv`
|
||||
HISTFILE=${HISTFILE}.$DISTROBOX
|
||||
neofetch
|
|
@ -10,3 +10,4 @@ if [ -z $SSH_AGENT_PID ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
echo "This is the host OS. You probably want to open a Distrobox."
|
||||
|
|
Loading…
Reference in New Issue