fish: remove battery function
This commit is contained in:
parent
8aeeabb2a9
commit
53083f9ccf
@ -1,16 +0,0 @@
|
|||||||
function battery --description "Print battery status"
|
|
||||||
if test (uname -s) != Darwin
|
|
||||||
echo "Unsupported kernel: "(uname -s)
|
|
||||||
else
|
|
||||||
set --local battery_status (pmset -g batt | string split0)
|
|
||||||
set --local battery_charge (echo $battery_status | rg --only-matching "\d+%")
|
|
||||||
set --local power_source (echo $battery_status | rg --only-matching "[A-Za-z]+\sPower")
|
|
||||||
|
|
||||||
set_color green
|
|
||||||
echo "⚡️ Running on $power_source with $battery_charge charge"
|
|
||||||
set_color normal
|
|
||||||
end
|
|
||||||
|
|
||||||
# Repaint is needed since there is a keybinding for this function
|
|
||||||
commandline -f repaint
|
|
||||||
end
|
|
Loading…
x
Reference in New Issue
Block a user