#👾-core-development

1 messages · Page 146 of 1

junior olive
#

:)

limber skiff
#

he's making a video about it?

junior olive
#

yep

limber skiff
#

did he tell you lol

junior olive
#

yep

#

it's been discussed for like weeks now

limber skiff
#

damn huge traffic incoming

unkempt oak
#

ntts knew about decor when it was still vendetta-only

limber skiff
#

api about to go down

junior olive
#

nop

limber skiff
#

I had no idea vencord had that many active users that checked new updates so fast

woeful sable
#

Is there like documentation I can read? Or is it mainly just read source/other peoples plugins and go from there?

#

Perhaps it's because I've never attempted to write a plugin before but I'm struggling to understand the purposes of find match and replace , I'd like to delete a set number of messages sent by the user in a specific channel, I guess a purge plugin? I don't see what I'd use for those, since to me I don't think I'd be replacing any code?

limber skiff
#

find match and replace is meant to inject code into other discord code

woeful sable
#

I am thinking to create a toolbar icon thing for that though, main code is going to be using discords REST API

limber skiff
#

you likely does not need to use the rest api directly

woeful sable
#

I think I can use {RestAPI} from @webpack/common

limber skiff
#

discord already has methods that work as a wrapper around their rest api

#

and you can likely access those using webpack finds

woeful sable
limber skiff
#

no, for example discord has a sendMessage method

#

which internally calls the api, but also does other stuff along with it

#

deleteMessage, editMessage

woeful sable
#

yep

limber skiff
#

all of those exist

woeful sable
#

Oh you're telling me to look for a method, I can do that

limber skiff
#

but either way, for creating a toolbar button, find match and replace will be needed

#

you will need to inject a code that renders your react element in the toolbar code

woeful sable
#

Okay

#

Thank you for the help

limber skiff
#

look at the docs folder in the repo

#

you will understand what find match and replace does there

bitter hollow
#

is it possible to use third party plugins on web discord on firefox?

charred monolithBOT
gilded elm
#

i cant install vencord guys any help ?

spark pivot
#

vns

nimble pendantBOT
charred monolithBOT
frail skyBOT
#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Webpack Finds

None

Bad Starts

None

Discord Errors

None

woeful sable
#

Hi guys, I'm not sure what's going wrong with my plugin lol, I've managed to get it to appear in the plugins page, but I can't access it as an application command, like that of the MessageTags plugin. I seem to be doing things correctly, it builds with no errors.

#

In console it doesn't seem to error either

#

Yeah it says it registers the commands

woeful sable
#

Ye ngl I don't know

spark pivot
#

commands have to be in all lowercase, no spaces

#

not sure if that will fix it but that'd be my guess

cunning canyon
#

can have space

charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
charred monolithBOT
sharp venture
#

damn i might have to come and fix this game activity icon again

#

not sure how i feel about the iconography here, but i like their decision to highlight the icon in red

#

just easier to see from afar

crude raptor
#

i very much dislike their decision to highlight the icon in red

#

because a red muted icon already has a meaning, it means server-muted as apposed to self-muted

limber skiff
junior olive
#

btw dev is behind main now

sharp venture
#

i’m wondering if they’re actually equal sized now or something

limber skiff
#

I see

sharp venture
#

wonder if they ever cleaned up the stray vertices left on one side of one

#

but yeah short fix is just icon color state

sharp venture
crude raptor
#

no idea

crude raptor
#

wow that is

#

minor

sharp venture
#

hmm server muted bros losing i guess

charred monolithBOT
charred monolithBOT
charred monolithBOT
woeful sable
#

Used to use selfbots before and found purging as one useful utility

#

I apologise

#

What if I add sleep timers to avoid ratelimits, like having it wait after every request? I don't mind if its slow, or is that still considered spam

cunning canyon
#

selfbot = rule 9

woeful sable
#

And I'm referring to the plugin here 😭

spark pivot
#

It’s a selfbot. It’s against the rules.

austere talon
#

stop asking about it or you will be banned.

#

you will not get help with it here, it's against the rules

woeful sable
#

uhhh i have a question

#

when u stream off the rpc plugin, why doesnt the timestamp show on pc

#

it only shows on mobile

charred monolithBOT
smoky estuary
#
const Native = VencordNative.pluginHelpers["Hide Blocked Users"] as PluginNative<typeof import("./native")>;```

i did this in my `index.tsx` file but for some reason it didn't register the plugin helper. i have a `native.ts` file inside my plugin directory. did i miss something?
austere talon
#

and why tf does HideBlockedUsers need a native helper

smoky estuary
#

a couple of times but it only sent 2 items (OpenInApp and VoiceRecorder)

smoky estuary
austere talon
#

ic

#

show your folder structure please

smoky estuary
#
/*
 * Vencord, a Discord client mod
 * Copyright (c) 2023 Vendicated and contributors
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

import path from "path";

export const concatenatePath = (_, ...paths: string[]) => path.join(__dirname, ...paths);```

the contents of `native.ts`
austere talon
#

it should work

smoky estuary
#

for some reason my Native is undefined

austere talon
#

is that func all u need or is it just for testing

#

oh i see the issue

smoky estuary
#

it's just for testing to see if i really got how it works

austere talon
#

VencordNative.pluginHelpers.HideBlockedUsersPlugin

#

it used the folder name

shy veldt
#

@austere talon does vencord put stores on window or discord did it

smoky estuary
#

want my plugin index.tsx contents too?

#

maybe it would help somehow (?)

charred monolithBOT
smoky estuary
#

here (i ditched hide blocked users project because i didn't know how to deal with the issue where if i have for example 20 blocked users online and the plugin hides them then i see flickers in the member list, and it gets worse the more blocked users online you have :/)

#

maybe for some reason it skips the user plugins folder? i don't know anymore

#

i tried searching for the implementation of the OpenInApp and VoiceMessages ipc methods and maybe add mine there but couldn't find anything either (because from what i saw you initialize them dynamically)

#

btw i did a test and tried to log Native when my testComponent's being rendered rather than on plugin startup, but it's undefined too

austere talon
#

please send zip of ur plugin

smoky estuary
austere talon
#

works for me

#

you're likely basing ur work on ancient vencord

smoky estuary
#

for me it looks like that :/

#

i'm using canary as my dev environment btw, maybe that is the cause?

austere talon
smoky estuary
#

wait wait

#

where did you place the plugin's folder

#

userplugins or plugins?

austere talon
#

your vencord is outdated

#

show bottom of ur settings

smoky estuary
#

updated it and it worked

#

ty for the help :)

#

btw you know why whenever i remove a member from the member list it flickers the more members i remove from the list?

#

i changed the plugin folder's name to Hide Blocked Users but for some reason the ipc name didn't change, and is still HideBlockedUsersPlugin. why?

smoky estuary
austere talon
#

yes

smoky estuary
austere talon
#

dont do it like that

#

filter the list of members before its rendered

smoky estuary
charred monolithBOT
dapper crest
#

Still wokrs though, so just a linter issue

olive aurora
#

why does hideblockedusers need native and why not change the current plugin

charred monolithBOT
charred monolithBOT
pastel stone
#

I'm trying to dev a relative timestamp plugin but I'm struggling getting the correct match for the patch. At the moment it's there but I'd like it to be after the message timestamp. I've taken inspiration from PronounDB and been trying a few match but I can't manage to place it after the timestamp

#

At the moment I have this:

{
    find: "showCommunicationDisabledStyles",
    replacement: {
        match: /("span",{id:\i,className:\i,children:\i}\))/,
        replace: "$1, $self.changeTimestamp(arguments[0])"
    }
},
#

Pretty much what PronounDB has but the match I've been trying are failing

nimble plaza
#

you need the match to end at children

#

youre adding code after parenthesis

turbid hatch
#

don't do that, use the apis provided

#

i dont remember if it's accessories or decorations but we provide stuff to add things to messages

#

it's part of the mod

pastel stone
#

Why PronounDB isn't using that?

#

Intended?

lime stone
#

i don't think there's an api to append something next to the time

pastel stone
#

Yeah it doesn't seem like Accessory or Decoration is the way to go

#

I guess it's just about finding the right match now as the core feature works, but I don't understand how by using the same patch find and match than PronounDB my text doesn't end up just before it

pine topaz
#

@dapper tiger

junior olive
#

@austere talon how should I disable the settings component if the plugin is not enabled? Just check if the plugin is enabled in the react component and return null if it isn't enabled?

woeful sable
#

Guys what is

#

Flux

#

Fluxstore or something

nimble plaza
#

are you making a message purger

woeful sable
#

I just finished it

woeful sable
nimble plaza
#

thats selfbotting fear

#

you wont get help anywhere

woeful sable
#

😭

#

Dude I'm not trying to get help for it, was just asking what this was. The biggerstreampreview plugin uses it
import { FluxStore } from "@webpack/types";

#

Is this related to gateway events

turbid hatch
#

@woeful sable

charred monolithBOT
charred monolithBOT
charred monolithBOT
frail skyBOT
#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Webpack Finds

findByProps("getStatusColor", "StatusTypes")

Bad Starts

None

Discord Errors

None

limber skiff
#

😱

#

they didnt lie it is broken

frail skyBOT
#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Webpack Finds

findByProps("getStatusColor", "StatusTypes")

Bad Starts

None

Discord Errors

None

limber skiff
#

I can't commit to dev 🥲

austere talon
#

remind me to fix tmrw

limber skiff
#

aight

frail skyBOT
#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Webpack Finds

findByProps("getStatusColor", "StatusTypes")

Bad Starts

None

Discord Errors

None

#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Webpack Finds

findByProps("getStatusColor", "StatusTypes")

Bad Starts

None

Discord Errors

None

charred monolithBOT
#

Discord Account

No response

What happens when the bug or crash occurs?

When you load Discord up it doesn't want to load the plugin at all since I get tons of errors in the console log.

What is the expected behaviour?

Does NOT display the platform indicators on user profiles.

How do you recreate this bug or crash?

  1. Load Discord
  2. Go to anyone's profile and you can't see what platform they're on since it doesn't work.
  3. Simple.

Errors

65573.3d56d5600276...
austere talon
charred monolithBOT
charred monolithBOT
charred monolithBOT
mortal fractal
#

wouldve never guessed

charred monolithBOT
charred monolithBOT
wicked garden
#

BRO MY REQUEST IS BLOCKED AS A SPAM

#

I CANT SEE MY DECORATIONS

haughty atlas
#

vns

nimble pendantBOT
charred monolithBOT
charred monolithBOT
cunning canyon
#

plugin
look inside
css

charred monolithBOT
turbid hatch
#

on top of this it's not even implemented properly

#

you should use enable/disableStyle

austere talon
turbid hatch
#

shush

#

its what the pixel does

wind mantle
#

fancy seeing lewisakura here @turbid hatch thanks for giving me a reliable webhook proxy for my game on roblox 👍 saved our moderation team a dozen times

#

:3

turbid hatch
#

heh

#

small world

#

but no worries poi_thumbsup

wind mantle
#

v<

analog knoll
turbid hatch
#

sure thing, let me go check it out

#

although it seems like the PR is failing the test CI

#

let me check that first

#

right

#

yes, peak logic

#

thanks node

analog knoll
#

Interesting :D

turbid hatch
#

alright well

#

i'll ignore the CI for now

