#!/bin/sh
#
# pmset-battery-full:
# is the internal battery fully charged?
#
# Syntax:
#
#     pmset-battery-full
#
# Example:
#
#     $ pmset-battery-full && echo "yes" || echo "no"
#     yes
#
# These commands are all related:
#
#   * `pmset-battery-full`
#   * `pmset-battery-percent`
#   * `pmset-drawing`
#   * `pmset-drawing-ac-power`
#   * `pmset-drawing-battery-power`
#   * `pmset-powerful`
#
# ## Tracking
#
#   * Command: pmset-battery-full
#   * Version: 2.0.1
#   * Created: 2015-07-01
#   * Updated: 2017-11-02
#   * License: GPL
#   * Contact: Joel Parker Henderson (joel@joelparkerhenderson.com)
##
set -euf
pmset -g batt | grep -qm1 'InternalBattery-0 .*100%'
