Harden Panama launcher actions

This commit is contained in:
Gabriel Brown
2026-08-18 07:31:11 -04:00
parent b28edcd01f
commit ca64d4b9b6
11 changed files with 239 additions and 40 deletions
+22 -3
View File
@@ -114,7 +114,10 @@ ShellRoot {
IpcHandler {
target: "focus"
function start(): void { FocusSession.startDefault(); }
function start(): bool {
FocusSession.startDefault();
return FocusSession.active;
}
function reveal(): void { FocusSession.reveal(); }
function dismiss(): void { FocusSession.dismiss(); }
function pause(): void { FocusSession.pauseOrResume(); }
@@ -123,7 +126,12 @@ ShellRoot {
ShellState.openOverview(FocusSession.workspaceId);
FocusSession.dismiss();
}
function end(): void { FocusSession.end(false); }
function end(): bool {
if (!FocusSession.active)
return false;
FocusSession.end(false);
return !FocusSession.active;
}
function status(): string {
return JSON.stringify({
active: FocusSession.active,
@@ -272,10 +280,21 @@ ShellRoot {
IpcHandler {
target: "night-light"
function toggle(): bool {
NightLight.toggle();
NightLight.toggleQuietly();
return NightLight.active;
}
function status(): bool { return NightLight.active; }
function settings(): string {
return JSON.stringify({
enabled: NightLight.enabled,
automatic: NightLight.automatic,
active: NightLight.active
});
}
function restore(enabled: bool, automatic: bool): bool {
NightLight.restore(enabled, automatic);
return NightLight.active;
}
}
IpcHandler {