#👾-core-development

1 messages · Page 88 of 1

olive barn
charred monolithBOT
#

Adds a popover button to either toggle a css snippet (adds it to quickcss) or eval a javascript snippet

Only shows the buttons in the official css/js snippets channels for safety

Js snippets are locked behind a plugin setting and give you a warning before running it

olive barn
#

@austere talon would js snippets be too unsafe?

stark flint
olive barn
#

yea true

austere talon
#

that plugin already exists btw

#

add css snippets

olive barn
#

what

stark flint
#

oh as a pr

olive barn
#

ohhh

charred monolithBOT
tawny cipher
#

ye, I put effort into it, there's just some quirky thing that needs to be resolved

hazy steeple
charred monolithBOT
somber helm
#

To fix themes not loading on web can't you patch the cross-origin and csp?
There are already extentions to do that but it would require the user to install 3 extentions instead of 1

austere talon
#

we already do

#

if it doesnt work its your browser's skill issue

#

aka you're most likely using brave

somber helm
#

ohh

somber helm
austere talon
#

ok

hazy steeple
#

What do you think about it?

#

Not so good, but not so bad I would say.

#

idk really why lol

hazy steeple
#

Guys, can I push the themes myself into the C:\Users\UserName\AppData\Roaming\Vencord folder?

#

On the other hand...

#

why install themes at all?)

#

Yes, there is no place

#

i remove download button xd

#

It remains to add a search

charred monolithBOT
charred monolithBOT
austere talon
#

vupdate

nimble pendantBOT
#

I'm back !!! :DDD

teal halo
#

self explod

#

vupdate

nimble pendantBOT
teal halo
hazy steeple
#

why did it take so long

#

yeeee

#

i m done

tawny cipher
#

am I just stupid or does Clipboard.copy() just not work within a contextmenu patch

austere talon
#

check console for errors

hazy steeple
#

wth is this

ruby coyote
tawny cipher
austere talon
#

outdated fork?

#

the copy filter broke fairly recently

tawny cipher
#

hm I pulled just now, but I'll see

#

kek I checked out the remote branch and git apparently creates new branches from the local head

#

me big stupid

hazy steeple
#

this is the one and only plugin with broken image

#

fun

#

why

charred monolithBOT
hazy steeple
#

@austere talon branch main?

hazy steeple
warm stump
#

noice

teal halo
#

nice

charred monolithBOT
hazy steeple
#

YOU BROKE 69

charred monolithBOT
hazy steeple
#

my bad

drifting vigil
#

cant you provide the firefox xpi file for vencord web on discord?

#

regarding the announcement

austere talon
#

have to sign for that

#

which we cant

#

just use userscript

drifting vigil
#

aww oki

charred monolithBOT
#

hello

this code is very messy, there are many issues:

  • use const/let over var
  • use SCREAMING_SNAKE_CASE for constants
  • use a css file instead of inline styles
  • storing react state in global variables is almost always, most definitely in your case, an anti pattern
  • avoid using resources from random websites
  • lines should be broken if they get too long
  • follow the project's style and lint
  • push to the customSections of settings instead of copy pasting the patch

Regardless ...

#

About bad code is expected - I wrote for the first time on TS while learning the syntax on the go) (usually I work with C #, C ++, sometimes java, rarely rust and js / css / html)
Therefore, I also planned to completely rewrite the code from scratch, refactor it. And about the need for a plugin - when I first downloaded Vencord, I wanted to look through the plugins, but it takes about 10-15 seconds to insert them, which does not allow them to be viewed normally. Therefore, for beginners (per...

hazy steeple
#

I'm confused about languages...

#

I have already translated on github

pure crystal
#

adryd's clear urls dont work on youtube and instagram's share feature

#

actually i dont remember youtube videos' shortened urls having tracker

#

I did my best as always! I hope you enjoy! (/^-^)/

Instrumental: Linkin Park - Faint
Acapella: Linkin Park - Faint
Acapella: Slipknot - Nero Forte
Acapella: Eminem - No Love

Patreon: https://www.patreon.com/XYClanKILLER2

PayPal Donation Link: https://www.paypal.com/paypalme/DSchwind116?locale.x=de_DE

If you want to know more about my life, f...

▶ Play video
teal halo
#

there’s a PR for youtube

pure crystal
#

instagram?

teal halo
#

no idea

#

could u send a link here

frail skyBOT
#
Bad Patches

IgnoreActivities (had no effect):
ID: 985101
Match: /!([A-Za-z_$][\w$]*)(\)return null;var [A-Za-z_$][\w$]*=([A-Za-z_$][\w$]*)\.overlay.+?children:)(\[.{0,70}overlayStatusText.+?\])(?=}\)}\(\))/

Bad Starts

None

Discord Errors
font-weight: bold;
color: purple;
 [kb store] KeybindStore: Looking for callback action SOUNDBOARD_HOLD but it doesn't exist in this version. Skipping
%c[FetchBlockedDomain] 
font-weight: bold;
color: purple;
 Unable to process domain list delta: Client revision number is null
%c[FetchBlockedDomain] 
font-weight: bold;
color: purple;
 Downloading the full bad domains file ```
#
Bad Patches

IgnoreActivities (had no effect):
ID: 985101
Match: /!([A-Za-z_$][\w$]*)(\)return null;var [A-Za-z_$][\w$]*=([A-Za-z_$][\w$]*)\.overlay.+?children:)(\[.{0,70}overlayStatusText.+?\])(?=}\)}\(\))/

Bad Starts

None

Discord Errors
font-weight: bold;
color: purple;
 resetSocketOnError Cannot access 'nde' before initialization
%c[FetchBlockedDomain] 
font-weight: bold;
color: purple;
 Unable to process domain list delta: Client revision number is null
%c[FetchBlockedDomain] 
font-weight: bold;
color: purple;
 Downloading the full bad domains file ```
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
austere talon
#

mozilla finally found out how to read code i guess

#

gonna have to either drop firefox support or remove a lot of features from firefox

willow garden
#

drop it shiggy

austere talon
#

WAIT

#

I just realised

#

src/main/index.ts

#

that's electron code

maiden sapphire
austere talon
#

oh that sounds cool I'll check it later

maiden sapphire
cunning canyon
maiden sapphire
#

hmmmmm

charred monolithBOT
tawny cipher
#

can we yoink the profile card component from somewhere, or is that a bit too convoluted to get

austere talon
#

Mozilla decided to create a list of extension pairs for extensions that are available on the Chrome Web Store and the Mozilla Add-ons Store. Instead of importing the Chrome extension directly, Firefox is installing the Firefox version of the extension from Mozilla's own extension store.

#

lol this is useless

elder garnet
#

So this means you can now "import" Extensions from chromium into furryfox?

charred monolithBOT
olive barn
#

upload theme button is broken on both web and desktop (i edited code to enable on desktop, finding the bug)

#

doesnt allow css files for some reason

austere talon
#

just pick it anyway

olive barn
#

doesnt let u

austere talon
#

skill issue of whatever picker you use

olive barn
#

doesnt do anything on click

austere talon
#

macos skill issue :)

#

crapOs

olive barn
#

fixed by changing filters={[{ extensions: ["*.css"] }]} to filters={[{ extensions: ["css"] }]}

austere talon
#

works fine on windows

olive barn
#

odd

#

does it still work with that change?

austere talon
#

crapOs part 2

#

yes it still works with css

#

explorer says cascading style sheet document instead of *.CSS files

tame escarp
#

this is the first time anyone has seen that text in 25 years

olive barn
#

before and after the fix

charred monolithBOT
tame escarp
#

it interpreted the wildcard literally

austere talon
tame escarp
#

beautiful OS

olive barn
#

horrid

olive barn
#

(reverted the changes)

tame escarp
#

wha

#

crazyOs

#

needs to be 5150ed

somber ginkgo
teal halo
#

it died for me too lol

verbal pumice
#

we broke github

#

🎉

teal halo
#

will do later

charred monolithBOT
olive barn
#

:3

#

(i have next to no go experience)

charred monolithBOT
teal halo
#

oh come on not now

#

canary also doesnt work

#

raaah

#

time to reinstall everything

#

😃

hazy steeple
#

@austere talon how do i use customSections?

olive barn
#

codeberg ci stay winning

#

i probably shouldve made a branch for this so i can actually contribute but oh whale 🐳

teal halo
#

why is it broken

#

aaaaaaaaaaaaaa

#

nvm what the fuck is this

verbal pumice
#

have a guess

austere talon
#

youre doing it wrong

#

show code

teal halo
#

this fucks it up

#

and why is the embed like this

#

looks horrible

austere talon
#

yes

#

only the store

cunning canyon
austere talon
teal halo
#

aaah

#

sorry i was still eepy

hazy steeple
#

try settings.customSections.push();

teal halo
#

ok fixed

hazy steeple
#

... but I can only add the section ID

charred monolithBOT
olive barn
#

@turbid hatch you love

charred monolithBOT
olive barn
#

why does it take so long to install wails on windows wraaaa

#

istg if setup-go caching doesnt do global stuff im gonna cry

charred monolithBOT
burnt ridge
hazy steeple
#

Merge?)

#

maybe) but it was fun

burnt ridge
#

nvm i thought it said plugin

#

forget i said anything

hazy steeple
#

lol ok

charred monolithBOT
olive barn
charred monolithBOT
hazy steeple
#

How can I know if my plugin is enabled or not?

olive barn
charred monolithBOT
turbid hatch
austere talon
#

why did u move setup node after pnpm

olive barn
#

node freaks out if pnpm executable doesnt exist

#

its documented to install pnpm first

turbid hatch
#

huh

#

TIL

turbid hatch
#

oh i see

#

cause it runs pnpm store path

#

to load the cache path

#

makes sense

olive barn
#

idk why windows takes so long to install wails tho, even with the cache

turbid hatch
#

windows and go is not a good mix

turbid hatch
#

it takes ages

olive barn
austere talon
olive barn
#

i mean its still faster

#

used to take 5m

turbid hatch
#

it's something relating to cgo

austere talon
#

don't pull go into this

turbid hatch
#

because wails uses some cgo stuff

olive barn
austere talon
#

all languages are slow asf to compile on windows

#

try rust or c++

#

its so horribly slow

turbid hatch
#

rust works fine

#

:P

#

for me at least

#

and C++

austere talon
#

well rust users are used to 5 hour compile times

#

so you dont notice in rust

turbid hatch
#

my rust code compiles in like

#

what

#

2s?

#

without pkgs of course, with it takes time

#

but that's natural

#

it's rust

#

lol

#

go without cgo is fine, with cgo it fucking dies

#

because i assume it's using MSVC

hazy steeple
tawny cipher
#

just needs to be prettier

olive barn
#

oo nice

austere talon
hazy steeple
turbid hatch
#

what C compiler is it using then?

austere talon
#

mingw

olive barn
#

does vesktop use hardware acceleration

turbid hatch
#

oh yeah that'll do it lmfao

olive barn
#

because my member list is duing

turbid hatch
#

also windows defender

#

windows defender sucks when it comes to compiling

#

that's why i normally just turn it off / add exclusions

olive barn
#

:D

turbid hatch
#

i wanna try this merge queue thing

austere talon
olive barn
#

awa

turbid hatch
#

cause it says to add to the CI the merge_group event

olive barn
#

WHY IS IT BACK

turbid hatch
#

so what im assuming it does is it creates a fake branch to do it

hazy steeple
turbid hatch
#

and then runs it through actions

turbid hatch
#

it's a toggle switch

#

what

olive barn
#

or you can completely kill it with a powershell command

turbid hatch
#

you just turn this off

#

and it stops doing stuff

olive barn
#

it turns back on

hazy steeple
turbid hatch
#

yeah but the point is that you do it temporarily

#

whilst you compile stuff

#

and it goes weeeeee

hazy steeple
#

And it doesn't turn off completely.

turbid hatch
#

if you wanna turn it off completely

#

group policy

#

easy

#

or a regkey

#

or a powershell command

#

it's like a 10 second google

olive barn
#

i can find the cmd if u want

#

makes it think another av is installed

hazy steeple
#

Seriously? It's just that usually when I search for it, I find only "too difficult, not worth it"...
Although I may have searched too early after the release of Windows

turbid hatch
#

group policy makes it significantly easy

#

it's a single option

#

Comptuer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus > Turn off Microsoft Defender Antivirus

hazy steeple
#

In general, right now I work mostly only with C #, rarely with other languages, so yes

turbid hatch
#

so you can still leave all of the other protection on

#

and just disable real time

#

which is actually fire

olive barn
#

|| pwsh Set-MpPreference -DisableRealtimeMonitoring $true New-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender" -Name DisableAntiSpyware -Value 1 -PropertyType DWORD -Force
||

#

spoilerd so randoms dont run it

hazy steeple
#

In general, I have been planning to buy a second disk for a long time, and put Linux on it for work

turbid hatch
#

alternatively

#

if you have winaero tweaker installed

#

it's there!

hazy steeple
#

But everything stops me the lack of VS on it (

hazy steeple
turbid hatch
#

it's a tweaker

#

it makes stuff a lot easier

olive barn
#

lets u tweak a bunch of registry keys

turbid hatch
#

but it also allows you to break a bunch of shit

#

so its not advisable to get unless you know what you're doing

olive barn
#

lewi do we know exactly what triggers the full disk access popup

#

i wanna make a prompt for it

turbid hatch
#

its cause it's trying to write to the /Applications directory

#

which is considered protected

olive barn
#

trying to find where it triggers this

#

like why tf is it a file exists error

turbid hatch
austere talon
#

it's because /Applications/Discord.app is owned by the root user for some people

#

while for the majority of people it's owned by their user

#

the fix is to either elevate to root, or do what we tell people to do, chmod it to their own user

#

the full disk access is wrong and misleading in almost all cases

#

vprune 3 by 1045795875001208894

turbid hatch
#

mac is a funny operating system

#

at least i made the titlebar nice :3

olive barn
#

:3

#

also u have a bunch of local changes from when u went to bed

#

do u want me to send a patch file in a bit?

turbid hatch
#

i think i ported all of it onto the main thing anyway

#

so

#

all the stuff that matters

olive barn
#

ah oki

turbid hatch
#

windows: rebuilding the entire titlebar
mac: hehe funny text

olive barn
#

nice

turbid hatch
#

i wish windows let you do what mac does

#

where it just drops the window controls into the frame

#

so you can have a custom titlebar

hazy steeple
#

stopping plugin didnt call stop
oh wait, i m stupid
yeah it works

turbid hatch
#

you "can" do that with DWM hacks but most people just opt to rebuild the entire window frame from scratch at that point

azure jay
#

so sad that the web installer got deprecated

turbid hatch
#

web installer got ported to wailsinstaller

#

wailsinstaller still uses the web installer code

azure jay
#

yes but the web installer was so insane

turbid hatch
#

it would have been cool and good if pwas had more functionality

#

relating to native filesystem stuff

#

but they dont so it makes it more difficult

#

also pwas only really work in chrome

#

firefox and safari dont support them nearly as well

charred monolithBOT
azure jay
#

yeah but im talking about the ws thing, i never seen an installer like that

turbid hatch
#

ah yeah

#

i know its not quite the same

#

but via and qmk config are both web based tools that do stuff in the browser

#

and then write to hardware

#

via especially is really cool

#

though i use the downloaded version of the app cause authorising it access to my keyboard every time is a lil annoying xd

azure jay
#

yeah webusb is cool too

#

i wrote a website that used adb

austere talon
#

its gonna be less cool but a bit more convenient

turbid hatch
#

its funny how many draft standards are widely used only because chrom(e|ium) implements them

turbid hatch
#

i think convenience > coolness

hazy steeple
#

wait, i can explain...

austere talon
#

tempted to migrate ghwp to cloudflare workers

turbid hatch
#

cf workers is fire

charred monolithBOT
azure jay
charred monolithBOT
olive barn
#

@spark cove for voice api, should i allow plugins to set priority? ie: soundboard has priority 2 so rnnoise gets injected first

austere talon
#

im not even sure voice api is a good idea

#

it doesn't seem very useful and only works on web

olive barn
#

i mean its better than hardcoding support for other voice plugins

#

look at the patches for my soundboard pr

austere talon
#

i don't think a web only fake soundboard plugin is a good idea either

#

and I cannot think of any other plugins wanting to mess with voice

olive barn
#

stereo audio trolley

austere talon
#

combust

hazy steeple
#

Damn, I wanted to create a new fork of the project to edit the changes in the branches

hazy steeple
#

But you can only create one fork...

charred monolithBOT
hazy steeple
olive barn
#

make a branch from main, change repo default branch to that, delete main, remake it from upstream, fix the default

hazy steeple
olive barn
#

but then it loses commit history

hazy steeple
hazy steeple
#

niceeeeeee

charred monolithBOT
hazy steeple
#

It remains to rename the repository

#

done

#

I thought it would be much more difficult

#

all the same git and really very powerful

charred monolithBOT
spark cove
#

Prob better to have it centralized tbh doesn't hurt and web is a big target cus vesktop

patent vigil
#

Ok so I just came to ask considering I'm considerable new to this vencord thing
Is this thing safe to install? Or could there be potential problems with it, ignoring the possible bans from using it like better discord obviously

patent vigil
#

Oh, thank you and sorry for the intrusion

olive barn
austere talon
#

wdym

olive barn
#

so incase the popup was dismissed before u dont have to dig thru settings to find it

#

its in a weird place

spark cove
olive barn
#

:D

austere talon
charred monolithBOT
olive barn
#

whar

austere talon
#

full disk access is not the right solution

olive barn
#

oh

austere talon
#

actually it looks like there might be a really clean solution

#

can someone on macos try running this

#

and tell me how the experience is

olive barn
#

please grant the

verbal pumice
nimble pendantBOT
spark cove
#

wheel is real on mac??

austere talon
#
osascript -e 'do shell script "chown -R \"${USER}:wheel\" /Applications/Discord.app" with administrator privileges'
olive barn
#

why osascript?

austere talon
#

someone on mac run that

olive barn
#

oh nvm im dumb

austere talon
#

we could just use that

olive barn
#

nuh uh

austere talon
#

osascript shows a graphical adim prompt apparently

olive barn
#

after running osascript

austere talon
olive barn
#

wait wha

#

lemme try without the sudo

austere talon
#

yes

#

i removed it already

olive barn
#

??????

#

same thing with just sudo chown -R luna:wheel /Applications/Discord.app

spark cove
#

lmao what th ehll

olive barn
austere talon
#

is ur user admin

olive barn
#

yeah'

austere talon
#

so both might be needed

#

i hate mac

olive barn
#

awa

austere talon
#

okay so

#

wait

#

can you ls -la /Applications/Discord.app please

olive barn
#

should i make the app execute the osascript thing to prompt?

austere talon
#

hmm

#

its already owned by you anyway

#

can u run again

#

with -lhdO

olive barn
austere talon
#

uh weird

olive barn
#

for reference:

austere talon
#

well

olive barn
#

havent used any commands on canary

austere talon
#

okay so

#

the best flow imo would be:
on permission error:

  • check if directory is owned by root instead of current user. If yes, show a popup telling the user about it and that they need to enter their password to fix it and then have a button "ok" and on click it runs the osascript chmod
  • if still fail, tell them to grant disk acess
  • if still fail, tell them to explode
#

why is some weirdo spamming codeburger issues

#
teal halo
#

lmfao

#

lol the description is pure spam

#

probably AI generated

austere talon
#

the webhook notifs didn't even work

olive barn
#

waaaaaaaaaaa

#

what am i doing wront

#

cmd := exec.Command("osascript", "-e", "do shell script \"chown -R \"${USER}:wheel\" /Applications/Discord.app' with administrator privileges")

#

stdout and stderr are nil

austere talon
#
cmd := exec.Command("osascript", "-e", `do shell script "chown -R \"${USER}:wheel\" /Applications/Discord.app" with administrator privileges`)
olive barn
#

omg

#

im used to js so when copilot suggested backticks i ignored it because "im not substituting anything"

austere talon
#
do shell script "chown -R "${USER}:wheel" /Applications/Discord.app" with administrator privileges
#

notice whats wrong here

#

thats what youre running

austere talon
#

im not sure

#

ah no

#

` is fully raw

olive barn
#

i tried changing the user to singlequotes after i sent it

#

\" escapes the quote surrounding the string

austere talon
olive barn
#

two backslashes

#

ohhh

austere talon
#

` is for raw string literals in go

olive barn
#

now i need to find out how to store if the user is retrying

austere talon
olive barn
#

lemme check docs

austere talon
#

oh

#

its easy

#
do shell script "" with prompt "Vencord Installer needs to fix Discord file ownership. Enter your password to allow this" with administrator privileges
#

try this

olive barn
austere talon
#

can u also rename the osascript

#

probably not

olive barn
#

ehhhh

#

lemme try smt

austere talon
#

remove the "Enter your password to allow this"

#

cause the prompt already says the same

tawny cipher
#

does that force login keychain password or does it allow touch id, these permissions prompts are inconsistent in what they want from you sometimes

austere talon
#

try it and see

charred monolithBOT
austere talon
#
osascript -e "do shell script \"echo\" with administrator privileges"
#

run in terminal

tawny cipher
#

Eh lied down, too lazy

tawny cipher
#

works here

olive barn
#

did you enable touchid for pam?

#

osascript uses pam

#

i never bothered to enable that because i use nopasswd

austere talon
#

applescript is so cursed

tawny cipher
#

didn't enable anything as far as I remember, perhaps if it prompts you at some point I may have clicked yes in the past

charred monolithBOT
austere talon
#

why is it even hidden in the first place lmao

olive barn
#

brb

charred monolithBOT
shy veldt
#

so it shows to mods only

olive barn
#

how would i do string substitution in it, so its not hardcoded to /applications/Discord.app

charred monolithBOT
olive barn
#

oki

azure jay
olive barn
#

whys it cropped

austere talon
#

did you actually make it check whether the perm check is necessary

olive barn
#

yeah

#

it checks the error for "operation not permitted"

charred monolithBOT
austere talon
#

check if the folder is owned by root

olive barn
#

ohh

median rapids
#

(they send it to everyone)

olive barn
#

thank you copilot

austere talon
#
info, err := os.Stat("/path/to/the/file")
if stat, ok := info.Sys().(*syscall.Stat_t); ok {
    isRootOwned := int(stat.Uid) == 0
}
olive barn
#

????????????????

austere talon
#

yes that's correct

olive barn
#

go is confusing

olive barn
#

anyways

austere talon
#

it skips the cast check but that should be fine

austere talon
#

it casts foo to stuff

olive barn
#

ohhh

hazy steeple
#

jk

median rapids
#

chillax buddy there's 2 more pages cozy

hazy steeple
#

By the way, I was thinking about loading external plugins

hazy steeple
#

its a joke moment

#

yes, i m not funny

median rapids
#

you can still respond to a joke silly

verbal pumice
hazy steeple
#

Then I joked at your joke

#

any question?

#

xd

median rapids
#

😭

hazy steeple
#

btw

#

I thought about loading plugins from outside

#

For example from github

#

but from another page

austere talon
verbal pumice
#

report message button:

austere talon
#

wave good bye to ur account

median rapids
#

this will unironically get you banned sk

austere talon
hazy steeple
#

its my mental age

austere talon
#

you should delete that message

median rapids
#

too late blobcatcozy

#

jkjk

hazy steeple
median rapids
#

nah they dont care at all

#

you can edit any message that someone replies yes/no/similar to into something like "ru under/over 13" and report the reply

#

and the person will be banned

olive barn
#

the chown is failing D: ill send code in a sec

charred monolithBOT
olive barn
#

its showing the prompt but giving status 1

hazy steeple
median rapids
#

for eel

austere talon
median rapids
#

you can ban literally anyone that's ever replied with something in the negative/affirmative to you

hazy steeple
#

is he happy because he is close to his death?

#

Has he really looked at my files and cannot mentally endure this burden?

#

I need to buy another CD...

olive barn
#

<Nil>

#

cmd := exec.Command("osascript", "-e", `do shell script "chown -R \"${USER}:wheel\" \"` + path + `\"" with prompt "Vencord Installer needs to fix Discord file ownership. Enter your password to allow this" with administrator privileges`)

#

still failed if i removed the quotes around path

austere talon
#

show full code

#

in a proper codeblock

olive barn
#
func (i *Installer) PromptForChown(path string) bool {

    fmt.Println("Showing osascript prompt", path, "...")

    cmd := exec.Command("osascript", "-e", `do shell script "chown -R \"${USER}:wheel\" \"` + path + `\"" with prompt "Vencord Installer needs to fix Discord file ownership. Enter your password to allow this" with administrator privileges`)
    err := cmd.Run()

    if err != nil {
        fmt.Println("Error while prompting for chown:", err)
        fmt.Println(cmd.Stderr)
        return false
    }

    return true
}```
#
Showing osascript prompt /Applications/Discord.app ...
Error while prompting for chown: exit status 1
<nil>```
#

wait wtf

#

the "with admin priviledges" got trimmed off

#

wait no it didnt im blind

austere talon
#
const fixPermsCommand = `do shell script "chown -R \"$USER:wheel\" '%s'" with prompt "Vencord Installer needs to fix Discord file ownership" with administrator privileges`

cmd := exec.Command("osascript", "-e", fmt.Sprintf(fixPermsCommand, path))
charred monolithBOT
olive barn
#

same thing

charred monolithBOT
austere talon
#

you'll figure it out

olive barn
#

whar

#

did i give it too restrictive perms?????/

austere talon
#

i mean

#

the chmod didnt work earlier either did it

#

try just sudo chmod ... in the terminal

#

does it work

olive barn
#

what chmod

#

sudo chown -R luna:wheel /Applications/Discord.app works

austere talon
#

but it doesnt work via osascript

olive barn
#

yea

#

making osascript run id -a

austere talon
#

it should just work

olive barn
#

what if i try it with sudo

#

still doesnt work???????

austere talon
#

uh

#
set c to "chown -R \"$USER:wheel\" '%s'"
do shell script c with prompt "Vencord Installer needs to fix Discord file ownership" with administrator privileges
#

try this

olive barn
#

should it just work with multilines?

austere talon
#

yes

#
const command = `
set c to "chown -R \"$USER:wheel\" '%s'"
do shell script c with prompt "Vencord Installer needs to fix Discord file ownership" with administrator privileges
`
#

this should work

olive barn
#

yeah but how do i run that thru console

hazy steeple
#

sudo SKULL_SKELETON
I somehow accidentally deleted the entire bin on a working server in an attempt to remove some library

olive barn
#

did i fuck up the permissions somehow

#

lemme try and get it to install as admin and try again

austere talon
olive barn
#

no thats canary

hazy steeple
#

wtf

#

my discord reloaded and deleted vencord

austere talon
#

that was me

#

your vencord privielges have been revoked

hazy steeple
#

And now it tells me to install PC version on PC version

hazy steeple
turbid hatch
#

you deleted your vencord install

#

lol

#

dont use the dev build if you dont know how to make it work

hazy steeple
#

you also block my PC discord

#

fun

turbid hatch
#

ur using $USER in admin context

olive barn
#

** **vns trolley

turbid hatch
#

which will always be root

#

:P

olive barn
#

...

#

oh

turbid hatch
#

applescript won't expand that

olive barn
#

i just made a new account and installed discord to test it

turbid hatch
#

try this script

olive barn
#

how can you have multiple imports with conflicting names

#

i tried to import runtime a bit ago and it conflicted with wails

turbid hatch
#

import * as WailsRuntime from "..."

hazy steeple
olive barn
#

in go

olive barn
turbid hatch
#
import (
    alias "thing"
)
olive barn
#

tysm

#

i got it to work!

turbid hatch
#
set discordPath to quoted form of POSIX path of "/Applications/Discord.app"
set username to do shell script "whoami"

do shell script "chown -R " & username & ":wheel " & discordPath with prompt "Vencord Installer needs to fix Discord file ownership." with administrator privileges
#

try this

#

oh

#

lol

olive barn
#

oh lmao

#

also this doesnt update until a refresh

charred monolithBOT
turbid hatch
#

yeah probably because the reactivity doesnt quite realise that it's updated

#

mac is still a bit funky

olive barn
#

ah

turbid hatch
olive barn
#

OH i never called onAction

#

whoops

turbid hatch
#

i'm gonna add something to the mac-specific build that calls into NSAppleScript instead of using the command line

#

because its a bit silly doing it this way

austere talon
turbid hatch
#

xd

turbid hatch
#

oh fuck

austere talon
#

cli is fine

turbid hatch
#

im gonna have to write objective-c code

#

fun

turbid hatch
austere talon
#

so what

turbid hatch
#

which doesnt make much sense

#

on mac that's a very big antipattern

austere talon
#
  • you can fix that fairly easily
turbid hatch
#

you cant

#

xd

#

it's hardcoded

austere talon
#

you can

turbid hatch
#

the part i'm talking about is the application name

austere talon
#
ln -s /usr/bin/osascript ~/.local/bin/banana
banana -e "..."
#

:)

