-
Notifications
You must be signed in to change notification settings - Fork 188
Restart reminder
enkore edited this page Nov 17, 2013
·
1 revision
Reminds you to reboot after you upgraded your kernel. With Arch Linux old kernels aren't kept after an upgrade.
import os
import os.path
from i3pystatus import Status, IntervalModule
class RestartReminder(IntervalModule):
settings = required = ()
def run(self):
if os.path.exists("/lib/modules/" + os.uname().release):
self.output = None
else:
self.output = {
"full_text": "Reboot required!",
"color": "#FF0000",
}
#status = Status(standalone=True)
# ...
status.register(RestartReminder())