diff --git a/scripts/bin/betterSplash.ts b/scripts/bin/betterSplash.ts index 78f2a78..9fee3d2 100644 --- a/scripts/bin/betterSplash.ts +++ b/scripts/bin/betterSplash.ts @@ -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}"`); } diff --git a/scripts/bin/r2Upload.ts b/scripts/bin/r2Upload.ts index 4f30b5a..99a4ee0 100644 --- a/scripts/bin/r2Upload.ts +++ b/scripts/bin/r2Upload.ts @@ -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_}`}"`); }