Maingron / MainOS

MainOS (Maingron OS) is a web-based Operating System
https://maingron.itch.io/mainos
9 stars 3 forks source link

System Variable #60

Open Maingron opened 1 year ago

Maingron commented 1 year ago

During showering, I came up with the following idea regarding a system variable, which will, in theory, solve many problems and combine stuff.

Quickly writing down part of a possible system variable reveals the following concept*: Mainos system{} variable

{
IsVM: false,
user: users[x],
currentUser: users[x],
users: {
  user[0]: {
    programs: {
      ...
    },
    name: "sysacc",
    themecolor: "...",
    language: system.hostOS.languages[0],
    prefersdarkmode: system.hostOS.prefersdarkmode
  },
  user[1]: {
    // Inherit from sysacc unless setting is overridden
  },
  hostOS: {
    languages: Navigator.languages,
    Prefersdarkmode: Navigator.prefersdarkmode,
    operatingSystem: getOSfromBrowserString(),
    browserUsed: getBrowserfromBrowserString()
  },
    time: ...,
  deviceCaps: {
    hasKeyboard: ...,
    hasTouch: ...,
    hasBattery: ...,
  }
}