diff options
Diffstat (limited to 'home/xyz/.bashrc')
| -rw-r--r-- | home/xyz/.bashrc | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/home/xyz/.bashrc b/home/xyz/.bashrc index c811b853..ad78be64 100644 --- a/home/xyz/.bashrc +++ b/home/xyz/.bashrc @@ -55,7 +55,7 @@ unset cmd # https://unix.stackexchange.com/questions/484442/how-can-i-get-the-pid-of-a-subshell for branch in $(git -C "$HOME/programs/config_local_arch" branch | awk '{print ($1=="*")?$2:$1}' | grep -v master); do case "$branch" in - master|studio|pp) ;; + master|pp) ;; *) alias "s$branch"="ssh $branch";; esac done @@ -71,7 +71,12 @@ alias c=cfg alias cri='curl -Is' alias crig='curl -Is www.google.com' alias d='sdcv --color' -alias e='"$PAGER"' +# Using '"$PAGER"' will cause complete-alias unable to complete "e <tab>" and +# "e --<tab>". I don't know why alias v='"$EDITOR"' does not have this issue, I +# guess maybe it is related to less has some fzf completion? see `complete -p +# less` output is "complete -F _fzf_path_completion less". Temporary ignore +# shellcheck warnings about this if not met any issues. +alias e="$PAGER" # https://superuser.com/a/1202867 alias fdu="find . -maxdepth 1 -execdir du -sh '{}' \+ | sort -h" alias g=git @@ -88,7 +93,10 @@ alias ll='ls --color=auto -lAh --group-directories-first' alias lop='loop ping' alias lopd='loop ping 9.9.9.9' alias m=man +alias mpf='mpra -c "$HOME/programs/repos/fly/any/fsh-git"; sudo pacman -Sy fsh-git --noconfirm' alias p=pacman +# Pacman Qqne Redirect +alias pqr='pacman -Qqne > "$XDG_CONFIG_HOME/myconf/pacman_Qqne"; pacman -Qqme > "$XDG_CONFIG_HOME/myconf/pacman_Qqme"' alias pt=pactree alias pu=paru alias qre='qrencode -t utf8i -m 1' @@ -99,12 +107,8 @@ alias sa='ssh-add -l || ssh-add' alias se='sudo -E ' alias sp='ssh pp' alias spd='speedtest; librespeed-cli' -alias sst='ssh studio' -# \" to consider $HOME contain space, need \ else " will be expanded locally, need \$ else $HOME will expand locally -# can test with: alias mytest='ssh studio for i in \"\$SSH_CONNECTION\"\; do echo \$i\; echo a\; done' -alias sstm='ssh -t -- studio mpra -c \"\$HOME/programs/repos/fly/any/fsh-git\"' # can test this mess with `alias tt='echo "\$haha \"lala\""'` -alias sun='printf "set \$Longitude \"-121.89\"\nset \$Latitude \"37.34\"\nrem [sunrise()] msg sunrise\nrem [sunset()] msg sunset" | remind -n -' +alias sun='printf "set \$Longitude \"120.95\"\nset \$Latitude \"31.38\"\nrem [sunrise()] msg sunrise\nrem [sunset()] msg sunset" | remind -n -' # another way: # can test this mess with `alias tt="echo '\$haha \"lala\"'"` #alias sun="printf 'set \$Longitude \"-121.89\"\nset \$Latitude \"37.34\"\nrem [sunrise()] msg sunrise\nrem [sunset()] msg sunset' | remind -n -" @@ -113,6 +117,9 @@ alias y=systemctl alias yd='systemctl list-dependencies --all' alias ydr='systemctl list-dependencies --all --reverse' alias ye='systemctl list-unit-files --state=enabled' +# sYstemctl Enabled Redirect +alias yer='systemctl list-unit-files --state=enabled > "$XDG_CONFIG_HOME/myconf/sye"; systemctl --user list-unit-files --state=enabled > "$XDG_CONFIG_HOME/myconf/syue"' +alias yr='systemctl restart' alias ys='systemctl status' alias yu='systemctl --user' alias yue='systemctl --user list-unit-files --state=enabled' @@ -131,6 +138,7 @@ alias vrm='"$EDITOR" "$XDG_DOCUMENTS_DIR/notes/others/recurring_maintenance.md"' alias vt='"$EDITOR" "$XDG_DOCUMENTS_DIR/notes/others/tmp_mobile_notes.md"' alias xmr='monero-wallet-cli --config-file="$HOME/.bitmonero/monero-wallet-cli.conf"' alias xmrds='monerod status; monerod print_net_stats' +alias xr='xset r rate 250 30' alias za='zoxide add' #alias zq='zoxide query' #alias zqi='zoxide query -i' @@ -145,6 +153,7 @@ alias glmark2='glmark2 --fullscreen --annotate' alias grep='grep --color=auto' #alias info='info --vi-keys' alias ls='ls --color=auto' +alias nethogs='nethogs -C' alias radeontop='radeontop -c' alias rem='rem -@' alias remind='remind -@' |
