#!/bin/kuroko import kuroko import os import fileio import time time.sleep(2) try: let meminfo = {} let data with fileio.open('/proc/meminfo','r') as f: data = f.readlines() for line in data: if not ':' in line: continue let bits = line.strip().split(':',1) meminfo[bits[0].strip()] = bits[1].strip() if 'MemTotal' in meminfo: let kB = int(meminfo['MemTotal'].replace('kB','')) if kB < 1000000: let sock = os.open("/dev/pex/toast",os.O_WRONLY) let msg = '{"icon":"/usr/share/icons/48/help.png","body":"Low System Memory
At least 1GiB of RAM is
recommended for the Live CD.
' + str(kB//1024) + 'MiB was detected."}' os.write(sock,msg.encode()) try: let manifest with fileio.open('/var/msk/manifest','r') as f: manifest = f.readlines() let count = 0 for line in manifest: if line.startswith('['): count++ if count: let sock = os.open("/dev/pex/toast",os.O_WRONLY) let msg = '{"icon":"/usr/share/icons/48/package.png","body":"Packages Available
' + str(count) + ' package' + ('s' if count > 1 else '') + ' are available from
the package repository."}' os.write(sock,msg.encode()) return 0