This commit is contained in:
2025-03-31 20:41:05 +03:00
parent 5448f42a41
commit a0fd63fb98
6 changed files with 16 additions and 9 deletions

View File

@@ -7,11 +7,13 @@ import { getRegretevatorState } from "../lib/RegretevatorUtil";
async function getFilename(): Promise<string> {
const _d = new Date();
const windowClass = await $`hyprctl activewindow -j`.json();
const isRoblox =
windowClass.initialClass === "org.vinegarhq.Sober" ? true : false;
let ic = windowClass.initialClass || "Hyprland";
const isRoblox = windowClass.initialClass === "org.vinegarhq.Sober";
if (isRoblox) {ic = "Roblox"; };
const regretevatorState = isRoblox ? getRegretevatorState() : null;
if (!!regretevatorState) {ic = "Regretevator";};
// console.log(isRoblox, regretevatorState)
return `${isRoblox ? "Roblox" : (windowClass.initialClass || "Hyprland")}-${_d.getTime()}${
return `${ic}-${_d.getTime()}${
!regretevatorState
? ""
: `-regretevator${
@@ -36,8 +38,8 @@ async function transformImage(b: Buffer): Promise<Buffer> {
const mask = Buffer.from(
`<svg width="${width}" height="${height}">
<rect x="0" y="0" width="${width}" height="${height}" rx="16" fill="white"/>
</svg>`
<rect x="0" y="0" width="${width}" height="${height}" rx="16" fill="white"/>
</svg>`
);
const maskedImage = image

View File

@@ -39,7 +39,7 @@ try {
if (floorNum) {
urlParams = `?floor=${floorNum}`
} else {
urlParams = `?regretevator`
urlParams = ``
}
}