chaotic nyxos
This commit is contained in:
@@ -48,10 +48,15 @@ import { getRegretevatorState } from "../lib/RegretevatorUtil";
|
||||
|
||||
*/
|
||||
|
||||
const windowcClassFriendyName: {[windowClass: string]: string} = {
|
||||
"org.vinegarhq.Sober": "Roblox",
|
||||
"steam_app_1690940": "Deltarune"
|
||||
}
|
||||
|
||||
async function getFilename(): Promise<string> {
|
||||
const _d = new Date();
|
||||
const windowClass = await $`hyprctl activewindow -j`.json();
|
||||
let ic = windowClass.initialClass || "Hyprland";
|
||||
let ic = (windowClass.initialClass && windowcClassFriendyName[windowClass.initialClass]) || windowClass.windowClass || "Hyprland";
|
||||
const isRoblox = windowClass.initialClass === "org.vinegarhq.Sober";
|
||||
if (isRoblox) {ic = "Roblox"; };
|
||||
const regretevatorState = isRoblox ? getRegretevatorState() : null;
|
||||
@@ -123,7 +128,7 @@ async function transformImage(b: Buffer): Promise<Buffer> {
|
||||
console.log("/tmp/woah");
|
||||
process.exit(0);
|
||||
}
|
||||
const _BUF = await $`grim -t png -l 0 -g ${selection.stdout
|
||||
const _BUF = await $`grim -c -t png -l 0 -g ${selection.stdout
|
||||
.toString()
|
||||
.trim()} -`.arrayBuffer();
|
||||
let BUF = Buffer.from(_BUF) as Buffer;
|
||||
@@ -147,7 +152,7 @@ async function transformImage(b: Buffer): Promise<Buffer> {
|
||||
.text();
|
||||
|
||||
const _BUF =
|
||||
await $`grim -t png -l 0 -o ${selection.trim()} -`.arrayBuffer();
|
||||
await $`grim -c -t png -l 0 -o ${selection.trim()} -`.arrayBuffer();
|
||||
let BUF = Buffer.from(_BUF) as Buffer;
|
||||
|
||||
const FILENAME = `${SCREENSHOT_PATH}/${await getFilename()}.png`;
|
||||
|
||||
Reference in New Issue
Block a user