update hyprland and add screencopy permissions
This commit is contained in:
31
scripts/bin/betterSplash.ts
Normal file
31
scripts/bin/betterSplash.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/run/current-system/sw/bin/bun
|
||||
|
||||
import { $ } from "bun";
|
||||
|
||||
const splashes = [
|
||||
|
||||
"not ben shaped pear-o",
|
||||
|
||||
"\"I use Nix, btw!\" - OCbwoy3",
|
||||
"I use Nix, btw!",
|
||||
"Nix beats arch",
|
||||
|
||||
"You like kissing boys, don't you?",
|
||||
|
||||
"Now with gay furries :3",
|
||||
"Now with femboys :3",
|
||||
|
||||
];
|
||||
|
||||
const debug: boolean = false as false | true;
|
||||
|
||||
if (debug === true) {
|
||||
splashes.forEach(async(a)=>{
|
||||
await $`notify-send "Welcome to... your PC?" "${a}"`;
|
||||
})
|
||||
} else {
|
||||
const randomSplash = splashes[Math.floor(Math.random() * splashes.length)];
|
||||
|
||||
await $`notify-send "Welcome to... your PC?" "${randomSplash}"`;
|
||||
}
|
||||
|
||||
89
scripts/bin/patchInternalRobloxStudio.ts
Normal file
89
scripts/bin/patchInternalRobloxStudio.ts
Normal file
@@ -0,0 +1,89 @@
|
||||
import { promises as fs } from "fs";
|
||||
import * as path from "path";
|
||||
import * as os from "os";
|
||||
|
||||
const SIGNATURE = Buffer.from([
|
||||
0x48, 0x81, 0xEC, 0x40, 0x03, 0x00, 0x00, 0x84, 0xD2, 0x74, 0x05, 0xE8
|
||||
]);
|
||||
|
||||
const PATCH = Buffer.from([
|
||||
0x48, 0x81, 0xEC, 0x40, 0x03, 0x00, 0x00, 0x84, 0xD2, 0x90, 0x90, 0xE8
|
||||
]);
|
||||
|
||||
const baseDir = path.join(
|
||||
os.homedir(),
|
||||
".var/app/org.vinegarhq.Vinegar/data/vinegar/versions"
|
||||
);
|
||||
|
||||
function findSignature(buffer: Buffer, signature: Buffer): number {
|
||||
const sigLen = signature.length;
|
||||
for (let i = 0; i <= buffer.length - sigLen; i++) {
|
||||
let match = true;
|
||||
for (let j = 0; j < sigLen; j++) {
|
||||
if (buffer[i + j] !== signature[j]) {
|
||||
match = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (match) return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
async function patchFile(folder: string) {
|
||||
const exePath = path.join(folder, "RobloxStudioBeta.exe");
|
||||
|
||||
let binary: Buffer;
|
||||
try {
|
||||
binary = await fs.readFile(exePath);
|
||||
} catch (err) {
|
||||
console.error(`[ERROR] Could not read ${exePath}/RobloxStudioBeta.exe:`, err);
|
||||
return;
|
||||
}
|
||||
|
||||
if (findSignature(binary, PATCH)) {
|
||||
console.log(`[SKIP] ${folder}/RobloxStudioBeta.exe has already been patched`);
|
||||
return;
|
||||
}
|
||||
|
||||
const offset = findSignature(binary, SIGNATURE);
|
||||
if (offset === -1) {
|
||||
console.error(`[FAIL] Signature not found in ${exePath}/RobloxStudioBeta.exe`);
|
||||
return;
|
||||
}
|
||||
|
||||
// Apply patch
|
||||
PATCH.copy(binary, offset);
|
||||
try {
|
||||
await fs.writeFile(exePath, binary);
|
||||
console.log(`[PATCHED] Patched ${exePath}/RobloxStudioBeta.exe`);
|
||||
} catch (err) {
|
||||
console.error(`[ERROR] Failed to write patched file:`, err);
|
||||
}
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const folders: string[] = [];
|
||||
|
||||
try {
|
||||
const entries = await fs.readdir(baseDir, { withFileTypes: true });
|
||||
for (const entry of entries) {
|
||||
if (entry.isDirectory()) {
|
||||
folders.push(path.join(baseDir, entry.name));
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(`[ERROR] Failed to list folders in ${baseDir}:`, err);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`[INFO] Found ${folders.length} version folders.`);
|
||||
|
||||
const start = Date.now();
|
||||
await Promise.all(folders.map(patchFile));
|
||||
console.log(
|
||||
`[DONE] Patched internal Roblox Studio in ${Date.now() - start}ms`
|
||||
);
|
||||
}
|
||||
|
||||
main();
|
||||
@@ -1,14 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
pkill -9 waybar
|
||||
pkill -9 waybar > /dev/null
|
||||
|
||||
hyprctl dispatch exec "GTK_THEME=Adwaita waybar -c ~/config/config/waybar/config -s ~/config/config/waybar/style.css" &
|
||||
hyprctl reload
|
||||
hyprctl dispatch exec "GTK_THEME=Adwaita waybar -c ~/config/config/waybar/config -s ~/config/config/waybar/style.css" > /dev/null &
|
||||
hyprctl reload > /dev/null &
|
||||
|
||||
ROBLOX_PID="$(pidof sober)"
|
||||
|
||||
echo ${#ROBLOX_PID}
|
||||
# echo ${#ROBLOX_PID}
|
||||
|
||||
if [ ${#ROBLOX_PID} -lt 1 ]; then
|
||||
rm /tmp/.regretevator_state
|
||||
trap "rm /tmp/.regretevator_state" EXIT > /dev/null
|
||||
fi
|
||||
|
||||
@@ -25,7 +25,7 @@ get_source_info() {
|
||||
elif [[ "$trackid" == *"chromium"* ]]; then
|
||||
echo -e "Chrome "
|
||||
elif [[ "$trackid" == *"cider"* ]]; then
|
||||
echo -e "Apple Music " # added
|
||||
echo -e "Apple Music " # added
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
@@ -50,7 +50,7 @@ case "$1" in
|
||||
url=${url#file://}
|
||||
elif [[ "$url" == http* ]]; then
|
||||
url="${url/640x640/1024x1024}"
|
||||
hash=$(echo -n "$url" | sha256sum | awk '{print $1}')
|
||||
hash=$(echo -n "$(playerctl metadata album)" | sha256sum | awk '{print $1}')
|
||||
file_path="/tmp/${hash}.jpg"
|
||||
if [[ ! -f "$file_path" ]]; then
|
||||
curl -s --compressed --connect-timeout 2 -m 5 -o "$file_path" "$url" &
|
||||
|
||||
Reference in New Issue
Block a user