fix encoding

This commit is contained in:
2025-06-25 16:51:09 +03:00
parent 8f1299bc1f
commit d2730aada3
2 changed files with 7 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
#!/run/current-system/sw/bin/bun
import { $ } from "bun";
import { execSync } from "child_process";
const birthday = new Date(2009, 7, 16);
const age = Math.floor(
@@ -52,10 +53,10 @@ const debug: boolean = false as false | true;
if (debug === true) {
splashes.forEach(async (a) => {
await $`notify-send "Welcome to Hyprland!" "${a}"`;
execSync(`notify-send "Sveicināti Hyprland!" "${a}"`);
});
} else {
const randomSplash = chooseRandom(splashes);
await $`notify-send "Welcome to Hyprland!" "${randomSplash}"`;
execSync(`notify-send "Sveicināti Hyprland!" "${randomSplash}"`);
}

View File

@@ -5,6 +5,7 @@ import { readdirSync, readFileSync, statSync } from "fs";
import { join } from "path";
import { setConsoleTitle } from "@ocbwoy3/libocbwoy3";
import { UploadToEZ } from "../lib/EZUploader";
import { execSync } from "child_process";
setConsoleTitle("Screenshot Uploader");
@@ -29,9 +30,9 @@ try {
const url = await UploadToEZ(readFileSync(filePath));
$`echo "${url}" | wl-copy -n`.nothrow().catch(a => { });
$`notify-send "Ekrānuzņēmums" "Augšuplādēts e-z.host ${Date.now() - start}ms"`.nothrow().catch(a => { });
execSync(`echo "${url}" | wl-copy -n`);
execSync(`notify-send "Ekrānuzņēmums" "Augšuplādēts e-z.host ${Date.now() - start}ms"`);
} catch (e_) {
$`notify-send "Kļūda" "${`${e_}`}"`.nothrow().catch(a => { });
execSync(`notify-send "Kļūda" "${`${e_}`}"`);
}