mirror of
https://github.com/slgobinath/SafeEyes.git
synced 2025-01-14 02:15:56 +01:00
Add info log to dnd plugin
This commit is contained in:
parent
90243ecd80
commit
8188c1824b
@ -37,6 +37,7 @@ take_break_window_classes = []
|
|||||||
unfullscreen_allowed = True
|
unfullscreen_allowed = True
|
||||||
dnd_while_on_battery = False
|
dnd_while_on_battery = False
|
||||||
|
|
||||||
|
|
||||||
def is_active_window_skipped(pre_break):
|
def is_active_window_skipped(pre_break):
|
||||||
"""
|
"""
|
||||||
Check for full-screen applications.
|
Check for full-screen applications.
|
||||||
@ -84,6 +85,8 @@ def is_on_battery():
|
|||||||
"""
|
"""
|
||||||
charging = True
|
charging = True
|
||||||
available_power_sources = os.listdir('/sys/class/power_supply')
|
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:
|
for power_source in available_power_sources:
|
||||||
if 'BAT' in power_source:
|
if 'BAT' in power_source:
|
||||||
# Found battery
|
# Found battery
|
||||||
|
Loading…
Reference in New Issue
Block a user