@ryan_nookpi/pi-extension-idle-screensaver 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.ts +3 -3
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -67,7 +67,7 @@ async function showScreensaver(): Promise<void> {
|
|
|
67
67
|
|
|
68
68
|
await latestCtx.ui.custom(
|
|
69
69
|
(tui: ScreensaverTui, theme: ScreensaverTheme, _kb: unknown, done: (v: undefined) => void) => ({
|
|
70
|
-
render: (w: number) => renderScreensaver(w,
|
|
70
|
+
render: (w: number) => renderScreensaver(w, tui.terminal?.rows ?? 40, title, theme),
|
|
71
71
|
handleInput: (_data: string) => {
|
|
72
72
|
done(undefined);
|
|
73
73
|
},
|
|
@@ -117,7 +117,7 @@ function renderScreensaver(width: number, height: number, title: string, theme:
|
|
|
117
117
|
const separatorWidth = Math.min(innerWidth - 4, Math.max(visibleWidth(titleText) + 8, 24));
|
|
118
118
|
const separator = bc("─".repeat(Math.max(1, separatorWidth)));
|
|
119
119
|
const topSeparatorLine = centerLine(separator);
|
|
120
|
-
const titleLine = centerLine(theme.fg("accent", titleText)
|
|
120
|
+
const titleLine = centerLine(theme.fg("accent", titleText));
|
|
121
121
|
const bottomSeparatorLine = centerLine(separator);
|
|
122
122
|
|
|
123
123
|
// ── Layout ───────────────────────────────────────────────────
|
|
@@ -145,7 +145,7 @@ function renderScreensaver(width: number, height: number, title: string, theme:
|
|
|
145
145
|
|
|
146
146
|
// 5. Footer hint
|
|
147
147
|
if (lines.length === height - 2) {
|
|
148
|
-
lines.push(centerLine(theme.fg("dim", "Press any key to dismiss")
|
|
148
|
+
lines.push(centerLine(theme.fg("dim", "Press any key to dismiss")));
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
// 6. Bottom border
|