How long a head-tilt showing may last when no head-down arrives: 60 s (the default, as before), 30, 15, 10 s, or never (it then stays until the head comes down or a double-tap). Where the head-down is unlikely, the tap duration still applies when it is shorter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
import { type AppDefinition } from "../app-definition";
|
|
import { GlanceBoard } from "./board";
|
|
import { createGlanceboardAppWindow, GLANCEBOARD_SURFACE_ID, GLANCEBOARD_WINDOW_ID } from "./glanceboard-app";
|
|
import {
|
|
glanceboardEnabledSetting,
|
|
glanceDepth,
|
|
glanceLayout,
|
|
glanceShowOnHeadTiltSetting,
|
|
glanceShowOnLongPressSetting,
|
|
glanceShowOnTap,
|
|
glanceTapTimeoutMs,
|
|
glanceTiltTimeoutMs,
|
|
} from "./glanceboard-settings";
|
|
|
|
const glanceboardApp: AppDefinition = {
|
|
appId: "glanceboard",
|
|
title: "Glanceboard",
|
|
icon: "eye",
|
|
launch: (ctx) => ctx.launchInProcessApp(GLANCEBOARD_WINDOW_ID, GLANCEBOARD_SURFACE_ID, createGlanceboardAppWindow),
|
|
glanceboard: {
|
|
get size() {
|
|
const layout = glanceLayout();
|
|
return { width: layout.width, height: layout.height };
|
|
},
|
|
isEnabled: () => glanceboardEnabledSetting.get(),
|
|
showOnTap: glanceShowOnTap,
|
|
tapTimeoutMs: glanceTapTimeoutMs,
|
|
tiltTimeoutMs: glanceTiltTimeoutMs,
|
|
showOnLongPress: () => glanceShowOnLongPressSetting.get(),
|
|
showOnHeadTilt: () => glanceShowOnHeadTiltSetting.get(),
|
|
depth: glanceDepth,
|
|
createBoard: (requestRender) => new GlanceBoard(requestRender),
|
|
},
|
|
};
|
|
|
|
export default glanceboardApp;
|