add ops function + print battery status
This commit is contained in:
parent
c474a12d4e
commit
5b5df74087
1 changed files with 5 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ g() { LC_ALL=C grep --exclude "*~" -r -P ${@:?regexp missing} }
|
|||
sprunge() { cat $@ | curl -sF 'sprunge=<-' http://sprunge.us }
|
||||
# minimal functions, 02mar
|
||||
mkcd() { mkdir -p "$1"; cd "$1" }
|
||||
ops() { a="$(lr -t 'type=f' -t '!mode|1' -A)" && "$EDITOR" "$a" }
|
||||
|
||||
set -o emacs
|
||||
|
||||
|
|
@ -24,4 +25,7 @@ alias pc='pass -c'
|
|||
alias pe='pass edit'
|
||||
cdpath="$HOME"
|
||||
|
||||
printf '%s +%s+\n' "$(date +%d%b%Y | tr [:upper:] [:lower:])" "$(hostname)"
|
||||
# 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')"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue