update hyprland and add screencopy permissions

This commit is contained in:
2025-04-09 17:38:13 +03:00
parent a40aef94bc
commit c14e4d7d46
13 changed files with 201 additions and 82 deletions

3
.gitignore vendored
View File

@@ -1,2 +1,3 @@
# hardware-configuration.nix # hardware-configuration.nix
node_modules node_modules
.hyprfail.conf

View File

@@ -114,6 +114,13 @@
foreground = "#a6e3a1" foreground = "#a6e3a1"
timeout = 10 timeout = 10
[hyprland_welcome_dots]
summary = "Welcome to... your PC?"
background = "#1e1e2e"
frame_color = "#a6e3a1"
foreground = "#a6e3a1"
timeout = 10
[dotfiles_general] [dotfiles_general]
summary = "OCbwoy3's Dotfiles" summary = "OCbwoy3's Dotfiles"
background = "#1e1e2e" background = "#1e1e2e"

View File

@@ -9,3 +9,5 @@ window-padding-y = 16
font-feature = -calt font-feature = -calt
font-feature = -liga font-feature = -liga
font-feature = -dlig font-feature = -dlig
gtk-single-instance = true

View File

@@ -1,8 +1,8 @@
# Polkit # Polkit
exec-once = systemctl --user start /nix/store/*-hyprpolkitagent-*/libexec/hyprpolkitagent # exec-once = systemctl --user start /nix/store/*-hyprpolkitagent-*/libexec/hyprpolkitagent
# Waybar # 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 # Wallpaper
exec-once = swww-daemon exec-once = swww-daemon
@@ -14,20 +14,19 @@ exec-once = dunst
exec-once = wl-paste --watch cliphist store exec-once = wl-paste --watch cliphist store
# XDG Desktop Portal # XDG Desktop Portal
exec-once = bash ~/config/config/scripts/xdg.sh exec-once = bash ~/config/scripts/xdg.sh
# Set GTK Settings # Set GTK Settings
exec-once = bash ~/config/config/scripts/gtk.sh exec-once = bash ~/config/scripts/gtk.sh
# Start Hot Reload # Start Hot Reload
exec-once = sleep 1000 & bash ~/config/config/scripts/hot-reload.sh exec-once = "bash ~/config/scripts/hot-reload.sh"
# Start arRPC # Start arRPC
exec-once = arrpc exec-once = arrpc
exec-once = equibop
# Hyprland Splash # 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 = 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\"" # 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\""

View File

@@ -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

View File

@@ -12,4 +12,4 @@ source = ./config/input.conf
source = ./config/keybindings/default.conf source = ./config/keybindings/default.conf
source = ./config/keybindings/other.conf source = ./config/keybindings/other.conf
source = ./config/autoexec.conf source = ./config/autoexec.conf
source = ./config/permissions.conf

View File

