forked from Blendman974/faceclaw
Add Wear OS companion app and remote controls
Add a Wearable Data Layer bridge for syncing dashboard state and commands. Introduce a standalone watch app with assistant, app launcher, touchpad remote, settings, and connectivity UI.
This commit is contained in:
85 files changed
+5813
-102
No files matched your search
@@ -27,6 +27,7 @@ import {
|
||||
assistantSkipConfirmationSetting,
|
||||
batteryDisplayModeSetting,
|
||||
brightnessSetting,
|
||||
displayModeSetting,
|
||||
elevenLabsApiKeySetting,
|
||||
mapboxApiKeySetting,
|
||||
openAiApiKeySetting,
|
||||
@@ -48,7 +49,12 @@ import {
|
||||
voiceProviderSetting,
|
||||
screenTimeoutSetting,
|
||||
wakeWordActionSetting,
|
||||
watchCanUnlockSetting,
|
||||
watchMirrorAssistantSetting,
|
||||
watchRemoteEnabledSetting,
|
||||
watchWakesDisplaySetting,
|
||||
} from "../dashboard-settings";
|
||||
import { wearBridge } from "../../native/wear-bridge";
|
||||
import { SettingsPanelLayer, type SettingsSection } from "./settings-panel";
|
||||
import { terminalFontPickerMenuItem, uiFontPickerMenuItem } from "../font-picker";
|
||||
|
||||
@@ -74,6 +80,8 @@ function settingsSections(): SettingsSection[] {
|
||||
// Where min-height windows (and the sidebar) sit vertically on the
|
||||
// screen; the dashboard controller repositions surfaces on change.
|
||||
enumSettingMenuItem(verticalPositionSetting),
|
||||
// Band / tall / full-panel; the dashboard controller reflows windows.
|
||||
enumSettingMenuItem(displayModeSetting),
|
||||
// Controls the top-bar battery indicators (icon vs percentage).
|
||||
enumSettingMenuItem(batteryDisplayModeSetting),
|
||||
// Controls the top-bar clock (24-hour vs 12-hour).
|
||||
@@ -133,6 +141,18 @@ function settingsSections(): SettingsSection[] {
|
||||
textSettingMenuItem(roamApiTokenSetting),
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Watch",
|
||||
// Wear OS remote (wear/); the status line above the items says whether
|
||||
// a watch running the companion app is currently reachable.
|
||||
items: [
|
||||
toggleSettingMenuItem(watchRemoteEnabledSetting),
|
||||
toggleSettingMenuItem(watchWakesDisplaySetting),
|
||||
toggleSettingMenuItem(watchCanUnlockSetting),
|
||||
toggleSettingMenuItem(watchMirrorAssistantSetting),
|
||||
],
|
||||
renderDetail: renderWatchStatus,
|
||||
},
|
||||
{
|
||||
label: "Developer",
|
||||
items: [
|
||||
@@ -260,6 +280,25 @@ function readBundledDoc(fileName: string): string {
|
||||
}
|
||||
}
|
||||
|
||||
function renderWatchStatus(args: { image: GrayImage; x: number; y: number; width: number }): number {
|
||||
const { image, x, y, width } = args;
|
||||
const font = getDefaultSmallFont();
|
||||
let status: string;
|
||||
if (!wearBridge.isAvailable()) {
|
||||
status = "Google Play services is unavailable on this phone, so no watch can connect.";
|
||||
} else {
|
||||
const connection = wearBridge.getWatchConnection();
|
||||
status = connection.reachable
|
||||
? `Connected to ${connection.watchName || "a watch"}.`
|
||||
: "No watch connected. Install the Faceclaw watch app (wear/ in the source tree) on a Wear OS watch paired with this phone.";
|
||||
}
|
||||
const lines = wrapText(font, status, width);
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
image.drawText(font, x, y + i * font.lineHeight, lines[i]!, 170);
|
||||
}
|
||||
return lines.length * font.lineHeight + 10;
|
||||
}
|
||||
|
||||
function renderAbout(args: { image: GrayImage; x: number; y: number; width: number }): number {
|
||||
const { image, x, y, width } = args;
|
||||
const font = getDefaultSmallFont();
|
||||
|
||||
Reference in new issue
Block a user