Skip to content

armgit / Handy

Public Imported from GitHub
0

A free, open source, and extensible speech-to-text application that works completely offline.

bindings from macos

CJ Pais6ad588cba090
diff --git a/src/bindings.ts b/src/bindings.ts
index da194036..f8a259ff 100644
--- a/src/bindings.ts
+++ b/src/bindings.ts
@@ -732,8 +732,10 @@ async updateRecordingRetentionPeriod(period: string) : Promise<Result<null, stri
}
},
/**
- * Stub implementation for non-macOS platforms
- * Always returns false since laptop detection is macOS-specific
+ * Checks if the Mac is a laptop by detecting battery presence
+ *
+ * This uses pmset to check for battery information.
+ * Returns true if a battery is detected (laptop), false otherwise (desktop)
*/
async isLaptop() : Promise<Result<boolean, string>> {
try {