diff options
author | Xiao Pan <gky44px1999@gmail.com> | 2023-10-25 06:45:08 +0000 |
---|---|---|
committer | Xiao Pan <gky44px1999@gmail.com> | 2023-10-25 06:45:08 +0000 |
commit | e4db0b25bf6540386e737594a47cb92a83c0cbea (patch) | |
tree | 70f85967663aa539fabe40e40803fa638acfae00 /home/xyz/.bashrc | |
parent | 12bda1ac3390f2d16a401d895faf0ef2418f874c (diff) |
update
Diffstat (limited to 'home/xyz/.bashrc')
-rw-r--r-- | home/xyz/.bashrc | 56 |
1 files changed, 40 insertions, 16 deletions
diff --git a/home/xyz/.bashrc b/home/xyz/.bashrc index 4597afb4..be28f908 100644 --- a/home/xyz/.bashrc +++ b/home/xyz/.bashrc @@ -32,17 +32,22 @@ esac PS1="\[$(tput setaf 2)\][\u@\h \W]\$ \[$(tput sgr0)\]" # https://github.com/LukeSmithxyz/voidrice/blob/master/.config/shell/aliasrc -for cmd in iotop nethogs hardcode-fixer ventoy du units_cur fbgrab powertop nft rpi-imager fdisk; do +for cmd in hardcode-fixer ventoy du units_cur fbgrab powertop nft rpi-imager fdisk dmesg; do alias $cmd="sudo $cmd" done -for cmd in pacdiff 'tree -a'; do - alias ${cmd%% *}="sudo -E $cmd" +for cmd in pacdiff visudo; do + alias $cmd="sudo -E $cmd" +done +for cmd in loop o 'watch -c'; do + alias ${cmd%% *}="$cmd " done unset cmd # same name alias absolutely-proprietary='echo n | absolutely-proprietary -f' alias alsamixer='alsamixer -V all' +# I can't find a quick and easy way to temperory disable cloc config file except to change config file. Using an alias can disable --vcs with just \cloc. +alias cloc='cloc --vcs auto' alias diff='diff --color=auto' alias grep='grep --color=auto' #alias info='info --vi-keys' @@ -53,38 +58,57 @@ alias remind='remind -@' alias rm='rm -I' alias sdcv='sdcv --color' alias shellcheck='shellcheck -x' +alias tree='tree -aC | "$PAGER"' alias uname='uname -a' -alias watch='watch -c' # different name +alias a=alarm # /dev/ttyACM0 can be in config file, or as environmantal variable, see /usr/share/doc/adafruit-ampy/README.md -alias ap='sudo ampy -p /dev/ttyACM0' +#alias ap='ampy -p /dev/ttyACM0' +alias b='lsblk -o NAME,FSTYPE,FSVER,LABEL,UUID,FSAVAIL,FSUSED,FSUSE%,MOUNTPOINTS' alias c=cfg +#alias cr=curl +alias cri='curl -Is' +alias crig='curl -Is www.google.com' alias d='\sdcv --color' +alias e='"$PAGER"' +# https://superuser.com/a/1202867 +alias fdu="find . -maxdepth 1 -execdir du -sh '{}' \+ | sort -h" alias g=git +alias gcd='git clone --depth=1' +alias gr='\grep --color=auto -i' +alias grr='\grep --color=auto -iIR' +alias h=htop alias l='\ls --color=auto -A --group-directories-first' alias ll='\ls --color=auto -lAh --group-directories-first' +#alias lo=loop +alias lop='loop ping' +alias lopd='loop ping 9.9.9.9' alias m=man alias p=pacman alias pt=pactree alias pu=paru alias qre='qrencode -t utf8i -m 1' -alias r='rem -c+2 -@' -alias s='sudo ' # https://askubuntu.com/a/22043 +alias r='rem -cu+2 -@' +# https://askubuntu.com/a/22043 +alias s='sudo ' alias se='sudo -E ' +alias ska='ssh ka' +alias sp='ssh pp' alias spd='speedtest; librespeed-cli' alias sv=sudoedit alias sy=systemctl -alias tp='sudo tio /dev/ttyACM0' -alias v='$EDITOR' -alias va='$EDITOR "$XDG_DOCUMENTS_DIR/notes/computer/arch_install.md"' -alias vc='$EDITOR "$XDG_DOCUMENTS_DIR/notes/computer/cli_notes.md"' -alias vq='$EDITOR "$XDG_DOCUMENTS_DIR/notes/others/questions_ideas_tips.md"' -alias vr='$EDITOR "$DOTREMINDERS"' -alias vvrc='$EDITOR +e\ \$MYVIMRC' +alias syd='systemctl list-dependencies --all' +alias sydr='systemctl list-dependencies --all --reverse' +alias sye='systemctl list-unit-files --state=enabled' +alias sys='systemctl status' +alias syu='systemctl --user' +alias syue='systemctl --user list-unit-files --state=enabled' +alias syus='systemctl --user status' +alias v='"$EDITOR"' +alias vd='vidir2 --linktargets' +alias vrc='"$EDITOR" +e\ \$MYVIMRC' alias za='zoxide add' - -# almost never use #alias zq='zoxide query' #alias zqi='zoxide query -i' |