forked from Blendman974/faceclaw
Add screen-recording option
This commit is contained in:
1 parent
4c946631e0
commit
b738ce4bb2
12 files changed
+644
-99
No files matched your search
@@ -49,8 +49,8 @@ type ConfigSettingOptions<TValue, TId extends string> = {
|
||||
|
||||
// Fired after any setting changes, in any isolate (storage lives in the Java
|
||||
// FaceclawSettings store and broadcasts to every isolate). Lets phone-side UI
|
||||
// that depends on settings toggled from the glasses (e.g. the raw-screenshot
|
||||
// button) update without waiting for an unrelated snapshot emit. Delivery is
|
||||
// that depends on settings toggled from the glasses (e.g. the text-setting
|
||||
// editor) update without waiting for an unrelated snapshot emit. Delivery is
|
||||
// asynchronous: one message-loop tick after the set().
|
||||
const settingChangeListeners = new Set<() => void>();
|
||||
|
||||
@@ -263,14 +263,6 @@ export const voiceControlEnabledSetting = new ConfigSettingBoolean({
|
||||
description: "Master switch for voice features, including wakeword detection and voice input.",
|
||||
});
|
||||
|
||||
export const rawScreenshotsEnabledSetting = new ConfigSettingBoolean({
|
||||
id: "raw-screenshots-enabled",
|
||||
label: "Take raw screenshots",
|
||||
storageKey: "developer.rawScreenshots",
|
||||
defaultValue: false,
|
||||
description: "Show a button in the phone app that captures the exact frame data being sent to the glasses.",
|
||||
});
|
||||
|
||||
export const firmwareDebugFlagsSetting = new ConfigSettingBoolean({
|
||||
id: "firmware-debug-flags",
|
||||
label: "Firmware debug flags",
|
||||
@@ -438,6 +430,15 @@ export const terminalLaunchPresetsSetting = new ConfigSettingString({
|
||||
"Comma-separated names of g2mirror launch presets that can be started from the glasses. Presets are defined in the server's config; the wire protocol has no way to list them, so name them here. The default server config defines \"shell\".",
|
||||
});
|
||||
|
||||
export const terminalWakeOnBellSetting = new ConfigSettingBoolean({
|
||||
id: "terminal-wake-on-bell",
|
||||
label: "Wake glasses on terminal bell",
|
||||
storageKey: "terminal.wakeOnBell",
|
||||
defaultValue: false,
|
||||
description:
|
||||
"When a terminal rings its bell while the glasses are asleep, wake them and focus that terminal's window (or the terminals list if it has no window open).",
|
||||
});
|
||||
|
||||
export const nightscoutSiteUrlSetting = new ConfigSettingString({
|
||||
id: "nightscout-site-url",
|
||||
label: "Nightscout site URL",
|
||||
|
||||
@@ -13,13 +13,13 @@ import {
|
||||
openAiApiKeySetting,
|
||||
enumSettingMenuItem,
|
||||
firmwareDebugFlagsSetting,
|
||||
rawScreenshotsEnabledSetting,
|
||||
saveVoiceRecordingsSetting,
|
||||
suspendEvenHubWhenScreenOffSetting,
|
||||
terminalAuthTokenSetting,
|
||||
terminalHostSetting,
|
||||
terminalLaunchPresetsSetting,
|
||||
terminalPortSetting,
|
||||
terminalWakeOnBellSetting,
|
||||
textSettingMenuItem,
|
||||
timeFormatSetting,
|
||||
toggleSettingMenuItem,
|
||||
@@ -83,12 +83,12 @@ function settingsSections(): SettingsSection[] {
|
||||
textSettingMenuItem(terminalPortSetting),
|
||||
textSettingMenuItem(terminalAuthTokenSetting),
|
||||
textSettingMenuItem(terminalLaunchPresetsSetting),
|
||||
toggleSettingMenuItem(terminalWakeOnBellSetting),
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Developer",
|
||||
items: [
|
||||
toggleSettingMenuItem(rawScreenshotsEnabledSetting),
|
||||
toggleSettingMenuItem(saveVoiceRecordingsSetting),
|
||||
toggleSettingMenuItem(firmwareDebugFlagsSetting),
|
||||
toggleSettingMenuItem(suspendEvenHubWhenScreenOffSetting),
|
||||
|
||||
@@ -28,6 +28,15 @@ export type WorkerAppReply =
|
||||
type: "focus-window";
|
||||
windowId: string;
|
||||
}
|
||||
| {
|
||||
/**
|
||||
* Wake the glasses and focus one of the app's windows (e.g. a terminal
|
||||
* bell with wake-on-bell enabled). Ignored unless the screen is off, so
|
||||
* it can never steal focus from an in-use screen.
|
||||
*/
|
||||
type: "wake-window";
|
||||
windowId: string;
|
||||
}
|
||||
| {
|
||||
/** App-initiated window (e.g. a terminal view opened from the hub list). */
|
||||
type: "open-window-request";
|
||||
@@ -149,6 +158,14 @@ export class WorkerAppHost {
|
||||
this.options.requestShellRender();
|
||||
}
|
||||
break;
|
||||
case "wake-window":
|
||||
if (this.openWindows.has(message.windowId) && !shell.isScreenOn()) {
|
||||
// Focus first so wake's foreground-window refresh hits the target.
|
||||
shell.focusWindow(message.windowId);
|
||||
shell.wake("window");
|
||||
this.options.requestShellRender();
|
||||
}
|
||||
break;
|
||||
case "open-window-request":
|
||||
this.openWindow({
|
||||
windowId: message.windowId,
|
||||
|
||||
Reference in new issue
Block a user