logo

dotfiles

My dotfiles, one branch per machine, rebased on base git clone https://hacktivis.me/git/dotfiles.git
commit: ae7108fe16b1e2fc938721091c0d17ac4e9dc54c
parent def3b9ae50f7f0cc42bfea4abfc74e9fada37fb1
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed, 29 Nov 2023 21:02:00 +0100

commons.sh: Use unalias, add cmd→command, add wol-cutievault

Diffstat:

M.common.sh51++++++++++++++++++++++++++++-----------------------
1 file changed, 28 insertions(+), 23 deletions(-)

diff --git a/.common.sh b/.common.sh @@ -2,35 +2,40 @@ # per-shell exports export GPG_TTY="$(tty)" # Aliases -alias bash="SHELL=/bin/bash bash -l" -alias bc="bc ~/Sources/git/hacktivis.me/git/blog/notes/bc.txt" -alias fuck='TF_ALIAS=fuck eval $(thefuck $(fc -ln -1))' -alias fuu='su -c "$(fc -ln -1)"' -alias git-st="git status --short --branch" +unalias bash; alias bash="SHELL=/bin/bash bash -l" +unalias bc; alias bc="bc ~/Sources/git/hacktivis.me/git/blog/notes/bc.txt" +unalias fuck; alias fuck='TF_ALIAS=fuck eval $(thefuck $(fc -ln -1))' +unalias fuu; alias fuu='su -c "$(fc -ln -1)"' +unalias git-st; alias git-st="git status --short --branch" #alias git-sel='git checkout $(git branch --format "%(refname:lstrip=2)" | dmenu -i -l 10)' -alias git-sel='select branch in $(git branch --format "%(refname:lstrip=2)"); do git checkout $branch; break; done' -alias git-story="git log --graph --abbrev-commit --decorate --format=format:'%C(cyan)%h%C(reset) %C(green)(%ad)%C(reset) %s %C(red)- %an %C(reset)%C(yellow)%d%C(reset)'" -alias j='jobs -l' -alias ls='ls -hFA' -alias mv='mv -i' -alias pscpu='ps -eo pid,user,pcpu,pmem,comm --sort -pcpu | head -20' -alias psmem='ps -eo pid,user,pcpu,pmem,comm --sort -pmem | head -20' -alias rm='rm -ri' -alias sleep="/bin/sleep" # avoid sleep as a builtin -alias xstart='exec startx -- $(tty | sed "s/\/dev\/tty/vt/")' -alias .='cd .' -alias ..='cd ..' -alias ...='cd ../..' -alias zzz='locker & (sleep 1 ; memsys)' -alias ytcp='youtube-dl --write-description --write-info-json --write-annotations --write-sub --write-auto-sub --all-subs --add-metadata --xattrs' -alias deposix='unset POSIXLY_CORRECT POSIX_ME_HARDER' +unalias git-sel; alias git-sel='select branch in $(git branch --format "%(refname:lstrip=2)"); do git checkout $branch; break; done' +unalias git-story; alias git-story="git log --graph --abbrev-commit --decorate --format=format:'%C(cyan)%h%C(reset) %C(green)(%ad)%C(reset) %s %C(red)- %an %C(reset)%C(yellow)%d%C(reset)'" +unalias j; alias j='jobs -l' +unalias ls; alias ls='ls -hFA' +unalias mv; alias mv='mv -i' +unalias pscpu; alias pscpu='ps -eo pid,user,pcpu,pmem,comm --sort -pcpu | head -20' +unalias psmem; alias psmem='ps -eo pid,user,pcpu,pmem,comm --sort -pmem | head -20' +unalias rm; alias rm='rm -ri' +unalias sleep; alias sleep="/bin/sleep" # avoid sleep as a builtin +unalias xstart; alias xstart='exec startx -- $(tty | sed "s/\/dev\/tty/vt/")' +unalias .; alias .='cd .' +unalias ..; alias ..='cd ..' +unalias ...; alias ...='cd ../..' +unalias zzz; alias zzz='locker & (sleep 1 ; memsys)' +unalias ytcp; alias ytcp='yt-dlp --sub-langs all,-live_chat --embed-subs --embed-thumbnail --add-metadata --embed-chapters --compat-options filename --concurrent-fragments 10' +unalias ytcp-autosubs; alias ytcp-autosubs='yt-dlp --sub-langs all,-live_chat --write-subs --write-auto-subs --embed-subs --embed-thumbnail --add-metadata --embed-chapters --compat-options filename --concurrent-fragments 10' +unalias deposix; alias deposix='unset POSIXLY_CORRECT POSIX_ME_HARDER' +# List all possible readings; Convert all to romaji +unalias kks; alias kks='kakasi -p -Ha -Ka -Ja -Ea -ka -i utf8 -o utf8' # because the latin alphabet is a mess: https://lojban.org/publications/cll/cll_v1.1_xhtml-chapter-chunks/chapter-phonology.html#section-oddball-orthographies # Character-based: Plan9(Port) tr(1); GNU sed(1) y-command # Byte-based: POSIX, GNU, BusyBox, … tr(1); BusyBox sed(1) y-command -alias lojban_cyrillic='9 tr "abcdefgijklmnoprstuvxyzABCDEFGIJKLMNOPRSTUVXYZ" \ +unalias lojban_cyrillic; alias lojban_cyrillic='9 tr "abcdefgijklmnoprstuvxyzABCDEFGIJKLMNOPRSTUVXYZ" \ "абшдефгижклмнопрстувхъзАБШДЕФГИЖКЛМНОПРСТУВХЪЗ"' -alias cyrillic_lojban='9 tr "абшдефгижклмнопрстувхъзАБШДЕФГИЖКЛМНОПРСТУВХЪЗ" \ +unalias cyrillic_lojban; alias cyrillic_lojban='9 tr "абшдефгижклмнопрстувхъзАБШДЕФГИЖКЛМНОПРСТУВХЪЗ" \ "abcdefgijklmnoprstuvxyzABCDEFGIJKLMNOPRSTUVXYZ"' +unalias cmd; alias cmd=command +unalias wol-cutievault; alias wol-cutievault="wol 74:d4:35:b0:15:3e" # = functions = # Note: POSIX only allows [0-9a-z_A-Z] in function names