pretty
This commit is contained in:
@@ -48,24 +48,29 @@ import { getRegretevatorState } from "../lib/RegretevatorUtil";
|
||||
|
||||
*/
|
||||
|
||||
const windowClassFriendyName: {[windowClass: string]: string} = {
|
||||
"steam_app_1671210": "Deltarune",
|
||||
const windowClassFriendyName: { [windowClass: string]: string } = {
|
||||
steam_app_1671210: "Deltarune",
|
||||
"org.vinegarhq.Sober": "Roblox",
|
||||
"steam_app_1690940": "Deltarune", // demo
|
||||
}
|
||||
steam_app_1690940: "Deltarune", // demo
|
||||
};
|
||||
|
||||
async function getWMClass(): Promise<string> {
|
||||
const windowClass = await $`hyprctl activewindow -j`.json();
|
||||
return windowClass.initialClass
|
||||
return windowClass.initialClass;
|
||||
}
|
||||
|
||||
async function getFilename(wmClass?: string): Promise<string> {
|
||||
const _d = new Date();
|
||||
let ic = (wmClass && windowClassFriendyName[wmClass]) || wmClass || "Hyprland";
|
||||
let ic =
|
||||
(wmClass && windowClassFriendyName[wmClass]) || wmClass || "Hyprland";
|
||||
const isRoblox = wmClass === "org.vinegarhq.Sober";
|
||||
if (isRoblox) {ic = "Roblox"; };
|
||||
if (isRoblox) {
|
||||
ic = "Roblox";
|
||||
}
|
||||
const regretevatorState = isRoblox ? getRegretevatorState() : null;
|
||||
if (!!regretevatorState) {ic = "Regretevator";};
|
||||
if (!!regretevatorState) {
|
||||
ic = "Regretevator";
|
||||
}
|
||||
// console.log(isRoblox, regretevatorState)
|
||||
return `${ic}-${_d.getTime()}${
|
||||
!regretevatorState
|
||||
@@ -74,7 +79,7 @@ async function getFilename(wmClass?: string): Promise<string> {
|
||||
regretevatorState.state === "INGAME"
|
||||
? `-${regretevatorState.floor}`
|
||||
: ""
|
||||
}`
|
||||
}`
|
||||
}`;
|
||||
}
|
||||
|
||||
@@ -115,7 +120,7 @@ async function transformImage(b: Buffer): Promise<Buffer> {
|
||||
|
||||
return (await maskedImage.png().toBuffer()) as Buffer;
|
||||
*/
|
||||
return b
|
||||
return b;
|
||||
}
|
||||
|
||||
(() => {
|
||||
|
||||
Reference in New Issue
Block a user