This commit is contained in:
yuriy 2024-10-13 13:36:30 -04:00
parent d96b37b5b3
commit 456cd9b6bd

39
.bashrc
View File

@ -391,9 +391,17 @@ update() {
if command -v flatpak &> /dev/null; then
echo "Updating Flatpak packages:"
flatpak update
flatpak update -y
fi
if [ -d "$HOME/Syncthing/Configurations/Pacman+Paru/" ]; then
echo "Exporting pkglist to /Configurations"
pacman -Qqe > $HOME/Syncthing/Configurations/Pacman+Paru/$(hostname)_pacmanpkglist.txt
else
echo "Skipping pkglist export. Config folder doesn't exist on this device."
fi
# 1 liner
# paru -Sy archlinux-keyring chaotic-keyring endeavouros-keyring --noconfirm --needed && paru -Syu --noconfirm && { [[ $(hostname) == "EOS-SERVER" ]] && echo "Skipping Clearing Update Cache" || (echo "Clearing out Pacman Cache" && echo clearing out $(sudo ls /var/cache/pacman/pkg/ | wc -l) packages in cache && ( echo "y"; echo "y" ) | paru -Scc); } && echo "updating arch mirrorlists" && eos-rankmirrors
}
@ -433,6 +441,13 @@ cd ${Directory}
# echo ${1}
}
rstow() {
# refresh stow configuration and remake any new .dotfile symlinks
cd ~/Syncthing/Configurations/.dotfiles ; stow -d ~/Syncthing/Configurations/.dotfiles -t ~/ -S .
}
#------------------------------------------------------------
# to refresh terminal with new config:
# . ~/.bashrc
@ -444,6 +459,9 @@ cd ${Directory}
################################################################################
export PATH="$HOME/.local/bin:$PATH"
export PATH="$PATH:/opt/sublime_merge"
# pacman/paru aliases
# -------------------
@ -458,9 +476,9 @@ alias parurl='sudo pacman -Syy'
alias ps='pacseek'
# exa (ls Replacement)
alias ls="exa -l"
alias ll="exa -alh"
alias lst="exa --tree --level 2 --long"
alias ls="ls -la"
alias ll="ls -alh"
alias lst="ls --tree --level 2 --long"
# misc aliases
alias ef='_open_files_for_editing' # 'ef' opens given file(s) for editing
@ -503,6 +521,19 @@ alias gsi="git submodule init"
alias gsu="git submodule update --recursive --remote"
alias gr="touch README.md ;nano README.md" # choco install nano -y
# Chezmoi Aliases
alias cz="chezmoi"
alias czs="chezmoi status"
alias cza="chezmoi apply"
alias czc="chezmoi cd"
alias czd="dolphin /home/yuriy/.local/share/chezmoi"
# Misc
# Keep screen awake
alias ka="while :; do xdotool mousemove_relative -- $(( $RANDOM % 3 - 1 )) $(( $RANDOM % 3 - 1 )) sleep 60; done"
alias sublm='sublime_merge'
################################################################################