turbid hatch
#

<application name>

<custom prompt>

Use Touch ID [...]

austere talon
#

it works

#

try it

turbid hatch
#

also i'm pretty sure mac follows symlinks specifically to prevent this?

#

im unsure

austere talon
turbid hatch
#

but i am not creating symlinks on people's PCs to evade mac's security measures lol that will get us branded as malware

austere talon
#

wrong

#

create symlink
invoke it
delete it

#

or just you know dont care about osascript name

turbid hatch
#

except NSAppleScript exists for the reason that applications are not meant to use the CLI to invoke applescripts

#

tbh we could just write this entire operation in go itself and then elevate as needed

#

instead of using applescript

austere talon
#

either write it in go or shell out to applescript

#

writing objective c is a terrible idea, do not do that

#

applescript is by far the easiest solution

olive barn
#

wrong video

austere talon
#

so just use it renxSHRUG

turbid hatch
#

i mean

#

i dont actually have to write objective-c

#

i can just use cgo

austere talon
#

you also say "just elevate"

#

yet the entire point of using osascript is its graphical password prompt

olive barn
#

wraa i hate obs naming scheme

austere talon
#

that you dont get in other ways

#

and no we will not make our own password prompt and feed it into the shell or whatever thats horrible

#

just use applescript cause it just works and is simple, don't overcomplicate it :P

