summary refs log tree commit diff
path: root/screen/home.ts
diff options
context:
space:
mode:
Diffstat (limited to 'screen/home.ts')
-rw-r--r--screen/home.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/screen/home.ts b/screen/home.ts
index c6f6c19..296fec2 100644
--- a/screen/home.ts
+++ b/screen/home.ts
@@ -3,6 +3,14 @@ import { Screen } from "../screen.ts";
 import type { Input, Text } from "../elements.ts";
 import process from "node:process";
 
+function changeTitle(title: string) {
+    if (process.platform == 'win32') {
+        process.title = title;
+    } else {
+        process.stdout.write(`\x1b]2;${title}\x1b\x5c`);
+    }
+}
+
 export default {
     elements: [
         {
@@ -49,5 +57,6 @@ export default {
     onload (screen: Screen) {
         screen.client.setScreen(screen)
         screen.client.loadHome(screen)
+        changeTitle(`maelink - home`)
     }
 }
\ No newline at end of file