Battery: Added support for NetBSD

This commit is contained in:
dylan 2016-02-27 20:25:39 +11:00
parent b7ba69397c
commit 61f6255dcb
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
;;