Merge pull request #107 from dylanaraps/battery

Battery: Added support for NetBSD
This commit is contained in:
Dylan Araps 2016-02-27 20:28:21 +11:00
commit 155c18e2ab
2 changed files with 11 additions and 0 deletions

6
1.4.md Normal file
View file

@ -0,0 +1,6 @@
# Fetch 1.4
### Info
**Battery**<br \>
- Added support for NetBSD

5
fetch
View file

@ -1389,6 +1389,11 @@ getbattery () {
"FreeBSD"*)
battery=$(acpiconf -i 0 | awk -F ':\t' '/Remaining capacity/ {print $2}')
;;
"NetBSD"*)
battery=$(envstat | awk '\\(|\\)' '/charge:/ {print $2}')
battery="${battery/\.*}%"
;;
esac
;;