#

strange bug

#

i guess its because tsx updated and it wants to be used via import

analog knoll
#

try running the workfow on other PR

turbid hatch
#

nah if its broken on yours its broken for everyone

#

@analog knoll PR seems to work fine but does cause a flicker on start, but that's about in line with most applications anyway that want maximise + start as tray icon

#

you could fix it by hiding the app first, then on first open checking if we should set the maximise state

#

i'll post this on the review as well

analog knoll
#

Alright, I will do that

charred monolithBOT
turbid hatch
#

so

#

however you should only do this if the window was minimized by the settings option

#

so like

#
// some flag elsewhere
let alreadyMaximized = false;

// in the event handler
if (startMinimized && !alreadyMaximized && Settings.store.maximized) {
    mainWin!.maximize();
    alreadyMaximized = true;
}
#

along those lines

analog knoll
#

how do I get into the maximized mode before closing? I am sorry, are you using gnome or something like that :D I am on i3 and I am unsure if i can do it without forcing maximize to be true and even then I will not replicate your issue

turbid hatch
#

i'm on windows :P

#

though i dont think i3 has a maximize option

#

the entire point is that everything remains windowed

#

i can test it for you anyway when you implement

#

dw

analog knoll
#

I started GNOME and it seems like here it doesn't show any windows when maximized and starting as minimized with the current implementation.

turbid hatch
#

yeah, it wont, that's what it's doing atm (maximizing and then hiding the window)

#

but on windows, it'll cause a flash when maximizing and then hiding

#

on windows to maximize a window it needs to exist

#

so electron will show the window first before maximizing

#

because it cant do the show, maximize, and hide all at once, it will cause it to flicker

#

so the fix would be to maximize it when its first shown

