This is a projection, not a development branch. The tree above was constructed from the internal source named below under a manifest that decides which paths may leave, then scanned as a whole tree rather than as a series of patches, and only then published. Public history starts here because the history before it was not admissible, and neither was the tree. What used to stand in this repository included a rescue copy of another machine, a directory of phone handoffs, deployment wired to one house, and a submodule pointing at a forge no stranger can reach. None of that was ever the product. It stays in the private forge, which is allowed to hold the whole working organism, and this is what was deliberately sent out instead. Three mechanisms produced this tree, in decreasing order of trust. A top-level path the manifest does not name never arrives at all, which is the one that catches directories nobody has thought of yet. Named internal files inside admitted roots are dropped. A short, reviewed table replaces deployment defaults that a public build must not carry -- an endpoint aimed at one LAN, a VPN profile belonging to one phone, packaging built from one checkout path. Everything after this commit is an ordinary publication with the same three trailers, so a force push stops being routine and starts meaning that something deliberate happened. The trailers bind the projection to its source without pretending the public SHA is the private one: same lineage, different tree, and the record says so. Source-Sha: 8f27b1e76a8fef560a336aba18e6990713ff1047 Policy-Sha: 6b261d2f3e6e1fb19874846ba4bb1dfe15565d25b8618c1c1afba0419c101d27 Tree-Digest: 18ec3563c5e5ef9a414993a9f6734b251ff9ed3cd56eebdd6cac01e45c6e3067
117 lines
No EOL
4.3 KiB
QML
117 lines
No EOL
4.3 KiB
QML
pragma Singleton
|
|
pragma ComponentBehavior: Bound
|
|
|
|
import QtQuick
|
|
import Quickshell
|
|
import Quickshell.Io
|
|
|
|
/**
|
|
* Provides some system info: distro, username.
|
|
*/
|
|
Singleton {
|
|
id: root
|
|
property string distroName: "Unknown"
|
|
property string distroId: "unknown"
|
|
property string distroIcon: "linux-symbolic"
|
|
property string username: "user"
|
|
property string homeUrl: ""
|
|
property string documentationUrl: ""
|
|
property string supportUrl: ""
|
|
property string bugReportUrl: ""
|
|
property string privacyPolicyUrl: ""
|
|
property string logo: ""
|
|
property string desktopEnvironment: ""
|
|
property string windowingSystem: ""
|
|
|
|
Timer {
|
|
triggeredOnStart: true
|
|
interval: 1
|
|
running: true
|
|
repeat: false
|
|
onTriggered: {
|
|
getUsername.running = true
|
|
fileOsRelease.reload()
|
|
const textOsRelease = fileOsRelease.text()
|
|
|
|
// Extract the friendly name (PRETTY_NAME field, fallback to NAME)
|
|
const prettyNameMatch = textOsRelease.match(/^PRETTY_NAME="(.+?)"/m)
|
|
const nameMatch = textOsRelease.match(/^NAME="(.+?)"/m)
|
|
distroName = prettyNameMatch ? prettyNameMatch[1] : (nameMatch ? nameMatch[1].replace(/Linux/i, "").trim() : "Unknown")
|
|
|
|
// Extract the ID
|
|
const idMatch = textOsRelease.match(/^ID="?(.+?)"?$/m)
|
|
distroId = idMatch ? idMatch[1] : "unknown"
|
|
|
|
// Extract additional URLs and logo
|
|
const homeUrlMatch = textOsRelease.match(/^HOME_URL="(.+?)"/m)
|
|
homeUrl = homeUrlMatch ? homeUrlMatch[1] : ""
|
|
const documentationUrlMatch = textOsRelease.match(/^DOCUMENTATION_URL="(.+?)"/m)
|
|
documentationUrl = documentationUrlMatch ? documentationUrlMatch[1] : ""
|
|
const supportUrlMatch = textOsRelease.match(/^SUPPORT_URL="(.+?)"/m)
|
|
supportUrl = supportUrlMatch ? supportUrlMatch[1] : ""
|
|
const bugReportUrlMatch = textOsRelease.match(/^BUG_REPORT_URL="(.+?)"/m)
|
|
bugReportUrl = bugReportUrlMatch ? bugReportUrlMatch[1] : ""
|
|
const privacyPolicyUrlMatch = textOsRelease.match(/^PRIVACY_POLICY_URL="(.+?)"/m)
|
|
privacyPolicyUrl = privacyPolicyUrlMatch ? privacyPolicyUrlMatch[1] : ""
|
|
const logoFieldMatch = textOsRelease.match(/^LOGO="?(.+?)"?$/m)
|
|
logo = logoFieldMatch ? logoFieldMatch[1] : ""
|
|
|
|
// Update the distroIcon property based on distroId
|
|
switch (distroId) {
|
|
case "artix":
|
|
case "arch": distroIcon = "arch-symbolic"; break;
|
|
case "endeavouros": distroIcon = "endeavouros-symbolic"; break;
|
|
case "cachyos": distroIcon = "cachyos-symbolic"; break;
|
|
case "nixos": distroIcon = "nixos-symbolic"; break;
|
|
case "fedora": distroIcon = "fedora-symbolic"; break;
|
|
case "linuxmint":
|
|
case "ubuntu":
|
|
case "zorin":
|
|
case "popos": distroIcon = "ubuntu-symbolic"; break;
|
|
case "debian":
|
|
case "raspbian":
|
|
case "kali": distroIcon = "debian-symbolic"; break;
|
|
case "funtoo":
|
|
case "gentoo": distroIcon = "gentoo-symbolic"; break;
|
|
default: distroIcon = "linux-symbolic"; break;
|
|
}
|
|
if (textOsRelease.toLowerCase().includes("nyarch")) {
|
|
distroIcon = "nyarch-symbolic"
|
|
}
|
|
|
|
if (logo.trim().length === 0) {
|
|
logo = distroIcon
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
Process {
|
|
id: getUsername
|
|
command: ["whoami"]
|
|
stdout: SplitParser {
|
|
onRead: data => {
|
|
root.username = data.trim()
|
|
}
|
|
}
|
|
}
|
|
|
|
Process {
|
|
id: getDesktopEnvironment
|
|
running: true
|
|
command: ["bash", "-c", "echo $XDG_CURRENT_DESKTOP,$WAYLAND_DISPLAY"]
|
|
stdout: StdioCollector {
|
|
id: deCollector
|
|
onStreamFinished: {
|
|
const [desktop, wayland] = deCollector.text.split(",")
|
|
root.desktopEnvironment = desktop.trim()
|
|
root.windowingSystem = wayland.trim().length > 0 ? "Wayland" : "X11" // Are there others? 🤔
|
|
}
|
|
}
|
|
}
|
|
|
|
FileView {
|
|
id: fileOsRelease
|
|
path: "/etc/os-release"
|
|
}
|
|
} |