Added commands for remaining battery backup time and percentage.

This commit is contained in:
scottydelta 2015-10-22 22:37:23 -07:00
parent dfd16a8fca
commit c3ad131803

View File

@ -65,6 +65,7 @@ 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)
@ -875,6 +876,20 @@ 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