@@ -1,6 +1,7 @@
# GENERAL # GENERAL
general { general {
no_fade_in = true no_fade_in = true
no_fade_out = true
disable_loading_bar = false disable_loading_bar = false
hide_cursor = true hide_cursor = true
ignore_empty_input = true ignore_empty_input = true
@@ -22,7 +23,7 @@ background {
# TIME HR # TIME HR
label { label {
monitor = monitor =
text = cmd[update:1000] echo -e "$(date +"%H")" text = cmd[update:100] echo -e "$(date +"%H")"
color = rgba(255, 255, 255, 1) color = rgba(255, 255, 255, 1)
shadow_pass = 2 shadow_pass = 2
shadow_size = 3 shadow_size = 3
@@ -39,7 +40,7 @@ label {
# TIME # TIME
label { label {
monitor = monitor =
text = cmd[update:1000] echo -e "$(date +"%M")" text = cmd[update:100] echo -e "$(date +"%M")"
# color = 0xff$color0 # color = 0xff$color0
color = rgba(255, 255, 255, 1) color = rgba(255, 255, 255, 1)
font_size = 150 font_size = 150
@@ -53,7 +54,7 @@ label {
# DATE # DATE
label { label {
monitor = 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) color = rgba(255, 255, 255, 1)
font_size = 14 font_size = 14
font_family = Symbols Nerd Font, Geist font_family = Symbols Nerd Font, Geist
@@ -81,8 +82,8 @@ image {
# PLAYER TITTLE # PLAYER TITTLE
label { label {
monitor = monitor =
# text = cmd[update:1000] echo "$(playerctl metadata --format "{{ xesam:title }}" 2>/dev/null | cut -c1-25)" # text = cmd[update:100] 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 "$(bash ~/config/scripts/modules/hyprlock/info.sh --title)"
color = rgba(255, 255, 255, 0.8) color = rgba(255, 255, 255, 0.8)
font_size = 12 font_size = 12
font_family = Symbols Nerd Font, Geist font_family = Symbols Nerd Font, Geist
@@ -91,36 +92,11 @@ label {
valign = center 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 # PLAYER SOURCE
label { label {
monitor = monitor =
# text= cmd[update:1000] echo "$(playerctl metadata --format "{{ mpris:trackid }}" 2>/dev/null | grep -Eo "chromium|firefox|spotify")" # text= cmd[update:100] 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 "$(bash ~/config/scripts/modules/hyprlock/info.sh --source)"
color = rgba(255, 255, 255, 0.6) color = rgba(255, 255, 255, 0.6)
font_size = 10 font_size = 10
font_family = Symbols Nerd Font, Geist font_family = Symbols Nerd Font, Geist
@@ -132,8 +108,8 @@ label {
# PLAYER ALBUM # PLAYER ALBUM
label { label {
monitor = monitor =
# text= cmd[update:1000] echo "$(~/.config/hypr/bin/album.sh)" # text= cmd[update:100] echo "$(~/.config/hypr/bin/album.sh)"
text = cmd[update:1000] echo "$(bash ~/config/scripts/modules/hyprlock/info.sh --album)" text = cmd[update:100] echo "$(bash ~/config/scripts/modules/hyprlock/info.sh --album)"
color = rgba(255, 255, 255, 1) color = rgba(255, 255, 255, 1)
font_size = 10 font_size = 10
font_family = Symbols Nerd Font, Geist font_family = Symbols Nerd Font, Geist
@@ -144,8 +120,8 @@ label {
# PLAYER Artist # PLAYER Artist
label { label {
monitor = monitor =
# text = cmd[update:1000] echo "$(playerctl metadata --format "{{ xesam:artist }}" 2>/dev/null | cut -c1-30)" # text = cmd[update:100] 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 "$(bash ~/config/scripts/modules/hyprlock/info.sh --artist)"
color = rgba(255, 255, 255, 0.8) color = rgba(255, 255, 255, 0.8)
font_size = 10 font_size = 10
font_family = Symbols Nerd Font, Geist font_family = Symbols Nerd Font, Geist

60
flake.lock generated
View File

@@ -20,11 +20,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1742213273, "lastModified": 1743265529,
"narHash": "sha256-0l0vDb4anfsBu1rOs94bC73Hub+xEivgBAo6QXl2MmU=", "narHash": "sha256-QbjP15/2N+VJl0b5jxrrTc+VOt39aU4XrDvtP0Lz5ik=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "aquamarine", "repo": "aquamarine",
"rev": "484b732195cc53f4536ce4bd59a5c6402b1e7ccf", "rev": "1d2dbd72c2bbaceab031c592d4810f744741d203",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -38,11 +38,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1743414153, "lastModified": 1743801669,
"narHash": "sha256-bFIXz7SvLlSNR4M3vYPYS1CpEN9vTUiH01R4iR/BDmA=", "narHash": "sha256-RxQQQCGqywOPbdNrWGbFyFdcrdrXM4YBHW7vYt13OeI=",
"owner": "catppuccin", "owner": "catppuccin",
"repo": "nix", "repo": "nix",
"rev": "2f52f9ead26f80d7b391cedcbb3eb309bd83fff4", "rev": "07beb389d69a52c4dd5895da9553463c3740a26a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -111,11 +111,11 @@
"zon2nix": "zon2nix" "zon2nix": "zon2nix"
}, },
"locked": { "locked": {
"lastModified": 1743191728, "lastModified": 1744158770,
"narHash": "sha256-LrQd2IkfcmHdBh+pwPEPXzcosBerIEFzz/DbVNzBqig=", "narHash": "sha256-2APOaRQd3ppQRgDPJAKluSu83XA78/b+0qghQp95kXU=",
"owner": "ghostty-org", "owner": "ghostty-org",
"repo": "ghostty", "repo": "ghostty",
"rev": "1067cd3d8a061eb5b23bc1a4c46ca10af4481941", "rev": "046e92865b4f2863815b7f7af52aab75d4bac63a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -153,11 +153,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1743438213, "lastModified": 1744172174,
"narHash": "sha256-ZZDN+0v1r4I1xkQWlt8euOJv5S4EvElUCZMrDjTCEsY=", "narHash": "sha256-Ud0ClYf8YHhbYmg1piPJx2iuYOh62HQiRzDObD2gzsk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "ccd7df836e1f42ea84806760f25b77b586370259", "rev": "4040c5779ce56d36805bc7a83e072f0f894eae7d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -240,11 +240,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1743437607, "lastModified": 1744159701,
"narHash": "sha256-EEUFIq/btzh8RZ/dv69PXvC5c7ythmCYlDOzH7vriAk=", "narHash": "sha256-+wybP7rXancsseohfqPjB9xUqssvXhPqB4WIXC4mRN8=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "4c987b20e28362410d0c9f9a37bafd6f128b0a2c", "rev": "4f991610d03609e4cfe06b4a1be694ce439b779b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -265,11 +265,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1738422629, "lastModified": 1743714874,
"narHash": "sha256-5v+bv75wJWvahyM2xcMTSNNxmV8a7hb01Eey5zYnBJw=", "narHash": "sha256-yt8F7NhMFCFHUHy/lNjH/pjZyIDFNk52Q4tivQ31WFo=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-protocols", "repo": "hyprland-protocols",
"rev": "755aef8dab49d0fc4663c715fa4ad221b2aedaed", "rev": "3a5c2bda1c1a4e55cc1330c782547695a93f05b2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -462,11 +462,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1741534688, "lastModified": 1743950287,
"narHash": "sha256-EV3945SnjOCuRVbGRghsWx/9D89FyshnSO1Q6/TuQ14=", "narHash": "sha256-/6IAEWyb8gC/NKZElxiHChkouiUOrVYNq9YqG0Pzm4Y=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprutils", "repo": "hyprutils",
"rev": "dd1f720cbc2dbb3c71167c9598045dd3261d27b3", "rev": "f2dc70e448b994cef627a157ee340135bd68fbc6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -588,11 +588,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1742889210, "lastModified": 1743583204,
"narHash": "sha256-hw63HnwnqU3ZQfsMclLhMvOezpM7RSB0dMAtD5/sOiw=", "narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "698214a32beb4f4c8e3942372c694f40848b360d", "rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -636,11 +636,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1742669843, "lastModified": 1743827369,
"narHash": "sha256-G5n+FOXLXcRx+3hCJ6Rt6ZQyF1zqQ0DL0sWAMn2Nk0w=", "narHash": "sha256-rpqepOZ8Eo1zg+KJeWoq1HAOgoMCDloqv5r2EAa9TSA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1e5b653dff12029333a6546c11e108ede13052eb", "rev": "42a1c966be226125b48c384171c44c651c236c22",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -668,11 +668,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1743315132, "lastModified": 1744098102,
"narHash": "sha256-6hl6L/tRnwubHcA4pfUUtk542wn2Om+D4UnDhlDW9BE=", "narHash": "sha256-tzCdyIJj9AjysC3OuKA+tMD/kDEDAF9mICPDU7ix0JA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "52faf482a3889b7619003c0daec593a1912fddc1", "rev": "c8cd81426f45942bb2906d5ed2fe21d2f19d95b7",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -123,6 +123,9 @@
protonvpn-cli protonvpn-cli
protonvpn-gui protonvpn-gui
(writeShellScriptBin "protonvpn" ''${pkgs.protonvpn-cli}/bin/protonvpn-cli "$@"'') (writeShellScriptBin "protonvpn" ''${pkgs.protonvpn-cli}/bin/protonvpn-cli "$@"'')
(writeShellScriptBin "roblox-studio-patcher" ''${pkgs.bun}/bin/bun run /home/ocbwoy3/config/scripts/bin/patchInternalRobloxStudio.ts'')
]; ];
} }

View 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}"`;
}

View 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();

View File

@@ -1,14 +1,14 @@
#!/bin/bash #!/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 dispatch exec "GTK_THEME=Adwaita waybar -c ~/config/config/waybar/config -s ~/config/config/waybar/style.css" > /dev/null &
hyprctl reload hyprctl reload > /dev/null &
ROBLOX_PID="$(pidof sober)" ROBLOX_PID="$(pidof sober)"
echo ${#ROBLOX_PID} # echo ${#ROBLOX_PID}
if [ ${#ROBLOX_PID} -lt 1 ]; then if [ ${#ROBLOX_PID} -lt 1 ]; then
rm /tmp/.regretevator_state trap "rm /tmp/.regretevator_state" EXIT > /dev/null
fi fi

View File

@@ -25,7 +25,7 @@ get_source_info() {
elif [[ "$trackid" == *"chromium"* ]]; then elif [[ "$trackid" == *"chromium"* ]]; then
echo -e "Chrome " echo -e "Chrome "
elif [[ "$trackid" == *"cider"* ]]; then elif [[ "$trackid" == *"cider"* ]]; then
echo -e "Apple Music " # added echo -e "Apple Music " # added
else else
echo "" echo ""
fi fi
@@ -50,7 +50,7 @@ case "$1" in
url=${url#file://} url=${url#file://}
elif [[ "$url" == http* ]]; then elif [[ "$url" == http* ]]; then
url="${url/640x640/1024x1024}" 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" file_path="/tmp/${hash}.jpg"
if [[ ! -f "$file_path" ]]; then if [[ ! -f "$file_path" ]]; then
curl -s --compressed --connect-timeout 2 -m 5 -o "$file_path" "$url" & curl -s --compressed --connect-timeout 2 -m 5 -o "$file_path" "$url" &