Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 little changes #9

Open
katschuba opened this issue Apr 16, 2022 · 11 comments
Open

2 little changes #9

katschuba opened this issue Apr 16, 2022 · 11 comments
Labels
enhancement New feature or request

Comments

@katschuba
Copy link

Hi,
first of all: Very nice tool!

2 ideas for improvement:
1st: Could you make it that the name of the game comes up first, and then the console I'm playing it on? So others can see at a glance on the memberlist which game I'm playing.

2nd: MacOS. Coloring the icon black, when the menubar is in daylight mode, so that it fits to all the other icons 😁

@pelicanfuture
Copy link

Yeah, I also support your 1st idea as well, it would make the status be similar to the built-in Xbox Live and PSN statuses where the game shows up first, then the console you're playing on when you click on the discord profile.

@MCMi460
Copy link
Owner

MCMi460 commented Apr 18, 2022

As far as I know, the first is impossible with Discord's current method of rich presence applications. The name of the "Playing" status is taken from the application's name, and it would be a bit too much for me to create over 5,000 separate developer applications for each Nintendo Switch game.
As for the second one, I'll certainly work on that. I believe there is a native MacOS method for dynamic status bar icons, but I'm not certain that PyQt5 supports it. Worst case scenario, I'll just make a separate icon and load it depending on the system theme.
I'll keep this issue open until I finish the second change.

@MCMi460 MCMi460 added the enhancement New feature or request label Apr 18, 2022
MCMi460 added a commit that referenced this issue Apr 19, 2022
@MCMi460
Copy link
Owner

MCMi460 commented Apr 19, 2022

Should work properly now.

  • There is an issue with detecting transparent menubars, but that would be more of a hassle than I'm willing to deal with.
  • Another thing to note is that the icon is not dynamic if the system theme is changed mid-process. It will require an app restart as the check only occurs at startup.

Please comment on this issue if any problems arise.
Thank you!

@MCMi460 MCMi460 closed this as completed Apr 19, 2022
@katschuba
Copy link
Author

Thanks man, very nice!
When can we expect the new release-version to download?

@MCMi460
Copy link
Owner

MCMi460 commented Apr 19, 2022

I still have a few things to touch-up on, but probably on Friday.
If you want, you can always build to an app using the scripts/build.sh script on the development branch.

@samuelthomas2774
Copy link

1st: Could you make it that the name of the game comes up first, [...]? So others can see at a glance on the memberlist which game I'm playing.

As far as I know, the first is impossible with Discord's current method of rich presence applications. The name of the "Playing" status is taken from the application's name, and it would be a bit too much for me to create over 5,000 separate developer applications for each Nintendo Switch game.

I've created Discord applications for most Nintendo-published games: https://github.com/samuelthomas2774/nxapi/tree/main/src/discord/titles. @MCMi460 I don't mind you using these as well; pypresence seems to support disconnecting/reconnecting to Discord with another client ID. Anyone can create an issue on my repo to suggest any other titles (only for more popular games though, like @MCMi460 I'm not creating 100s/1000s of Discord applications).

Discord actually fetches the application name and sets it as the activity name locally, so with a modified/custom client (e.g. discord.js) we could just pass the name to Discord. There's also an API for this but it's restricted to Xbox Live, PlayStation and a few others.

@MCMi460
Copy link
Owner

MCMi460 commented Apr 22, 2022

I've created Discord applications for most Nintendo-published games: https://github.com/samuelthomas2774/nxapi/tree/main/src/discord/titles. @MCMi460 I don't mind you using these as well [...]

Ah, thank you @samuelthomas2774! I'll add this soon.

Discord actually fetches the application name and sets it as the activity name locally, so with a modified/custom client (e.g. discord.js) we could just pass the name to Discord. There's also an API for this but it's restricted to Xbox Live, PlayStation and a few others.

I'd prefer not to attempt to bypass Discord's decisions. If I really wanted to do something like this, I'd instead just bundle a bare-bones self-bot script inside NSO-RPC, log into the user's account, and make the activities.write API calls manually. That's very interesting, though, thanks for telling me!

@MCMi460 MCMi460 reopened this Apr 22, 2022
@samuelthomas2774
Copy link

I've created Discord applications for most Nintendo-published games: https://github.com/samuelthomas2774/nxapi/tree/main/src/discord/titles. @MCMi460 I don't mind you using these as well [...]

Ah, thank you @samuelthomas2774! I'll add this soon.

I have a script to export these as JSON/CSV, so they can be fetched at runtime, as they are written in TypeScript to allow for custom behaviour (just remember to cache the data for a few days if you do this 😄). I might change the format slightly so don't use these links yet.

URL -
https://nxapi.ta.fancy.org.uk/data/discord-titles.json JSON
https://nxapi.ta.fancy.org.uk/data/discord-titles-compact.json JSON without Discord activity configuration
https://nxapi.ta.fancy.org.uk/data/discord-clients.json JSON with Discord app data
https://nxapi.ta.fancy.org.uk/data/discord-titles.csv CSV
https://nxapi.ta.fancy.org.uk/data/discord-titles-compact.csv CSV without Discord activity configuration

I'd prefer not to attempt to bypass Discord's decisions. If I really wanted to do something like this, I'd instead just bundle a bare-bones self-bot script inside NSO-RPC, log into the user's account, and make the activities.write API calls manually. That's very interesting, though, thanks for telling me!

Same. I tried using the activities.write OAuth scope but it just rejects it (after allowing me to authorise it) - hopefully Discord will open this API soon, it would also mean this would work without having Discord open, and also for other non-desktop platforms (e.g. mobile games).

@katschuba
Copy link
Author

@MCMi460 Installed the new version. Works fine so far. 👍
But could you change the behaviour of the titlebar-buttons?
Currently the menubar icon is only visible when hitting the close button of the settings window.
I would prefer red-button (close) for quitting the app and yellow-button (minimize) for minimizing to the menubar.
And in addition it would be cool if when minimized, the app is hidden from dock and only visible in the menubar.

@jrub1
Copy link

jrub1 commented Jul 17, 2022

+1ing the idea of the app being hidden on the dock! Great app so far, thank you!

@MCMi460
Copy link
Owner

MCMi460 commented May 26, 2023

In the same vein as #63, I am considering adding the game's name status support for games over Discord presence, though it may be some time before that comes to being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants