40 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
# shellcheck shell=bash
 | 
						|
# shellcheck disable=SC1090,SC1091,SC2034
 | 
						|
 | 
						|
# If not running interactively, don't do anything
 | 
						|
[[ $- != *i* ]] && return
 | 
						|
 | 
						|
# Workaround for SSH/Login sessions
 | 
						|
# https://github.com/systemd/systemd/issues/7641#issuecomment-680694017
 | 
						|
set -a
 | 
						|
if shopt -q login_shell && [[ -f /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator ]]; then
 | 
						|
	eval "$(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)"
 | 
						|
# Fallback to to manually parsing environment.d
 | 
						|
elif [[ -z "$XDG_DATA_HOME" && -z "$XDG_CONFIG_HOME" && -z "$XDG_STATE_HOME" && -z "$XDG_CACHE_HOME" ]]; then
 | 
						|
	eval "$(<"$HOME/.config/environment.d/xdg.conf")"
 | 
						|
fi
 | 
						|
set +a
 | 
						|
 | 
						|
# If we have local bash-completion, use it
 | 
						|
[[ -f $HOME/.local/bin/bash_completion ]] && . "$HOME/.local/bin/bash_completion"
 | 
						|
 | 
						|
# Bash XDG history
 | 
						|
export HISTFILE="$XDG_STATE_HOME"/bash/history
 | 
						|
 | 
						|
# Helpful tool: https://bash-prompt-generator.org
 | 
						|
# On github: https://github.com/Scriptim/bash-prompt-generator
 | 
						|
PS1='[\u@\h \w]\$ '
 | 
						|
 | 
						|
[[ -f $XDG_CONFIG_HOME/bash/.bash_aliases ]] && source "$XDG_CONFIG_HOME/bash/.bash_aliases"
 | 
						|
 | 
						|
# https://github.com/pkasemir/find-the-command
 | 
						|
[[ -f /usr/share/doc/find-the-command/ftc.bash ]] && source /usr/share/doc/find-the-command/ftc.bash noupdate quiet info
 | 
						|
# https://wiki.archlinux.org/title/Pkgfile#Command_not_found
 | 
						|
# [[ -f /usr/share/doc/pkgfile/command-not-found.bash ]] && source /usr/share/doc/pkgfile/command-not-found.bash
 | 
						|
 | 
						|
# Starship after defining custom prompt, easy to remove
 | 
						|
hash starship 2>/dev/null && eval "$(starship init bash)"
 | 
						|
 | 
						|
# Zoxide init has to be last
 | 
						|
hash zoxide 2>/dev/null && eval "$(zoxide init bash)"
 |