Finished updating bashrc and others

This commit is contained in:
Eric Renfro 2024-03-14 21:49:14 -04:00
parent b538219e08
commit c041421e76
Signed by: psi-jack
SSH key fingerprint: SHA256:1TKB8Z257L8EHK8GWNxKgMhD8a+FAR+f+j3nnlcuNVM
4 changed files with 56 additions and 1 deletions

4
.bash_logout Normal file
View file

@ -0,0 +1,4 @@
# ~/.bash_logout: executed by bash(1) when login shell exits.
test -r ~/.shell-logout && source ~/.shell-logout

15
.bash_profile Normal file
View file

@ -0,0 +1,15 @@
# Via https://tanguy.ortolo.eu/blog/article25/shrc
#
# At startup, depending on the case:
# - run as a login shell (or with the option --login), it executes profile (or
# bash_profile instead if it exists (only user-specific version));
# - run as an interactive, non-login shell, it executes bashrc (the system-wide
# version is called bash.bashrc).
#
# At exit, it executes ~/.bash_logout (the system-wide version is called
# bash.bash_logout).
# Note the funny (read: insane) non-login condition for executing bashrc: it is
# often worked around by having the profile execute bashrc anyway.
[[ -f ~/.profile ]] && . ~/.profile

11
.bashrc
View file

@ -1,6 +1,15 @@
# Via https://tanguy.ortolo.eu/blog/article25/shrc
# #
# ~/.bashrc # At startup, depending on the case:
# - run as a login shell (or with the option --login), it executes profile (or
# bash_profile instead if it exists (only user-specific version));
# - run as an interactive, non-login shell, it executes bashrc (the system-wide
# version is called bash.bashrc).
# #
# At exit, it executes ~/.bash_logout (the system-wide version is called
# bash.bash_logout).
# Note the funny (read: insane) non-login condition for executing bashrc: it is
# often worked around by having the profile execute bashrc anyway.
# If not running interactively, don't do anything # If not running interactively, don't do anything
[[ $- != *i* ]] && return [[ $- != *i* ]] && return

27
.shell-logout Normal file
View file

@ -0,0 +1,27 @@
# vim: set ft=sh sw=2 et :
# when leaving the console clear the screen to increase privacy
if [ "$SHLVL" = 1 ]; then
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi
# When leaving the console clear the screen to increase privacy. Also clear the
# scroll-back buffer by switching to tty63 and back.
case "$(tty)" in
/dev/tty[0-9])
t=$(v=`tty` ; echo ${v##*ty})
clear
chvt 63; chvt "$t"
;;
/dev/tty[0-9][0-9])
t=$(v=`tty` ; echo ${v##*ty})
clear
chvt 63; chvt "$t"
;;
*)
;;
esac