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

Change icon #66

Closed
tristiisch opened this issue May 19, 2019 · 8 comments · Fixed by #69 or #75
Closed

Change icon #66

tristiisch opened this issue May 19, 2019 · 8 comments · Fixed by #69 or #75
Assignees
Labels
feature request This issue proposes a new feature

Comments

@tristiisch
Copy link

tristiisch commented May 19, 2019

Is it possible to change the basic language icons?
Is it possible to choose one icon per project?
If not, can you add this feature? Or explain where to add this to your code? I would be happy to do that.

And to add a default icon, at the moment, they is no icon:
image

@echebbi echebbi added the feature request This issue proposes a new feature label May 20, 2019
@echebbi
Copy link
Owner

echebbi commented May 20, 2019

Hi,

Not currently...

It is currently impossible to dynamically add new icons. In order to add a Rich Presence for Eclipse IDE I had to create a dedicated Discord application. Each application can have up to 150 assets, uploaded by the developer, and only these can be displayed as icons in Discord.

It has been asked to allow developers to dynamically add new assets but (AFAIK) the feature is not available yet. See:

... but there may be a workaround

That being said, I believe that we could overcome this limit. Indeed, if assets are bound to a Discord application, then we "just" have to allow users to specify their own. Users could hence provide (and use) their own icons by:

  1. Creating a new Discord application
  2. Uploading their assets
  3. Configure the Rich Presence plug-in so that it uses their application and their assets.

So how to do that?

Here are the tasks that I can think of:

1. Make the Discord application ID configurable

The ID of my application is currently hard-coded in the DiscordRpcProxy class. This must change to allow users to specify their own:

  • either by default,
  • or by project.

The best way to do this should be to enhance the UserPreferences interface. It defines all the preferences that can be set by a user; you can take a look at its sub-classes to see how preferences are persisted and check PreferredRichPresence for an example of how these preferences are used to tailor the rich presence.

2. Allow users to specify their own key

This can be achieved by adding new text fields:

Some resources

I do not know what is your technical background so here are a few resources that may be useful if you want to implement this:

If you have the time to implement a solution I would be glad to accept your contribution! I apologize for the long message but I preferred to be as comprehensive as possible. Feel free to ask any question if you face an issue or if the code is not clear enough.

Regarding the default icon

I wanted to show Eclipse IDE's icon by default but I do not have the rights to use it. Available logos can be checked here:

I planned to contact the Eclipse Foundation to ask for their permission but I did not take the time to do it yet.

@echebbi echebbi added help wanted Extra attention is needed and removed help wanted Extra attention is needed labels Jun 9, 2019
@echebbi echebbi self-assigned this Jun 13, 2019
@echebbi
Copy link
Owner

echebbi commented Jun 13, 2019

I finally have some free time so I'm going to work on this.

@echebbi
Copy link
Owner

echebbi commented Sep 27, 2019

The feature is finally here 🎉 As of v1.1.0 you can ask the plug-in to rely on your own Discord application and thus provide your own icons.

That's not that convenient but I believe that's the best we can do with current Discord's API.

I am currently writing a more detailed documentation but in the meantime here is what must be done to customize the icons shown on Discord:

  1. Create a Discord Application:
    a. Connect to the Discord Developer Portal (you'll have to login with your Discord credentials)
    b. Click on New Application
    c. Specify the application name (it will be shown on Discord instead of Eclipse IDE)
  2. Once in the application's settings page, upload your icons:
    a. Click on Rich Presence (see the navigation menu on the left)
    b. Click on Add Image(s)
    c. Select your icons, validate
    d. Scroll down, specify an ID for each icon then Save Changes

Note: the ID allows me to use the right icon for the right language; you can find which ID I use for which language in the Language class (it's the first parameter of enums)

  1. Configure the plug-in to use your own Discord Application
    a. Window > Preferences
    b. Discord Rich Presence > Icons
    c. Check Use custom application then specify the ID of your application (it's the Client ID field on your application's main page)
    d. Apply
  2. Discord should be updated with your own icons!

You can also set the setting per project.

I know that it looks like a lot of steps but it's actually pretty quick to do; enjoy!

example of customized icon

Credit: icon by Chanut is Industries
https://www.iconfinder.com/icons/2913096/castle_fantasy_fortress_kingdom_medieval_rpg_stronghold_icon

@tristiisch
Copy link
Author

thanks !

@echebbi
Copy link
Owner

echebbi commented Sep 29, 2019

The documentation is now online:

Feel free to submit a new bug if you find it unclear so that I can improve it.

@tristiisch
Copy link
Author

I'm probably going to be a little demanding but if you could add the possibility of having this image in addition (with the eclipse logo of course) it would really be perfect!
image

@echebbi
Copy link
Owner

echebbi commented Oct 10, 2019

I just sent an e-mail to license@eclipse.org to ask for the authorization to display Eclipse IDE's logo. I have no idea whether the Eclipse Foundation will grant me the rights but at least we should have an answer soon.

I reopen the issue until then.

@echebbi
Copy link
Owner

echebbi commented Oct 26, 2019

I have been allowed by the Eclipse Foundation to display the logo of the Eclipse IDE! You should upgrade to 1.1.2 to benefit from it:

Example of Rich Presence showing Eclipse IDE's logo

I believe that this issue is definitely closed now. Please open a new one for any new bug or feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request This issue proposes a new feature
Projects
None yet
2 participants