remove autosave files
This commit is contained in:
@@ -1,43 +0,0 @@
|
||||
# .bash_profile
|
||||
# Adrian Abeyta <adrian@adrianabeyta.com>
|
||||
# 2026.04.05
|
||||
|
||||
# don't do anything if not running interactively
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
# include user home bins if they exist
|
||||
if [ -d "$HOME/bin" ] ; then
|
||||
PATH="$HOME/bin:$PATH"
|
||||
fi;
|
||||
if [ -d "$HOME/.local/bin" ] ; then
|
||||
PATH="$HOME/.local/bin:$PATH"
|
||||
fi;
|
||||
|
||||
# load the dotfiles
|
||||
for file in ~/.{env,path,bash_prompt,aliases,functions}; do
|
||||
[ -r "$file" ] && [ -f "$file" ] && \
|
||||
source "$file";
|
||||
done;
|
||||
unset file;
|
||||
|
||||
# fun scripts
|
||||
if is_true "${HAVE_FUN:-}"; then
|
||||
source ~/.fun
|
||||
fi
|
||||
|
||||
shopt -s nocaseglob; # case-insensitive globbing
|
||||
shopt -s histappend; # append to bash history file
|
||||
shopt -s cdspell; # autocorrect typos in path names when cd'ing
|
||||
shopt -s checkwinsize # update col/line values on each command
|
||||
|
||||
# enable tab completion for 'g' by marking as alias for 'git'
|
||||
if type _git &> /dev/null; then
|
||||
complete -o default -o nospace -F _git g;
|
||||
fi;
|
||||
|
||||
# startup oh-my-posh
|
||||
OMP_THEME="~/.omp/themes/custom.json"
|
||||
eval "$(oh-my-posh init bash --config $OMP_THEME)"
|
||||
@@ -1,53 +0,0 @@
|
||||
# Bash Functions
|
||||
|
||||
mkcd()
|
||||
{
|
||||
mkdir -p -- "$1" && cd -P -- "$1"
|
||||
}
|
||||
|
||||
# determine size of a file or total size of a directory
|
||||
function fs() {
|
||||
if du -b /dev/null > /dev/null 2>&1; then
|
||||
local arg=-sbh;
|
||||
else
|
||||
local arg=-sh;
|
||||
fi
|
||||
if [[ -n "$@" ]]; then
|
||||
du $arg -- "$@";
|
||||
else
|
||||
du $arg .[^.]* ./*;
|
||||
fi;
|
||||
}
|
||||
|
||||
|
||||
# use Git’s colored diff when available
|
||||
hash git &>/dev/null;
|
||||
if [ $? -eq 0 ]; then
|
||||
function diff() {
|
||||
git diff --no-index --color-words "$@";
|
||||
}
|
||||
fi;
|
||||
|
||||
## system administration
|
||||
|
||||
### service files
|
||||
sysedit() {
|
||||
local svc="$1"
|
||||
sudo systemctl edit --full "$svc"
|
||||
|
||||
read -p "Reload + restart $svc? [y/N]: " ans
|
||||
if [[ "$ans" == "y" ]]; then
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart "$svc"
|
||||
fi
|
||||
}
|
||||
sysadd() {
|
||||
local svc="$1"
|
||||
sudo systemctl edit "$svc"
|
||||
|
||||
read -p "Reload + restart $svc? [y/N]: " ans
|
||||
if [[ "$ans" == "y" ]]; then
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart "$svc"
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user