fix encoding
This commit is contained in:
@@ -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}"`);
|
||||
}
|
||||
|
||||
@@ -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_}`}"`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user