turbid hatch
#

i was never ognna ask to write our own prompt

olive barn
turbid hatch
#

that is horrific and really shit for security

austere talon
#

yes

olive barn
#

how would a window get its own id?

austere talon
#

?

olive barn
#

for closeWindow

austere talon
#

i'd just leave it at that, it's fine

olive barn
#

but it leaves the error window open

charred monolithBOT
austere talon
#

like i said earlier

#

dont do it immediately

#

add a button to the info window

olive barn
#

oh i didnt see that

austere talon
#

only on click do it

#

otherwise users will be jumpscared by admin prompt

charred monolithBOT
olive barn
#

how would i use svelte components in an on:click

turbid hatch
#
//#cgo CFLAGS: -x objective-c
//#cgo LDFLAGS: -framework Foundation
//#include "applescript.h"
import (AppleScript "C")

func main() {
    script := AppleScript.CString(...)
    defer AppleScript.free(unsafe.Pointer(script))
    AppleScript.explode(script)
}
// applescript.h
#import <Foundation/Foundation.h>

void explode(const char *s) {
    NSString *script = [NSString stringWithUTF8String:s];
    NSAppleScript *applescript = [[NSAppleScript alloc] initWithSource:script];
    NSDictionary *errInfo = nil;
    [script executeAndReturnError:&errInfo];
}

