takashi kono's blog

コーヒーとキーボードと共に何かを記録していくブログ

Ubuntu 18.04 でワイヤレスマウスのバッテリー残量を知る

ワイヤレスマウスのバッテリー残量を知る備忘録

Ubuntu でワイヤレスマウスのバッテリー残量を知れるとのことだったので、コマンドを探した。
備忘録として残す

コマンドと実行結果

Command

upower --dump

実行結果

$ upower --dump
Device: /org/freedesktop/UPower/devices/mouse_hidpp_battery_1
  native-path:          hidpp_battery_1
  model:                M570
  serial:               XXXXXXXXX
  power supply:         no
  updated:              2020年01月27日 10時00分31秒 (21 seconds ago)
  has history:          yes
  has statistics:       yes
  mouse
    present:             yes
    rechargeable:        yes
    state:               discharging
    warning-level:       critical
    percentage:          5%
    icon-name:          'battery-caution-symbolic'

Device: /org/freedesktop/UPower/devices/DisplayDevice
  power supply:         no
  updated:              2020年01月21日 15時21分52秒 (499140 seconds ago)
  has history:          no
  has statistics:       no
  unknown
    warning-level:       none
    icon-name:          'battery-missing-symbolic'

Daemon:
  daemon-version:  0.99.7
  on-battery:      no
  lid-is-closed:   no
  lid-is-present:  no
  critical-action: XXXXX

無事情報を取れていますね。そろそろ、電池を準備せねば。以上!