Begin work on configuration menu

This commit is contained in:
Jas Singh
2024-07-14 18:44:49 -07:00
parent 7a2fdf8647
commit abe491e6d0
8 changed files with 673 additions and 7 deletions

16
lib/variables.ts Normal file
View File

@@ -0,0 +1,16 @@
import GLib from "gi://GLib"
export const clock = Variable(GLib.DateTime.new_now_local(), {
poll: [1000, () => GLib.DateTime.new_now_local()],
})
export const uptime = Variable(0, {
poll: [60_000, "cat /proc/uptime", line =>
Number.parseInt(line.split(".")[0]) / 60,
],
})
export const distro = {
id: GLib.get_os_info("ID"),
logo: GLib.get_os_info("LOGO"),
}