Add some utility functions
This commit is contained in:
parent
ae548deea7
commit
c9a15f1228
@ -22,3 +22,17 @@ alias vi=vim
|
|||||||
alias subl=subl3
|
alias subl=subl3
|
||||||
alias tmux="TERM=xterm-256color tmux"
|
alias tmux="TERM=xterm-256color tmux"
|
||||||
alias grep="grep --color=auto"
|
alias grep="grep --color=auto"
|
||||||
|
|
||||||
|
func batt() {
|
||||||
|
BAT_DIR=/sys/class/power_supply/BAT1
|
||||||
|
echo "status: $(cat $BAT_DIR/status)"
|
||||||
|
echo "capacity: $(cat $BAT_DIR/capacity)%"
|
||||||
|
echo "energy_full: $(cat $BAT_DIR/energy_full)/$(cat $BAT_DIR/energy_full_design)"
|
||||||
|
echo "voltage: $(cat $BAT_DIR/voltage_now)"
|
||||||
|
echo "voltage_min_design: $(cat $BAT_DIR/voltage_min_design)"
|
||||||
|
echo "power: $(cat $BAT_DIR/power_now)"
|
||||||
|
}
|
||||||
|
|
||||||
|
func pan() {
|
||||||
|
python -c "import $1; help($1)"
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user