This commit is contained in:
kento2 2026-09-05 12:12:35 +02:00
parent ef3e97c79e
commit 0086cdbded
10 changed files with 51 additions and 677 deletions

View file

@ -8,32 +8,23 @@ PS1='%B%m%(?.. %??)%(1j. %j&.)%b %2~%B%#%b '
# minimal usable history, 12nov2015 +leah+
setopt histignoredups histignorespace incappendhistory extendedhistory
SAVEHIST=9000 HISTSIZE=9000 HISTFILE=~/.zsh_history
# minimal functions, 08sep2017 +leah+
g() { LC_ALL=C grep --exclude "*~" -r -P ${@:?regexp missing}; }
sprunge() { cat $@ | curl -sF 'sprunge=<-' http://sprunge.us; }
# minimal functions, 02mar
# minimal functions, 02mar +kenshi+
mkcd() { mkdir -p "$1"; cd "$1"; }
set -o emacs
cdpath="$HOME"
# date +hostname+ [battery]
printf '%s +%s+ %s\n' \
"$(date +%d%b%Y | tr [:upper:] [:lower:])" "$(hostname)" \
"$((cat /sys/class/power_supply/BAT0/capacity 2>/dev/null && echo %) | tr -d '\n')"
test -d ~/Downloads && rmdir ~/Downloads
kcdp() {
name="`lr -A -t 'depth > 3 ? prune : print' -t 'type=d' "$HOME/src" -s | fzy`"
test $? -eq 0 && cd "$HOME/src/$name"
}
kmktags() { ctags `lr -A -t 'name=~".(ch)$"'`; }
alias xi='doas xi -y'
alias vi='vis'
alias xr='doas xbps-remove -y'
alias kpc='pass -c'
alias kp='pass'
alias nman='man -M /usr/local/netbsd-man'
alias kpc='pass -c'
alias xi='doas xi -y'
alias xr='doas xbps-remove'
alias strace='strace -f -s 256 -yy'
# print date +hostname+ [battery]
printf '%s +%s+ %s\n' \
"$(date +%d%b%Y | tr [:upper:] [:lower:])" \
"$(hostname)" \
"$((cat /sys/class/power_supply/BAT0/capacity 2>/dev/null && echo %) | tr -d '\n')"
test -d ~/Downloads && rmdir ~/Downloads