From 448e2e43f1882bfba4cf38dc724fedc2a3e7881f Mon Sep 17 00:00:00 2001 From: Vikash Bajaj Date: Fri, 23 Oct 2015 00:51:09 -0700 Subject: [PATCH] Added remaining battery time and percentage to hardware information --- README.md | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index f4b1efc..d9ef255 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,6 @@ If you want to contribute, you are highly encouraged to do so. Please read the [ - [AirDrop](#airdrop) - [AppleScript](#applescript) - [Basics](#basics) - - [Battery Status](#battery-status) - [Clipboard](#clipboard) - [FileVault](#filevault) - [Information/Reports](#informationreports) @@ -498,6 +497,16 @@ atsutil server -ping networksetup -listallhardwareports ``` +#### Remaining Battery Percentage +```bash +pmset -g batt | egrep "([0-9]+\%).*" -o --colour=auto | cut -f1 -d';' +``` + +#### Remaining Battery Time +```bash +pmset -g batt | egrep "([0-9]+\%).*" -o --colour=auto | cut -f3 -d';' +``` + #### Show Connected Device's UDID ```bash system_profiler SPUSBDataType | sed -n -e '/iPad/,/Serial/p' -e '/iPhone/,/Serial/p' @@ -876,20 +885,6 @@ How long since your last restart. uptime ``` -### Battery Status - -#### Battery Percentage -Remaining battery in percentage. -```bash -pmset -g batt | egrep "([0-9]+\%).*" -o --colour=auto | cut -f1 -d';' -``` - -#### Remaining Batter Time -Remaining battery backup time. -```bash -pmset -g batt | egrep "([0-9]+\%).*" -o --colour=auto | cut -f3 -d';' -``` - ### Clipboard #### Copy data to Clipboard