Added MX Ergo battery level
This commit is contained in:
parent
2f8f7cd2a9
commit
b186989177
2 changed files with 19 additions and 1 deletions
12
Bin/logitech.py
Executable file
12
Bin/logitech.py
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/env python2.7
|
||||||
|
|
||||||
|
# dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/devices/battery_BAT0 org.freedesktop.DBus.Properties.Get string:org.freedesktop.UPower.Device string:'Percentage'
|
||||||
|
|
||||||
|
import dbus
|
||||||
|
|
||||||
|
bus = dbus.SystemBus()
|
||||||
|
bat0_object = bus.get_object('org.freedesktop.UPower',
|
||||||
|
'/org/freedesktop/UPower/devices/mouse_hidpp_battery_0')
|
||||||
|
bat0 = dbus.Interface(bat0_object, 'org.freedesktop.DBus.Properties')
|
||||||
|
|
||||||
|
print bat0.Get("org.freedesktop.UPower.Device", "Percentage")
|
|
@ -28,6 +28,7 @@ order += "wifi"
|
||||||
#order += "wireless _first_"
|
#order += "wireless _first_"
|
||||||
order += "ethernet _first_"
|
order += "ethernet _first_"
|
||||||
order += "battery_level"
|
order += "battery_level"
|
||||||
|
order += "external_script logitech_battery_level"
|
||||||
order += "external_script lcd_brightness"
|
order += "external_script lcd_brightness"
|
||||||
#order += "sysdata base"
|
#order += "sysdata base"
|
||||||
#order += "sysdata temp"
|
#order += "sysdata temp"
|
||||||
|
@ -51,6 +52,12 @@ battery_level {
|
||||||
blocks=""
|
blocks=""
|
||||||
format = "{icon} {percent}%"
|
format = "{icon} {percent}%"
|
||||||
}
|
}
|
||||||
|
external_script logitech_battery_level {
|
||||||
|
cache_timeout = 10
|
||||||
|
format = " {output}%"
|
||||||
|
script_path = '~/Bin/logitech.py read 2>/dev/null'
|
||||||
|
}
|
||||||
|
|
||||||
sysdata base{
|
sysdata base{
|
||||||
format = " CPU: {cpu_usage}%, MEM: {mem_used_percent}%"
|
format = " CPU: {cpu_usage}%, MEM: {mem_used_percent}%"
|
||||||
}
|
}
|
||||||
|
@ -139,4 +146,3 @@ static_string screenshot {
|
||||||
format = ""
|
format = ""
|
||||||
on_click 1 = "exec --no-startup-id ~/Bin/screenshooter.sh"
|
on_click 1 = "exec --no-startup-id ~/Bin/screenshooter.sh"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue