From 53083f9ccf127b0f56dbf8a8bf68d53a5e6e6498 Mon Sep 17 00:00:00 2001 From: Charles Gould Date: Wed, 25 Oct 2023 20:17:13 -0500 Subject: [PATCH] fish: remove battery function --- fish/functions/battery.fish | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 fish/functions/battery.fish diff --git a/fish/functions/battery.fish b/fish/functions/battery.fish deleted file mode 100644 index 882c06f..0000000 --- a/fish/functions/battery.fish +++ /dev/null @@ -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