-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
24 lines (20 loc) · 971 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import liboxide
print("Applications:")
for name, app in liboxide.apps.applications.items():
print(f" {name}: {app.bin}")
print(f"Running: {', '.join(list(liboxide.apps.runningApplications.keys()))}")
print(f"Paused: {', '.join(list(liboxide.apps.pausedApplications.keys()))}")
print(f"Previous: {', '.join(liboxide.apps.previousApplications)}")
print("Notifications:")
for notification in liboxide.notification.allNotifications:
app = liboxide.apps.getApplication(notification.application)
print(f" {notification.identifier} owned by {app.displayName}")
path = liboxide.settings.get("apps", "lockscreenApplication")
app = liboxide.Application(path)
print(f"Lockscreen App: {app.displayName}")
autoLock = liboxide.settings.get("autoLock")
print(f"Automatic lock: {autoLock} minutes")
print(f"Battery level: {liboxide.power.batteryLevel}")
while True:
batteryLevel = liboxide.power.on.batteryLevelChanged()
print(f"Battery level: {batteryLevel}")