Add info log to dnd plugin

This commit is contained in:
Gobinath 2018-06-23 07:38:13 -04:00
parent 90243ecd80
commit 8188c1824b
1 changed files with 3 additions and 0 deletions

View File

@ -37,6 +37,7 @@ take_break_window_classes = []
unfullscreen_allowed = True
dnd_while_on_battery = False
def is_active_window_skipped(pre_break):
"""
Check for full-screen applications.
@ -84,6 +85,8 @@ def is_on_battery():
"""
charging = True
available_power_sources = os.listdir('/sys/class/power_supply')
logging.info('Looking for battery status in available power sources: %s' % str(
available_power_sources))
for power_source in available_power_sources:
if 'BAT' in power_source:
# Found battery