From 0f3b7d3ed47d10058507b608c13747e75b190e7f Mon Sep 17 00:00:00 2001 From: Mephisto <38382271+NotMephisto@users.noreply.github.com> Date: Mon, 16 Jun 2025 19:35:10 +0300 Subject: [PATCH] Add Decoder for Uint8Array --- ags/scripts/utils.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ags/scripts/utils.ts b/ags/scripts/utils.ts index 1204f17..4a847a4 100644 --- a/ags/scripts/utils.ts +++ b/ags/scripts/utils.ts @@ -1,5 +1,9 @@ import { exec, execAsync, Gio, GLib } from "astal"; +export function getDecoded(text: (Uint8Array)): string { + const decoder = new TextDecoder('utf-8'); + return decoder.decode(text); +} export function getHyprlandInstanceSig(): (string|null) { return GLib.getenv("HYPRLAND_INSTANCE_SIGNATURE");