analog knoll
#
mainWin.webContents.on("did-finish-load", () => {
        splash.destroy();

        if (Settings.store.maximized && !startMinimized && !isDeckGameMode) {
            mainWin!.maximize();
        }

        if (!startMinimized) mainWin!.show();

wouldn't this be the best solution then? it will not maximize if it should be minimized (preventing the flash on windows) and it will not maximize and then hide (causing the bug on gnome)

#

rather than storing a flag

turbid hatch
#

but then you are doing one or the other, no?

#

you're either showing the window maximized, or minimizing it only (therefore breaking the functionality)

#

that's why you should maximize it when the window is first shown

#

so, when startminimized is on

#

you should never show the window in the first place

#

then, when the window is shown for the first time by the user, you maximize it to keep the functionality of storing the maximized state

#

if startminimized is off, you just maximize the window like normal

analog knoll
#

oh I see @turbid hatch

if (isDeckGameMode) {
            // always use entire display
            mainWin!.setFullScreen(true);

            askToApplySteamLayout(mainWin);
        }

what to do with this part of the code? Shall it also start minimized on the steam deck - i am unfamiliar of how it behaves

export async function createWindows() {
    const { startMinimized } = Settings.store;
    const splash = createSplashWindow(startMinimized);
    // SteamOS letterboxes and scales it terribly, so just full screen it
    if (isDeckGameMode) splash.setFullScreen(true);
    await ensureVencordFiles();
    runVencordMain();
    let windowMaximized = false;

    mainWin = createMainWindow();

    mainWin.webContents.on("did-finish-load", () => {
        splash.destroy();

        if (!startMinimized) mainWin!.show();

        if (Settings.store.maximized && !windowMaximized && !startMinimized && !isDeckGameMode) {
            mainWin!.maximize();
            windowMaximized = true;
        }

        if (isDeckGameMode) {
            // always use entire display
            mainWin!.setFullScreen(true);

            askToApplySteamLayout(mainWin);
        }
    });

    mainWin.on("show", () => {
        if (Settings.store.maximized && !windowMaximized && !isDeckGameMode) {
            mainWin!.maximize();
            windowMaximized = true;
        }
    });

    initArRPC();
}

Here is the revised code

#

It'll only show & maximize initially if if it's not starting as minimized. Then, when the user clicks the tray icon / opens it anyhow it will again check for the maximized flag

turbid hatch
#

hm actually

#

there's a slightly better way of doing this

#
// we can just use `once` here so that it only runs on the first time we show the window,
// then we don't need a flag at all
mainWin.once("show", () => {
    if (Settings.store.maximized && !mainWin!.isMaximized() && !isDeckGameMode) {
        mainWin!.maximize();
    }
});
#

and re: steam deck - the minimized and maximized options should always be ignored if that flag is set

#

otherwise the app wont work properly

analog knoll
#

in renderer utils there is export const isLinux = platform.startsWith("Linux"); and the same for windows and mac. Would adding export const isDeckGameMode = process.env.SteamOS === "1" && process.env.SteamGamepadUI === "1"; there work?

#

Probably not since there is not process.env available in the renderer, not sure though

#

To disable the minimize option for the deck that is (or it could be handled like this if (!startMinimized || isDeckGameMode) mainWin!.show(); i guess)

#

alright it does not seem to be possible natively

export async function createWindows() {
    const { startMinimized } = Settings.store;
    const splash = createSplashWindow(startMinimized);
    // SteamOS letterboxes and scales it terribly, so just full screen it
    if (isDeckGameMode) splash.setFullScreen(true);
    await ensureVencordFiles();
    runVencordMain();

    mainWin = createMainWindow();

    mainWin.webContents.on("did-finish-load", () => {
        splash.destroy();

        if (!startMinimized || isDeckGameMode) mainWin!.show();

        if (isDeckGameMode) {
            // always use entire display
            mainWin!.setFullScreen(true);

            askToApplySteamLayout(mainWin);
        }
    });

    mainWin.once("show", () => {
        if (Settings.store.maximized && !mainWin!.isMaximized() && !isDeckGameMode) {
            mainWin!.maximize();
        }
    });

    initArRPC();
}

in that case the option will display even for deck users, it will not do anything though

turbid hatch
#

that's fine

#

because the deck has two modes where one of them it does work in

#

it just doesnt work in game mode

analog knoll
turbid hatch
#

that works perfectly

#

yep

charred monolithBOT
turbid hatch
#

lets see if that fixes it

#

much better

austere talon
#

qhar?

turbid hatch
#

node 18.19 pushed a breaking change

#

or, well

#

tsx doesn't run under 18.19

#

properly

#

it works fine under 18.18.2

#

which was what the CI used to be on

#

so i'm just pinning the version

austere talon
#

uhh

#

it told u what to do tho

#

why not just fix the error

turbid hatch
#

because

#

that's not us

#

we aren't invoking those flags

#

or invoking tsx like that

#

lol

austere talon
#

oh

turbid hatch
#

it's erroring when we're doing tsx scripts/build/build.mts

austere talon
#

fair enough

turbid hatch
#

it's an underlying bug in tsx itself i guess, and the recommended fix is just to either go back to 18.18.2 or seemingly skip ahead to LTS 20

#

the thing is tsx itself will run under 18.19 if you patch that out, so they're just throwing the error because they want you to load it a certain way instead of what most people do

#

but shrug

turbid hatch
#

still dont understand the point of self requesting a review xd

#

i clicked it as in "revise" cause i forgot you have to click review now

charred monolithBOT
austere talon
#

or whatever is latest stable node

turbid hatch
#

lts 20 yeah

#

i avoided that just in case but we can take a look at upgrading the engine

austere talon
#

merged too early

turbid hatch
#

did it? i tested it quite thoroughly and it worked alright

austere talon
#
  • start minimised should be under the autostart option
  • UX on steamos is questionable. the option is shown but ignored. you should consult with aa to see if the toggle should either be hidden or it should be enabled on steamos as well
turbid hatch
#

steamos is going to be difficult

#

you can run it both in game mode and in desktop mode

#

in desktop mode the option applies, whilst in game mode it cant because it would just break

#

can you tag aa

#

also it being under autostart is incorrect because it minimizes regardless of autostart or not, thats how i've been testing it

#

being under there implies that it only works when you autostart the app

#

we could totally make it do that though

austere talon
#

it's not about belonging together

#

it's about being related

#

they're both about the way vesktop starts

turbid hatch
#

then it should be startup behaviour

#

not autostart

#

in which case i can rename it

austere talon
#

and im not even sure start minimised in its current state makes sense

#

who tf wants to click the vencord icon and it starts minimised

#

start minimised only makes sense if it was an autostart imo

turbid hatch
#

then we need to differentiate it for an autostart vs someone clicking the icon

#

can we do that already?

austere talon
#

no but it's easy

#

but not backwards compatible

turbid hatch
#

that's a hard sell

charred monolithBOT
#

Host machine: KDE 5.27.9 on Fedora 39 with kernel version 6.7.0-0.rc4
Vesktop Details:
Canary 252986 (7b09f89)
Vencord 534ca1e (Vesktop V0.4.4)
Electron 27.1.2
Chromium 118.0.5993.144
Linux 64-Bit

Issue: In the Flatpak of Vesktop, the rich presence simply doesn't work, even though Rich Presence is enabled in the Vesktop Settings, I've tried with a lot of games that support it like A Hat in Time, Just Shapes & Beats, etc... However when I switch to the RPM package, RPC ...

austere talon
turbid hatch
#

ah

#

well

#

we have to rewrite this anyway

#

to use dbus

turbid hatch
#

i'll work on it

austere talon
#

why does clicking it once immediately do that

#

i wanted to check if reverting it reopens the pr

turbid hatch
#

cuz thats what you told it to do :P

#

it doesnt

#

afaik

charred monolithBOT
#

i don't think this feature makes much sense in its current state. who would want to explicitly open vesktop and have it open minimised? when you open it with an explicit action, you want it to be usable immediately

the only case where users realistically would want vesktop to start minimised is if the action was implicit, so via the start with system option. i think this option should be reworked to be exactly that

turbid hatch
#

why are there so many dbus libraries that

#

are just dead

#

ugh

austere talon
#

do we even need it

#

see if electron offers it

turbid hatch
#

yes

#

it doesnt

#

electron itself uses dbus but you cant use it from node

austere talon
turbid hatch
#

because on linux there are numerous different ways of triggering an autostart

#

and there's no one agreed standard

#

on mac and windows there are a couple and the standard is usually setting a system property

analog knoll
turbid hatch
#

it does but what ven has flagged is that it happens when you just run the app as normal

#

which in retrospect, yes, is a bad idea

austere talon
#

they just need to implement org.freedesktop.portal.Background

turbid hatch
#

which doesnt always exist

#

because its not part of every linux distribution

#

because not everyone uses that

#

this is the one issue with linux

#

you have a standard, but not everyone has it, so you cant use it in a guaranteed way

#

GNOME and KDE provide it, but other desktop environments might not

#

hell, it wont even work all the time in flatpak

#

so we'll just have to live with that

#

dbus -> fallback to .desktop file -> cry

#

is the flow it seems

austere talon
#

i can't even find the spec page for that portal guh

analog knoll
turbid hatch
#

i'll be implementing it, dont worry

#

i need to do other things anyway

#

but for future ref

#

src/main/autoStart.ts

crude raptor
#

im bored and watching this happen so whats up

#

just curious

austere talon
#

it's fairly trivial to rework the feature to only be at autostart

turbid hatch
#

i mean yeah ive done it

#

const shouldStartMinimized = Settings.store.startMinimized && autoStart.wasAutoStarted();

austere talon
#

just make the autostart implementation launch it with a flag

turbid hatch
#

for windows and mac its trivial

#

wasAutoStarted: () => app.getLoginItemSettings().wasOpenedAtLogin,

#

electron provides that

#

for linux yeah i'll just use a flag and check for the presence of it

austere talon
#

we could just write our own native module

turbid hatch
#

for dbus?

#

@topaz thistle YOUR TIME IS NOW

#

VENBUS

austere talon
#

we don't need curve

#

i can write it

turbid hatch
#

FALSE ALARM

topaz thistle
#

sadge

austere talon
#

(ofc u can help too)

turbid hatch
#

i mean dbus is easy enough i think

#

i can help out with its implementation

austere talon
#

i would just use libdbus and write a super basic module

turbid hatch
#

uhhhh

#

libdbus is a library for other people to write libraries for

#

you should use a binding

#

If you use this low-level API directly, you're signing up for some pain. —official API documentation

austere talon
#

oh didn't look far enough

#

then yeah some wrapper

#

i literally just googled for like 5 seconds

turbid hatch
#

there are four for c++

#

dbus-cxx

#

which is

#

uhhh

austere talon
#

HELP I LOOKED AT THE DBUS TUTORIAL AND WHY IS IT JAVA

turbid hatch
#

not maintained

#

DONT LOOK AT THE JAVA WRAPPER THEN

#

dbus-cpp is not maintained

#

dbus-c++ is not maintained

#

hey! the last one is

austere talon
#

actually idk if it's actually java but this looks a lot like java

Message message = new Message("/remote/object/path", "MethodName", arg1, arg2);
          Connection connection = getBusConnection();
          connection.send(message);
          Message reply = connection.waitForReply(message);
          if (reply.isError()) {
             
          } else {
             Object returnValue = reply.getReturnValue();
          }
turbid hatch
#

sdbus-cpp

#

id need the context

turbid hatch
#

that is java pseudocode

#

IT COULD'VE BEEN VALA HOW WOULD I KNOW

#

anyhow

austere talon
#

freedesktop recommends GDBus

turbid hatch
#

yeah

#

if you only want gnome/gtk to use it

#

sdbus-c++ seems to be independent

austere talon
#

?

#

it works for anything

turbid hatch
austere talon
#

no

#

GLib is a bundle of three (formerly five) low-level system libraries written in C and developed mainly by GNOME. GLib's code was separated from GTK, so it can be used by software other than GNOME and has been developed in parallel ever since.

turbid hatch
#

oh okay

#

sorry it's confusing because the documentation literally says "gdbus uses GIO streams"

#

which is a gtk thing

austere talon
#

it's just GLib (not to be confused with glibc)

turbid hatch
#

too many things

#

ugh

#

okay so

#

gdbus

austere talon
turbid hatch
#

funnily enough

#

just looking at that

austere talon
#

but also

#

could we just use dbus-send

#

via shell

turbid hatch
#

dont think its available in the flatpak

#

due to sandboxing

#

yeah

#

the SDK includes it but not the runtime

#

dbus-send is considered a debugging tool

austere talon
#

are you sure?

#

it's part of dbus

turbid hatch
#

The Freedesktop SDK (on which many others are based), includes a range of debugging tools, such as gdb, strace, nm, dbus-send, dconf, and many others.

#

you have to install the debug version of an app explicitly

#

otherwise you dont get those tools

austere talon
#

source?

turbid hatch
#

flatpak debugging documentation

#

:P

austere talon
#

can u just try it

flatpak run --command=sh dev.vencord.Vesktop
turbid hatch
#

it works, yes, but requires dbus-send on the host from what i can see

#

it matches my host version which is out of date

#

which requires people to install dbus-tests in most cases

austere talon
turbid hatch
#

it wont

#

some distros package it separately

austere talon
#

such as?

turbid hatch
#

ubuntu

austere talon
#

fedora doesn't
ubunru doesn't

turbid hatch
#

this contains dbus-send

austere talon
#

Provided by: dbus_1.12.16-2ubuntu2_amd64

turbid hatch
#

what

#

so there's two ubuntu packages that package dbus-send?

#

what the fuck?

austere talon
#

girl

#

dbus-tests depends on dbus...

#

and dbus contains dbus-send

turbid hatch
#

yes, but dbus-tests CONTAINS

#

dbus-send

#

as in

#

THE ACTUAL BINARY

austere talon
#

where does it say that

turbid hatch
#

lemme show you

#

wait wh

#

okay i have obviously gone completely insane

#

nevermind then

austere talon
#

LOL

#

😭

#

i will test too

#

using dbus-send is kinda dirty but if its just for one thing its a lot saner than bundling an entire dbus lib imo

turbid hatch
#

came up when i googled flatpak dbus-send

austere talon
#

WHY IS DNF SYNC SO SLOW

#

FUCK NVIDIA DRIVER WTF

#

I DONT EVEN HAVE NVIDIA

#

how do i remove the repo lmao

turbid hatch
#

dnf config-manager

austere talon
#

fuck u

#

ya its there

turbid hatch
#

can u try --command=dbus-send too

austere talon
#
[📦 dev.vencord.Vesktop ~]$ dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames
method return time=1702134262.724832 sender=org.freedesktop.DBus -> destination=:1.180 serial=4294967295 reply_serial=2
   array [
      string "org.freedesktop.DBus"
      string ":1.23"
      string ":1.58"
      string ":1.67"
      string ":1.69"
      string ":1.180"
      string "org.freedesktop.portal.Desktop"
      string "org.freedesktop.portal.Documents"
      string "org.freedesktop.portal.IBus"
      string "org.kde.StatusNotifierWatcher"
   ]
austere talon
turbid hatch
#

according to flatpak's documentation, it shouldnt!

#

it says here you need to install the debug version of the app or use --devel to run the SDK as the runtime

#

because the freedesktop runtime doesnt provide the debug tools, the SDK does

#

so im now really really confused

austere talon
#

its true for the other tools

#

but not dbus-send

#

cause dbus-send aint a development tool

turbid hatch
#

flatpak says its a development tool

#

😭

austere talon
#

it can be used as one

#

but isn't exclusively one

turbid hatch
#

as in

#

the SDK includes it

#

and not the runtime

#

that's what it says

austere talon
turbid hatch
#

and its confusing

#

:(

turbid hatch
#

:P

#

steam using it and stuff not working

#

Looks like runtime is now also not shipping dbus-send at all.

#

I wonder why Steam uses dbus-send at all. They clearly do other dbus calls without invoking the cli program.

#

gonna be honest

#

we could, but it might cause issues for some people

#

where it might not be present at all

#

it could be present for us because we have the SDK installed

#

it could be something else

#

i dont know, but its clear some people just dont have it at all but have dbus

austere talon
#

oh should we add this to vesktop

#

is it not already included in all? this ui is kinda confusing

turbid hatch
#

i think device=all is peripheral hardware

#

and on flathub it says hardware devices like webcams or gaming controllers

#

not "can access hardware"

#

so i dont think its included

austere talon
#

i would just use dbus-send

#

if we get complaints it doesn't work we can still change it later.

#

we could also just ask some people who just use flatpak normally

turbid hatch
#

alright let me write something for dbus send

austere talon
#

btw lewi can u add a webhook to the flatpak repo?

turbid hatch
#

nop

#

no rights

austere talon
#

lame

#

do u have a way to contact someone with rights btw

turbid hatch
#

oh

#

we cant use dbus-send

#

it doesnt support the type

austere talon
#

r u sure

turbid hatch
#

D-Bus supports more types than these, but dbus-send currently does not. Also, dbus-send does not permit empty containers or nested containers (e.g. arrays of variants).

#

a{sv}

#

nested container

#

array of structs

#
RequestBackground (
  IN parent_window s,
  IN options a{sv},
  OUT handle o
)
austere talon
#

r u sure

turbid hatch
#

yes

#

you cant even make a struct

#

oh sorry

#

thats a dictionary

#

you can make a dictionary but you cant put it in an array

#

cause it uses the same syntax as making arrays

#
  • <container> ::= <array> | <dict> | <variant> so you cant nest them
austere talon
#
[:package: dev.vencord.Vesktop ~]$ dbus-send --session --dest=org.freedesktop.portal.Desktop  --type=method_call --print-reply /org/freedesktop/portal/desktop org.freedesktop.portal.Background.RequestBackground
#

just need to add args

turbid hatch
#

yeah but how are you going to pass the parmaeters if you cant type them because the cli doesnt support them

#

:P

#

it explicitly states in the manual you cant do what we need to do

austere talon
#

oh wait

#

flatpak also has gdbus cli

#

and gdbus cli does support it

turbid hatch
#

yep

#

seems to

#

is it included in the runtime though

austere talon
#

i have it

#
gdbus call --session \
           --dest org.freedesktop.portal.Desktop \
           --object-path /org/freedesktop/portal/desktop \
           --method org.freedesktop.portal.Background.RequestBackground \
           banana \
           { autostart: TRUE, background: TRUE, commandline: ... } 
charred monolithBOT
austere talon
#

idk if thats good or bad

#

idk how we get parent_window id tho

turbid hatch
# austere talon idk how we get parent_window id tho

Under X11, the “parent_window” argument should have the form x11:<XID>, where <XID> is the XID of the application window in hexadecimal notation.

Under Wayland, it should have the form wayland:<HANDLE>, where <HANDLE> is a surface handle obtained with the xdg_foreign protocol.

#
gdbus call --session \
           --dest org.freedesktop.portal.Desktop \
           --object-path /org/freedesktop/portal/desktop \
           --method org.freedesktop.portal.Background.RequestBackground \
           "..." \
           { autostart: TRUE, commandline: [ "${process.execPath}", "--autostart" ], reason: "User request" } 
austere talon
#

reason: "user enabled autostart in vesktop settings"

#

but still no clue what to make the parent window id

#

wonder if it even matters or is just best practice?

austere talon
#

or is it actually absolutely a must to be that

turbid hatch
#

h

#

For other windowing systems, or if you don’t have a suitable handle, just pass an empty string for “parent_window”.

#

does say this

#

so we could just do a blank

#

its cause it shows a dialog so it wants to know about the app

#

but in the context that its happening its fine

#

since its from a user interaction

#

it'll probs look okay

austere talon
#

does it actually show a dialog?

#

it didn't for me O.o

turbid hatch
#

it "should"

#

apparently

#

depends on the compositor

#

anyway i think you should turn autostart off again

austere talon
turbid hatch
#

cause it might open a shell every time you start now xd

#

there isnt a method

#

that lets you read

#

only write

#

it seems to be up to the app to keep state

austere talon
#

try same command but gdbus introspect

#

instead of call

#

but we could also just keep state it shouldn't be too hard

turbid hatch
#

im reading it off of the docs

#

so

austere talon
turbid hatch
#

but it seems to only write

#

I DONT HAVE

#

LINUX

#

INSTALLED

austere talon
#

noob

#

install rn

turbid hatch
#

I HAVE WSL

#

WHICH DOESNT HAVE IT

austere talon
#

how did u test the earlier

turbid hatch
#

i can run dbus

austere talon
#

horrrro

turbid hatch
#

but it doesnt have the freedesktop portals

#

cause there's no DE

austere talon
turbid hatch
#

NO

#

DETONATE

austere talon
#

dual boot

#

u must...

turbid hatch
#

(i'll install in a vm)

austere talon
#

why no dualboot...

#

u just need like 20gb

turbid hatch
#

i need naother drive

austere talon
#

why

turbid hatch
#

im using all of my 2tb one

#

for stuff

austere talon
#

girl

#

you have free space, no?

turbid hatch
#

I HAVE ALLOCATED THAT FREE SPACE FOR FUTURE PURPOSES

#

I CANNOT

austere talon
#

shrink one of ur partitions by 20gb

#

u must

turbid hatch
#

later

#

vm first

austere talon
#

GET A USB STICK AND INSTALL ON USB

turbid hatch
#

NOT NOW

#

IM IN A MEETING

#

SHUT

austere talon
#

i will buy u a usb stick dm me ur address

turbid hatch
#

ok

austere talon
#

i will send u my 16kb usb stick

#

ill test it later!!

#

in the bathroom now so I can't

#

gonna shower and shtuffs

crude raptor
#

shower? terrifying

#

(i am going to do it tomorrow)

austere talon
#

do u reckon the portals will work on termux

austere talon
crude raptor
#

I AM STINKY BUT IF I DO IT TOMORROW ITS BACK ON SCHEDULE

analog knoll
charred monolithBOT
turbid hatch
#

@austere talon so confused on this rating system

#

xd

#

i guess its cause theres not enough yet

austere talon
#

is that vesktop orr

turbid hatch
#

yeah

austere talon
#

how do u check

#

the flathub site doesn't show it

turbid hatch
#

just using fedora software

#

stolre

austere talon
#

im gonna murder whoever voted not 5 stars

turbid hatch
#

no one did

#

thats the thing

#

the 3 reviews are 5 stars

#

xd

long stream
#

the flatpak tax

austere talon
#

we already have 1k downloads somehow btw

turbid hatch
#

magic

long stream
#

the children yearn for a better discord linux client

turbid hatch
#

btw ven

#

when i was installing fedora

#

it crashed immediately

#

literally went into a fullscreen crash prompt saying it couldnt recover from an error

wise cedar
#

ven, last time i used fedora my whole computer turned into an easy bake oven

#

ven what (os)do you personally use on a daily basis

turbid hatch
#

hi from fedora

austere talon
#

GOOD

austere talon
turbid hatch
#

i tried installing flameshot and dnf is not responding

#

help

austere talon
#

lol what 😭

turbid hatch
#

there we go

austere talon
#

oh you're saying flameshot froze

#

not dnf

turbid hatch
#

no

#

dnf froze

#

i had to ctrl+c it

austere talon
#

ohh

#

ok

turbid hatch
#

but it installed flameshot anyway

austere talon
#

why u even using flameshot

turbid hatch
#

it got stuck on "installing packages"

austere talon
#

it's kinda shite on wayland

turbid hatch
#

cause its the only screenshot tool i know xd

austere talon
#

there's a preinstalled tool on gnome..

#

hit prnt scr

turbid hatch
#

i

#

dont have a prntscr key

lime stone
#

one annoyance of using the flatpak, btw, is file drag and drop gives a confusing error

turbid hatch
#

GNOME DOESNT SUPPORT F13???

#

WHAT THE FUCK

#

HOW DO I SET IT THEN AS A KEYBIND

lime stone
#

i wonder if there's a way to allow arbitary files to be dropped and get their contents with flatpak

turbid hatch
#

no

lime stone
#

no?

turbid hatch
#

no

#

that defeats the point of flatpak

#

it's a sandbox, you can only access what you're allowed to

#

you cant suddenly request access to an arbitrary file

lime stone
#

not rly

turbid hatch
#

..yes

lime stone
#

for example if you use Upload a File literally any file works

turbid hatch
#

because that goes through a file picker

#

not a drag and drop mechanism that accesses an arbitrary file

#

that file picker is flatpak supported

#

its implemented using portals

#

we can't do that with the drag and drop system

lime stone
#

couldn't they in theory create a temp file for dropped files

#

😭

turbid hatch
#

us and what /tmp access

turbid hatch
#

and no

austere talon
#

flatpak supports drag and drop

#

u can just drag and drop files and it'll work

lime stone
#

only from folders the app can access

turbid hatch
#

the drag and drop in discord however is not flatpak supported

#

because that's implemented differently

austere talon
turbid hatch
#

you have to use upload a file

lime stone
#

that's what lewi was basically telling me :P

turbid hatch
#

if it's not within the flatpak sandbox

#

we're testing it now

austere talon
#

qhar?

#

it works oob on electron

lime stone
#

so confused

long stream
#

flatpak horror

turbid hatch
#

it can read the file name

#

because it gets that

woeful sable
turbid hatch
#

it cant read the content

#

if its outside of the sandbox

austere talon
#

no

turbid hatch
#

literally

#

what i just demoed

#

ven

#

pls

lime stone
turbid hatch
austere talon
#

youre just wrong

turbid hatch
#

VEN

#

LOOK

#

READ

#

THAT'S FROM /ETC

#

WHERE IT DOESNT HAVE ACCESS

lime stone
#

huh works from images

turbid hatch
#

PLEASE

#

I BEG

turbid hatch
lime stone
#

@turbid hatch are you okay there /lh

turbid hatch
#

sorry

long stream
#

the issue isn't there if you gaslight yourself enough

turbid hatch
#

xdg-pictures access

lime stone
#

lol

turbid hatch
#

those are the folders it can access + downloads folder

austere talon
#

it literally works

turbid hatch
#

which i cut out of the picture for some reason

austere talon
#

ignore the horrible lag thats some weird bug with discords tab shit

turbid hatch
#

you

#

arent uploading the file

#

and the fact there isnt a preview literally proves it cant read it

austere talon
#

NO

turbid hatch
#

send the message

austere talon
#

theres no preview cause of the shitty lag

turbid hatch
#

then send the message

#

:(

#

the attachment gets added but you cant send

lime stone
turbid hatch
#

because it cant READ the attachment

lime stone
turbid hatch
#

then try it with the upload a file dialog

#

and it should work fine

lime stone
#

i wondered if there was a portal like thing for drag n drop

austere talon
#

for some reason discord gets 5 million tab inputs and it freezes the app so hard

turbid hatch
lime stone
#

haha

austere talon
lime stone
#

L

turbid hatch
turbid hatch
#

but i cant send it if its drag and drop

#

thats from the fedora iso

#

do it not from the home folder, try something like /tmp

austere talon
#

IT DOESNT HAVE HOME ACCESS

turbid hatch
#

well either way

#

i literally just proved it doesnt work

#

so

long stream
#

the amount of jank in one video omg

turbid hatch
#

how do i record

austere talon
#

stop talking

#

you are just plain wrong

#

drag and drop works

lime stone
turbid hatch
#

i dont have printsc

austere talon
#

it gives the flatpak access to the file youre dropping

turbid hatch
#

IT LITERALLY

#

DOESNT

#

VEN

#

I JUST

#

PROVED IT

lime stone
turbid hatch
austere talon
#

drag and drop is janky but it works.

turbid hatch
#

thanks obs

#

literally UNDENIABLE PROOF

#

that drag and drop does not WORK

lime stone
#

lol

#

it's not very good proof if it won't load

turbid hatch
#

give it a sec

long stream
#

can't wait to see the proof

lime stone
#

ur lying

long stream
#

so exciting

turbid hatch
#

there it processed

lime stone
#

fake screenshot

placid wave
long stream
#

also wtf how is a 1080p video only 3 mbs

lime stone
placid wave
#

drag and drop into discord is very fucky on wayland

#

including with vesktop

#

running it natively under wayland using the ozone shit fixes it

#

i cant do that since it keeps my gpu awake

turbid hatch
long stream
turbid hatch
#

goodnight fedora

#

oh for fuck sake

long stream
#

bro got hit with windows update

placid wave
#

trol

#

fedora offline updates are terrible

#

my server pis wont run a full update to fedora 39 because their offline updater shits itself

turbid hatch
#

my understanding is that discord reads the file later

#

not when its dropped

#

hence why it says it gets zero content

#

because when you drop it, it flags up an error saying "oh i cant read it"

#

OH

#

BECAUSE THEY USE A NATIVE MODULE TO DO IT

#

I BET

#

AND NOT THE BROWSER

placid wave
#

i dont think they use a native module for drag and drop

#

could be wrong

turbid hatch
#

they would do for clipping

charred monolithBOT
placid wave
#

true yes

#

we do a little forgetting

turbid hatch
#

right

#

then i dont know

turbid hatch
#

This is a major usability issue right now. Thanks to the file system portal, opening a file works even if the file system permission is very limited. However, drag & drop is broken in that case: The application gets the file system path on the host system, but permission to that file is denied.

#

VEN

#

I AM

#

GOING TO STRANGLE YOU

#

YOU

#

YOU LITTLE

#

IT WAS LITERALLY WHAT I JUST DESCRIBED

#

LDJFGLNSFANSD89HAS98DNAONFJLKDNFLGJKNSOAUHA987HDSUIOH

#

yes

#

so it

#

causes the behaviour that i just quoted

#

:3

#

THEREFORE

#

girl

#

im not writing a pull request for electron

#

i'll spend more time refactoring than actually implementing the feature

#

okay

grave mangoBOT
#

**extension.js: **

import { Extension } from 'resource:///org/gnome/shell/extensions/extension.js';
import * as Main from 'resource:///org/gnome/shell/ui/main.js';

export default class FocusMyWindow extends Extension {
    enable() {
        this._handlerid = global.display.connect('window-demands-attention', function (display, window) {
            Main.activateWindow(window);
        });
    }

    disable() {
        global.display.disconnect(this._handlerid);
        this._handlerid = null;
    }
}

long stream
#

wtf are those imports

woeful sable
#

someone have css to get back old icons?

crude raptor
#

try looking

woeful sable
#

thx

charred monolithBOT
austere talon
#

girl i marked that reply as off topic for a reason

charred monolithBOT
shut ridge
#

if i want to pr to vencord - do i base my change on dev or main?

spark pivot
#

dev

shut ridge
#

(i have the most laughable contribution to make)

austere talon
#

it doesn't matter

#

generally dev but both work

frail skyBOT
#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Webpack Finds

findByProps("getStatusColor", "StatusTypes")

Bad Starts

None

Discord Errors

None

#
Bad Patches

NoTrack (found no module):
ID: -
Match: window.DiscordSentry=

Bad Webpack Finds

findByProps("getStatusColor", "StatusTypes")

Bad Starts

None

Discord Errors

None

shut ridge
#

haha i unfucked it

austere talon
#

vencord is kinda fragile

#

it's easy to accidently break it

#

because of how early our code runs, trying to use webpack search on top level EXPLODES EVERYTHING

shut ridge
#

i was just trying to use a webpack common module outside of plugin context (in the renderer)

#

yeah exactly that

#

i fixed though

austere talon
#

that's what ur plugins onStart, webpack.waitFor and webpack.onceReady are for

shut ridge
#

start guarantees that the module should be ready yeah?

austere talon
#

start runs once a gateway connection has been established, aka once the user has logged in. by that time the core webpack modules are ready yes

charred monolithBOT
austere talon
#

rip plugin template lmao

charred monolithBOT
shut ridge
#

taadaa

shut ridge
#

muh comments