diff --git a/.gitignore b/.gitignore index 22996b1..28b4846 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ # hardware-configuration.nix -node_modules \ No newline at end of file +node_modules +.hyprfail.conf diff --git a/config/dunst/dunstrc b/config/dunst/dunstrc index 4dc401c..d0928bb 100644 --- a/config/dunst/dunstrc +++ b/config/dunst/dunstrc @@ -114,6 +114,13 @@ foreground = "#a6e3a1" timeout = 10 +[hyprland_welcome_dots] + summary = "Welcome to... your PC?" + background = "#1e1e2e" + frame_color = "#a6e3a1" + foreground = "#a6e3a1" + timeout = 10 + [dotfiles_general] summary = "OCbwoy3's Dotfiles" background = "#1e1e2e" diff --git a/config/ghostty/config b/config/ghostty/config index 46ed7a1..8f96cd9 100644 --- a/config/ghostty/config +++ b/config/ghostty/config @@ -9,3 +9,5 @@ window-padding-y = 16 font-feature = -calt font-feature = -liga font-feature = -dlig +gtk-single-instance = true + diff --git a/config/hypr/config/autoexec.conf b/config/hypr/config/autoexec.conf index c55cd13..c3a5b11 100644 --- a/config/hypr/config/autoexec.conf +++ b/config/hypr/config/autoexec.conf @@ -1,8 +1,8 @@ # Polkit -exec-once = systemctl --user start /nix/store/*-hyprpolkitagent-*/libexec/hyprpolkitagent +# exec-once = systemctl --user start /nix/store/*-hyprpolkitagent-*/libexec/hyprpolkitagent # Waybar -exec-once = "GTK_THEME=Adwaita waybar -c ~/config/config/waybar/config -s ~/config/config/waybar/style.css" +exec = "GTK_THEME=Adwaita waybar -c ~/config/config/waybar/config -s ~/config/config/waybar/style.css" # Wallpaper exec-once = swww-daemon @@ -14,20 +14,19 @@ exec-once = dunst exec-once = wl-paste --watch cliphist store # XDG Desktop Portal -exec-once = bash ~/config/config/scripts/xdg.sh +exec-once = bash ~/config/scripts/xdg.sh # Set GTK Settings -exec-once = bash ~/config/config/scripts/gtk.sh +exec-once = bash ~/config/scripts/gtk.sh # Start Hot Reload -exec-once = sleep 1000 & bash ~/config/config/scripts/hot-reload.sh +exec-once = "bash ~/config/scripts/hot-reload.sh" # Start arRPC exec-once = arrpc -exec-once = equibop - # Hyprland Splash +# exec-once = "sleep 5 && bun run scripts/bin/betterSplash.ts" exec-once = sleep 5 && notify-send "Welcome to Hyprland!" "$(hyprctl splash)" # exec-once = nix-shell -p mpvpaper --command "mpvpaper -o \"no-audio loop loop-playlist\" HDMI-A-2 \"/home/ocbwoy3/Documents/Boykisser Chipi Chipi Full Animation [3sP6ZvlqJeE].webm\"" diff --git a/config/hypr/config/permissions.conf b/config/hypr/config/permissions.conf new file mode 100644 index 0000000..6ca5085 --- /dev/null +++ b/config/hypr/config/permissions.conf @@ -0,0 +1,11 @@ +ecosystem { + enforce_permissions = true +} + +permission = /nix/store/[A-Za-z0-9]+\-(wrapped-)?(grim|hyprlock|xdg-desktop-portal-hyprland|obs-studio)\-.*, screencopy, allow + +# hyprlang noerror true + +source = ~/config/.hyprfail.conf + +# hyprland noerror false diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 4adbf63..d403e1c 100755 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -12,4 +12,4 @@ source = ./config/input.conf source = ./config/keybindings/default.conf source = ./config/keybindings/other.conf source = ./config/autoexec.conf - +source = ./config/permissions.conf diff --git a/config/hypr/hyprlock.conf b/config/hypr/hyprlock.conf index aa5c7cd..5d5fa89 100644 --- a/config/hypr/hyprlock.conf +++ b/config/hypr/hyprlock.conf @@ -1,6 +1,7 @@ # GENERAL general { no_fade_in = true + no_fade_out = true disable_loading_bar = false hide_cursor = true ignore_empty_input = true @@ -22,7 +23,7 @@ background { # TIME HR label { monitor = - text = cmd[update:1000] echo -e "$(date +"%H")" + text = cmd[update:100] echo -e "$(date +"%H")" color = rgba(255, 255, 255, 1) shadow_pass = 2 shadow_size = 3 @@ -39,7 +40,7 @@ label { # TIME label { monitor = - text = cmd[update:1000] echo -e "$(date +"%M")" + text = cmd[update:100] echo -e "$(date +"%M")" # color = 0xff$color0 color = rgba(255, 255, 255, 1) font_size = 150 @@ -53,7 +54,7 @@ label { # DATE label { monitor = - text = cmd[update:1000] echo -e "$(LC_TIME=lv_LV.UTF-8 date +"%A, %-d. %B" | sed 's/./\U&/1')" + text = cmd[update:100] echo -e "$(LC_TIME=lv_LV.UTF-8 date +"%A, %Y. gada %-d. %B" | sed 's/./\U&/1')" color = rgba(255, 255, 255, 1) font_size = 14 font_family = Symbols Nerd Font, Geist @@ -81,8 +82,8 @@ image { # PLAYER TITTLE label { monitor = -# text = cmd[update:1000] echo "$(playerctl metadata --format "{{ xesam:title }}" 2>/dev/null | cut -c1-25)" - text = cmd[update:1000] echo "$(bash ~/config/scripts/modules/hyprlock/info.sh --title)" +# text = cmd[update:100] echo "$(playerctl metadata --format "{{ xesam:title }}" 2>/dev/null | cut -c1-25)" + text = cmd[update:100] echo "$(bash ~/config/scripts/modules/hyprlock/info.sh --title)" color = rgba(255, 255, 255, 0.8) font_size = 12 font_family = Symbols Nerd Font, Geist @@ -91,36 +92,11 @@ label { valign = center } -# PLAYER Length -label { - monitor = -# text= cmd[update:1000] echo "$(( $(playerctl metadata --format "{{ mpris:length }}" 2>/dev/null) / 60000000 ))m" - text = cmd[update:1000] echo "$(bash ~/config/scripts/modules/hyprlock/info.sh --length) " - color = rgba(255, 255, 255, 1) - font_size = 11 - font_family = Symbols Nerd Font, Geist - position = -730, -310 - halign = right - valign = center -} - -# PLAYER STATUS -label { - monitor = -# text= cmd[update:1000] echo "$(( $(playerctl metadata --format "{{ mpris:length }}" 2>/dev/null) / 60000000 ))m" - text = cmd[update:1000] echo "$(bash ~/config/scripts/modules/hyprlock/info.sh --status)" - color = rgba(255, 255, 255, 1) - font_size = 14 - font_family = Symbols Nerd Font, Geist - position = -740, -290 - halign = right - valign = center -} # PLAYER SOURCE label { monitor = -# text= cmd[update:1000] echo "$(playerctl metadata --format "{{ mpris:trackid }}" 2>/dev/null | grep -Eo "chromium|firefox|spotify")" - text = cmd[update:1000] echo "$(bash ~/config/scripts/modules/hyprlock/info.sh --source)" +# text= cmd[update:100] echo "$(playerctl metadata --format "{{ mpris:trackid }}" 2>/dev/null | grep -Eo "chromium|firefox|spotify")" + text = cmd[update:100] echo "$(bash ~/config/scripts/modules/hyprlock/info.sh --source)" color = rgba(255, 255, 255, 0.6) font_size = 10 font_family = Symbols Nerd Font, Geist @@ -132,8 +108,8 @@ label { # PLAYER ALBUM label { monitor = -# text= cmd[update:1000] echo "$(~/.config/hypr/bin/album.sh)" - text = cmd[update:1000] echo "$(bash ~/config/scripts/modules/hyprlock/info.sh --album)" +# text= cmd[update:100] echo "$(~/.config/hypr/bin/album.sh)" + text = cmd[update:100] echo "$(bash ~/config/scripts/modules/hyprlock/info.sh --album)" color = rgba(255, 255, 255, 1) font_size = 10 font_family = Symbols Nerd Font, Geist @@ -144,8 +120,8 @@ label { # PLAYER Artist label { monitor = -# text = cmd[update:1000] echo "$(playerctl metadata --format "{{ xesam:artist }}" 2>/dev/null | cut -c1-30)" - text = cmd[update:1000] echo "$(bash ~/config/scripts/modules/hyprlock/info.sh --artist)" +# text = cmd[update:100] echo "$(playerctl metadata --format "{{ xesam:artist }}" 2>/dev/null | cut -c1-30)" + text = cmd[update:100] echo "$(bash ~/config/scripts/modules/hyprlock/info.sh --artist)" color = rgba(255, 255, 255, 0.8) font_size = 10 font_family = Symbols Nerd Font, Geist diff --git a/flake.lock b/flake.lock index f041a53..63ff30f 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1742213273, - "narHash": "sha256-0l0vDb4anfsBu1rOs94bC73Hub+xEivgBAo6QXl2MmU=", + "lastModified": 1743265529, + "narHash": "sha256-QbjP15/2N+VJl0b5jxrrTc+VOt39aU4XrDvtP0Lz5ik=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "484b732195cc53f4536ce4bd59a5c6402b1e7ccf", + "rev": "1d2dbd72c2bbaceab031c592d4810f744741d203", "type": "github" }, "original": { @@ -38,11 +38,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1743414153, - "narHash": "sha256-bFIXz7SvLlSNR4M3vYPYS1CpEN9vTUiH01R4iR/BDmA=", + "lastModified": 1743801669, + "narHash": "sha256-RxQQQCGqywOPbdNrWGbFyFdcrdrXM4YBHW7vYt13OeI=", "owner": "catppuccin", "repo": "nix", - "rev": "2f52f9ead26f80d7b391cedcbb3eb309bd83fff4", + "rev": "07beb389d69a52c4dd5895da9553463c3740a26a", "type": "github" }, "original": { @@ -111,11 +111,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1743191728, - "narHash": "sha256-LrQd2IkfcmHdBh+pwPEPXzcosBerIEFzz/DbVNzBqig=", + "lastModified": 1744158770, + "narHash": "sha256-2APOaRQd3ppQRgDPJAKluSu83XA78/b+0qghQp95kXU=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "1067cd3d8a061eb5b23bc1a4c46ca10af4481941", + "rev": "046e92865b4f2863815b7f7af52aab75d4bac63a", "type": "github" }, "original": { @@ -153,11 +153,11 @@ ] }, "locked": { - "lastModified": 1743438213, - "narHash": "sha256-ZZDN+0v1r4I1xkQWlt8euOJv5S4EvElUCZMrDjTCEsY=", + "lastModified": 1744172174, + "narHash": "sha256-Ud0ClYf8YHhbYmg1piPJx2iuYOh62HQiRzDObD2gzsk=", "owner": "nix-community", "repo": "home-manager", - "rev": "ccd7df836e1f42ea84806760f25b77b586370259", + "rev": "4040c5779ce56d36805bc7a83e072f0f894eae7d", "type": "github" }, "original": { @@ -240,11 +240,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1743437607, - "narHash": "sha256-EEUFIq/btzh8RZ/dv69PXvC5c7ythmCYlDOzH7vriAk=", + "lastModified": 1744159701, + "narHash": "sha256-+wybP7rXancsseohfqPjB9xUqssvXhPqB4WIXC4mRN8=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "4c987b20e28362410d0c9f9a37bafd6f128b0a2c", + "rev": "4f991610d03609e4cfe06b4a1be694ce439b779b", "type": "github" }, "original": { @@ -265,11 +265,11 @@ ] }, "locked": { - "lastModified": 1738422629, - "narHash": "sha256-5v+bv75wJWvahyM2xcMTSNNxmV8a7hb01Eey5zYnBJw=", + "lastModified": 1743714874, + "narHash": "sha256-yt8F7NhMFCFHUHy/lNjH/pjZyIDFNk52Q4tivQ31WFo=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "755aef8dab49d0fc4663c715fa4ad221b2aedaed", + "rev": "3a5c2bda1c1a4e55cc1330c782547695a93f05b2", "type": "github" }, "original": { @@ -462,11 +462,11 @@ ] }, "locked": { - "lastModified": 1741534688, - "narHash": "sha256-EV3945SnjOCuRVbGRghsWx/9D89FyshnSO1Q6/TuQ14=", + "lastModified": 1743950287, + "narHash": "sha256-/6IAEWyb8gC/NKZElxiHChkouiUOrVYNq9YqG0Pzm4Y=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "dd1f720cbc2dbb3c71167c9598045dd3261d27b3", + "rev": "f2dc70e448b994cef627a157ee340135bd68fbc6", "type": "github" }, "original": { @@ -588,11 +588,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1742889210, - "narHash": "sha256-hw63HnwnqU3ZQfsMclLhMvOezpM7RSB0dMAtD5/sOiw=", + "lastModified": 1743583204, + "narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "698214a32beb4f4c8e3942372c694f40848b360d", + "rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434", "type": "github" }, "original": { @@ -636,11 +636,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1742669843, - "narHash": "sha256-G5n+FOXLXcRx+3hCJ6Rt6ZQyF1zqQ0DL0sWAMn2Nk0w=", + "lastModified": 1743827369, + "narHash": "sha256-rpqepOZ8Eo1zg+KJeWoq1HAOgoMCDloqv5r2EAa9TSA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1e5b653dff12029333a6546c11e108ede13052eb", + "rev": "42a1c966be226125b48c384171c44c651c236c22", "type": "github" }, "original": { @@ -668,11 +668,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1743315132, - "narHash": "sha256-6hl6L/tRnwubHcA4pfUUtk542wn2Om+D4UnDhlDW9BE=", + "lastModified": 1744098102, + "narHash": "sha256-tzCdyIJj9AjysC3OuKA+tMD/kDEDAF9mICPDU7ix0JA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "52faf482a3889b7619003c0daec593a1912fddc1", + "rev": "c8cd81426f45942bb2906d5ed2fe21d2f19d95b7", "type": "github" }, "original": { diff --git a/hosts/default/packages.nix b/hosts/default/packages.nix index e89fb82..1e81027 100644 --- a/hosts/default/packages.nix +++ b/hosts/default/packages.nix @@ -123,6 +123,9 @@ protonvpn-cli protonvpn-gui (writeShellScriptBin "protonvpn" ''${pkgs.protonvpn-cli}/bin/protonvpn-cli "$@"'') + + (writeShellScriptBin "roblox-studio-patcher" ''${pkgs.bun}/bin/bun run /home/ocbwoy3/config/scripts/bin/patchInternalRobloxStudio.ts'') + ]; } diff --git a/scripts/bin/betterSplash.ts b/scripts/bin/betterSplash.ts new file mode 100644 index 0000000..f4693e9 --- /dev/null +++ b/scripts/bin/betterSplash.ts @@ -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}"`; +} + diff --git a/scripts/bin/patchInternalRobloxStudio.ts b/scripts/bin/patchInternalRobloxStudio.ts new file mode 100644 index 0000000..04ea18d --- /dev/null +++ b/scripts/bin/patchInternalRobloxStudio.ts @@ -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(); diff --git a/scripts/hot-reload.sh b/scripts/hot-reload.sh index 2361dfa..c1430d9 100755 --- a/scripts/hot-reload.sh +++ b/scripts/hot-reload.sh @@ -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 diff --git a/scripts/modules/hyprlock/info.sh b/scripts/modules/hyprlock/info.sh index 8072f01..0ce20f6 100755 --- a/scripts/modules/hyprlock/info.sh +++ b/scripts/modules/hyprlock/info.sh @@ -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" &