SunglassesFluent

#

god objective c makes me hate myself

turbid hatch
#

it'd actually be that

#

because we have to do some memory management

hazy steeple
#

where findByCode("4.4408921e-16 C4.4771525,-1.77635684e-15 4.4408921e-16") finding element?

olive barn
turbid hatch
austere talon
#

why does it even say "thing u were trying to do"

turbid hatch
#

cause its hardcoded into the dialogue

#

lol

olive barn
#
let resolve: () => void;

function WaitForButton() {
    return new Promise<void>(res => {
        resolve = res;
    });
}

function ShowAdminPrompt() {
    resolve();
}```
#

and using #await WaitForButton()

austere talon
#

we already had it say the proper thing

turbid hatch
#

yeah but as in

#

that's the header part

austere talon
#

did that "regress" during whatever the library is called rewrite

#

oh i see

turbid hatch
#

the actual error message from the go/whatever side of things

#

is this bit

austere talon
turbid hatch
#

i have no idea if my weird go stuff works

#

but i want to compile it

#

and find out

#

lmfao

austere talon
#

btw there's a proposal that will make that better

olive barn
turbid hatch
#

this is purely my curiosity so

turbid hatch
austere talon
turbid hatch
#

in js its camelCaseLikeThis

austere talon
#

in javascript the convention is camel

turbid hatch
#

PascalCase is used to export functions publicly in go, so we need to use them for the bindings

olive barn
#

ahh

turbid hatch
#

objective-c still looks fucking stupid

austere talon
#
// js
function notExported() {}
export function exported() {}
// go
func notExported() {}
func Exported() {}
#

go is silly like that

tawny cipher
olive barn
tawny cipher
#

smh, OBS potatogun

olive barn
#

why is the icon shiggy

#

im on a different branch

turbid hatch
#

cache?

olive barn
#

maybe

#

yea it was

austere talon
#

whats try again as admin

#

is that still the chown or do you spawn the installer as root

#

optimally we wouldn't chown and instead spawn the installer as root

#

but idk how plausible

charred monolithBOT
olive barn
#

thats the chown

turbid hatch
#

both are undesirable imo

#

actually apple's own recommendation is to spawn a separate tool with admin to do the operation for you poi_think

austere talon
#

you could literally just spawn the cli

#

but cursed

#

I think we just chown who cares

turbid hatch
#

we're fixing the perms anyway

#

so

#

i dont think it realistically matters in the end

charred monolithBOT
#
[Vencord/WailsInstaller] New branch created: feat/cursed-applescript-testing
austere talon
turbid hatch
#

as in

#

it's incorrect that the discord app is the root user, no?

austere talon
#

idk

turbid hatch
#

it seems odd that it happens on some but not others

austere talon
#

I can't tell you why it happens

turbid hatch
#

so idk what the correct behaviour is

austere talon
#

well I think root owned is minority

olive barn
#

it always installs as user:admin(group)

#

but when the user installing isnt admin they dont have perms to edit it afterwards

#

here i have a ss of installing it as a test user

austere talon
#

huh?

austere talon
#

no

#

usually it's owned by your own user, but for some it's owned by root

#

root wheel instead of luna wheel

olive barn
#

wtf

austere talon
#

I think root owned makes more sense tbh cause its system wide apps

#

/Applications should be root owned and ~/Applications should be user owned

olive barn
#

yeah

#

discord goes to /Applications by default

hazy steeple
#

fav button (to quickly turn on and off the necessary plugins (idk why))

#

Looks ugly

#

maybe something like this

#

What do you think about it?

#

selected

spark cove
#

silly

charred monolithBOT
hazy steeple
#

idk why

torn knot
#

also, why not use this color (var(--yellow-300))? It would kinda look more on par with other areas inside discord that use that

hazy steeple
#

Now it looks like this

#

but i like your version better

#

update color

jagged cloak
#

ez ez

#

no silly list thing

austere talon
#

oh kinda real

hazy steeple
jagged cloak
#

vencord toolbox*

hazy steeple
#

Oh

#

Hm

#

And how to turn it on?

jagged cloak
#

its just a plugin

hazy steeple
#

then you need to change the toolbox plugin

jagged cloak
#

not hard

hazy steeple
#

I know

jagged cloak
#

since youre changing plugins list code anyway

hazy steeple
#

I just want good architecture

jagged cloak
#

lel

#

can even be in seperate pr if you want ig

hazy steeple
#

therefore, I suggest adding a separate method for external plugins in the toolbox plugin, through which you can add your items to the list

jagged cloak
#

which is what someone already did (does that pr exist still)

tawny cipher
#

might be mandela effect but isnt there just a field in definePlugin to add a toolbox entry

#

could've sworn that's a thing

jagged cloak
#

it is

#

that is typically for plugins adding their own actions though

#

unless you add a "settings" action to every plugin which is kinda just clutter

#

even though i did that for mine, since i change my settings a lot

hazy steeple
#

perhaps something like that:

toolboxPlugin.addMenu("fav plugins", [
  {
    name: "idk",
    callback: () => {}
  }
])
austere talon
#

what

hazy steeple
jagged cloak
#

what lo

austere talon
#

there is

jagged cloak
#

yeah i figured

austere talon
hazy steeple
#

oh wait

jagged cloak
#

me when its not clear what i was replying to

#

trol