publish: the public projection begins here
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
This commit is contained in:
commit
8f42fc953d
1476 changed files with 238455 additions and 0 deletions
95
surfaces/quickshell/services/Idle.qml
Normal file
95
surfaces/quickshell/services/Idle.qml
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
pragma Singleton
|
||||
import qs.modules.common
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Wayland
|
||||
|
||||
/**
|
||||
* A nice wrapper for date and time strings.
|
||||
*/
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
property alias inhibit: idleInhibitor.enabled
|
||||
inhibit: false
|
||||
|
||||
// ii-stock consumers (IdleInhibitorToggle.qml) read Idle.autoIdleInhibit to
|
||||
// label the "Keep awake" toggle. Souveraine's idle path routes through
|
||||
// hypridle, not a Wayland idle-inhibitor, so there's no separate "auto"
|
||||
// mode — but the stock toggle expects the property to exist. Expose it as
|
||||
// a plain bool so the toggle binds cleanly instead of throwing
|
||||
// [undefined] -> bool at startup.
|
||||
property bool autoIdleInhibit: false
|
||||
|
||||
// Pixel 3: the Wayland idle-inhibitor on an invisible 0x0 surface is
|
||||
// not honored by our compositor build, and screen-off is driven by
|
||||
// hypridle scripts anyway — so Keep System Awake stops/starts hypridle.
|
||||
onInhibitChanged: {
|
||||
// Keep System Awake toggles the systemd-managed hypridle unit.
|
||||
// (Was pkill/setsid, which orphaned hypridle across Hyprland restarts
|
||||
// and wedged wake — see hyprland.lua hyprland.start.)
|
||||
//
|
||||
// Runs through a Process, not execDetached, because this is the
|
||||
// mechanism that decides whether the phone sleeps: if the unit fails
|
||||
// to come back we need to know, not discover it via a flat battery.
|
||||
// reset-failed is expected to be a no-op when the unit is healthy, so
|
||||
// its failure is not interesting — but the restart's is, so the two
|
||||
// are separated rather than hidden behind one silencing redirect.
|
||||
hypridleProc.action = root.inhibit ? "stop" : "restart";
|
||||
hypridleProc.command = ["sh", "-c", root.inhibit
|
||||
? "systemctl --user stop hypridle.service"
|
||||
: "systemctl --user reset-failed hypridle.service || true; systemctl --user restart hypridle.service"];
|
||||
hypridleProc.running = true;
|
||||
}
|
||||
|
||||
Process {
|
||||
id: hypridleProc
|
||||
property string action: ""
|
||||
onExited: (exitCode, exitStatus) => {
|
||||
if (exitCode !== 0)
|
||||
console.log(`[idle] hypridle ${hypridleProc.action} failed (exit ${exitCode}); `
|
||||
+ `idle handling may be wedged — inhibit=${root.inhibit}`);
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: Persistent
|
||||
function onReadyChanged() {
|
||||
if (!Persistent.isNewHyprlandInstance) {
|
||||
root.inhibit = Persistent.states.idle.inhibit;
|
||||
} else {
|
||||
Persistent.states.idle.inhibit = root.inhibit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function toggleInhibit(active = null) {
|
||||
if (active !== null) {
|
||||
root.inhibit = active;
|
||||
} else {
|
||||
root.inhibit = !root.inhibit;
|
||||
}
|
||||
Persistent.states.idle.inhibit = root.inhibit;
|
||||
}
|
||||
|
||||
IdleInhibitor {
|
||||
id: idleInhibitor
|
||||
window: PanelWindow {
|
||||
// Inhibitor requires a "visible" surface
|
||||
// Actually not lol
|
||||
implicitWidth: 0
|
||||
implicitHeight: 0
|
||||
color: "transparent"
|
||||
// Just in case...
|
||||
anchors {
|
||||
right: true
|
||||
bottom: true
|
||||
}
|
||||
// Make it not interactable
|
||||
mask: Region {
|
||||
item: null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue