This commit is contained in:
yuriy 2024-12-11 01:09:51 -05:00
parent 456cd9b6bd
commit ea75d79809

93
.bashrc
View File

@ -2,6 +2,7 @@
# ~/.bashrc # ~/.bashrc
# #
# $HOME/Syncthing/Scripts/Bash/quotes-parser/parse_quotes.sh
## Save history of multiple terminal windows ## Save history of multiple terminal windows
#-https://unix.stackexchange.com/questions/1288/preserve-bash-history-in-multiple-terminal-windows #-https://unix.stackexchange.com/questions/1288/preserve-bash-history-in-multiple-terminal-windows
@ -48,9 +49,6 @@ ShowInstallerIsoInfo() {
} }
alias ls='ls --color=auto'
alias ll='ls -lav --ignore=..' # show long listing of all except ".."
alias l='ls -lav --ignore=.?*' # show long listing but no hidden dotfiles except "."
[[ "$(whoami)" = "root" ]] && return [[ "$(whoami)" = "root" ]] && return
@ -375,11 +373,11 @@ parul(){
update() { update() {
paru -Sy archlinux-keyring chaotic-keyring endeavouros-keyring --noconfirm --needed # update keyrings paru -Sy archlinux-keyring endeavouros-keyring --noconfirm --needed # update keyrings
paru -Syu --noconfirm # update packages, no confirmation paru -Syu --noconfirm # update packages, no confirmation
# Skip clearing update cache if this is Flexo Server # Skip clearing update cache if this is Flexo Server
if [[ $(hostname) == "EOS-SERVER" ]]; then if [[ $(hostname) == "FLEXO" ]]; then
echo "Skipping Clearing Update Cache" echo "Skipping Clearing Update Cache"
else else
echo "Clearing out Pacman Cache" echo "Clearing out Pacman Cache"
@ -414,6 +412,14 @@ updatewr() {
sudo reboot sudo reboot
} }
updatews() {
# Run the Update function
update
# Restart
sudo poweroff
}
rank() { rank() {
echo "re-ranking arch mirrorlists" echo "re-ranking arch mirrorlists"
eos-rankmirrors eos-rankmirrors
@ -425,6 +431,11 @@ rkeymapper(){
echo "keymapper restarted successfully" echo "keymapper restarted successfully"
} }
rntfy(){
pgrep -f ntfy-Automate.sh | xargs kill
$HOME//.config/scripts/ntfy-react/ntfy-react.sh &
}
cdp(){ cdp(){
filepath=${1} filepath=${1}
@ -442,12 +453,6 @@ cd ${Directory}
} }
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: # to refresh terminal with new config:
# . ~/.bashrc # . ~/.bashrc
@ -460,6 +465,7 @@ rstow() {
################################################################################ ################################################################################
export PATH="$HOME/.local/bin:$PATH" export PATH="$HOME/.local/bin:$PATH"
export PATH="$PATH:/opt/sublime_merge" export PATH="$PATH:/opt/sublime_merge"
export PATH="$PATH:~/.ssh/"
@ -470,15 +476,11 @@ export PATH="$PATH:/opt/sublime_merge"
alias parus='paru -Sy ; paru -S' alias parus='paru -Sy ; paru -S'
alias parusy='paru -Sy ; paru -S --noconfirm' alias parusy='paru -Sy ; paru -S --noconfirm'
alias paruss='paru -Ss' alias paruss='paru -Ss'
alias parur='paru -R' alias parur='paru -Rs'
alias parurr='paru -Rs' alias parurr='paru -Rs'
alias parurl='sudo pacman -Syy' alias parurl='sudo pacman -Syy'
alias ps='pacseek' alias pcs='pacseek'
# exa (ls Replacement)
alias ls="ls -la"
alias ll="ls -alh"
alias lst="ls --tree --level 2 --long"
# misc aliases # misc aliases
alias ef='_open_files_for_editing' # 'ef' opens given file(s) for editing alias ef='_open_files_for_editing' # 'ef' opens given file(s) for editing
@ -490,6 +492,9 @@ alias yt='yt-dlp'
alias chrome='chromium' alias chrome='chromium'
alias mvideos='/home/yuriy/Syncthing/Python/Tools/MergeVideoFilesTogether.py' alias mvideos='/home/yuriy/Syncthing/Python/Tools/MergeVideoFilesTogether.py'
#alias everything=fo #alias everything=fo
alias todos='rg "(FIXME|TODO)" .' # search the contents of folders/subfolders for fixme,todo,
# boot/switch to CLI/GUI target # boot/switch to CLI/GUI target
alias switchtocli="sudo systemctl isolate multi-user.target" alias switchtocli="sudo systemctl isolate multi-user.target"
@ -508,7 +513,7 @@ alias gac="git add .;git commit -m"
alias gacc='f() { git add . ; git commit -m "$@" ; git push; }; f' alias gacc='f() { git add . ; git commit -m "$@" ; git push; }; f'
alias gpm="git push origin master" alias gpm="git push origin master"
alias pull="git pull" alias pull="git pull"
alias gpp="git pull" alias gpp="git pull --rebase --autostash"
alias gl="git log" alias gl="git log"
alias glo="git log --oneline" alias glo="git log --oneline"
alias gch="git checkout ${1}" alias gch="git checkout ${1}"
@ -525,15 +530,50 @@ alias gr="touch README.md ;nano README.md" # choco install nano -y
alias cz="chezmoi" alias cz="chezmoi"
alias czs="chezmoi status" alias czs="chezmoi status"
alias cza="chezmoi apply" alias cza="chezmoi apply"
alias czadd="chezmoi add"
alias czc="chezmoi cd" alias czc="chezmoi cd"
alias czd="dolphin /home/yuriy/.local/share/chezmoi" alias czcd="chezmoi cd"
alias czd="dolphin $HOME/.local/share/chezmoi ; cd /home/yuriy/.local/share/chezmoi"
alias czea="chezmoi edit --apply"
# Misc # Misc
# Keep screen awake alias ka="while :; do xdotool mousemove_relative -- $(( $RANDOM % 3 - 1 )) $(( $RANDOM % 3 - 1 )) sleep 60; done" # Keep screen awake
alias ka="while :; do xdotool mousemove_relative -- $(( $RANDOM % 3 - 1 )) $(( $RANDOM % 3 - 1 )) sleep 60; done" alias chmodx="chmod u+x" # make file executable for current user
alias sm='smerge'
################################################################################
if command -v lsd &> /dev/null; then
alias ls="lsd -al"
alias ll="lsd -alh"
alias lst="lsd --tree --level 2"
else
alias ls="ls -la"
alias ll="ls -alh"
alias lst="ls --tree --level 2 --long"
#alias ls='ls --color=auto'
#alias ll='ls -lav --ignore=..' # show long listing of all except ".."
#alias l='ls -lav --ignore=.?*' # show long listing but no hidden dotfiles except "."
fi
if command -v bat &> /dev/null; then
alias cat="bat"
alias less="bat"
alias df="duf"
alias du="dust"
fi
alias sublm='sublime_merge'
################################################################################ ################################################################################
@ -543,10 +583,15 @@ if command -v zoxide &> /dev/null; then
eval "$(zoxide init --cmd cd bash)" eval "$(zoxide init --cmd cd bash)"
fi fi
# initialize atuin if it's installed
if command -v atuin &> /dev/null; then if command -v atuin &> /dev/null; then
# Initialize preexec and atuin if atuin is installed # Initialize preexec and atuin if atuin is installed
[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh [[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh
eval "$(atuin init bash)" eval "$(atuin init bash)"
fi fi
# Initialize starship if it's installed
if command -v starship &> /dev/null; then
eval "$(starship init bash)"
fi