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

feat: use image from user client id when specified #25

Closed
wants to merge 3 commits into from

Conversation

cpea2506
Copy link
Contributor

@cpea2506 cpea2506 commented Apr 21, 2024

This PR allows user to fetch image from their custom Discord client's id instead of fetching only from this repo's asset folder.

How has this been tested:

Tested with my own client id

require('cord').setup({
  editor = {
    image = "neovim",
    client = "914799712794705961",
  },
})

Presence showcase:

Screenshot 2024-04-21 at 21 25 29 Screenshot 2024-04-21 at 21 26 00

@vyfor
Copy link
Owner

vyfor commented Apr 21, 2024

Good idea! But I was considering to introduce a new field to the configuration as follows:

require('cord').setup({
  icons = {
    lua = 'lua',
    rust = 'https://example.com/rust.png',
  },
})

This will override the default file assets, and allow them to be fetched directly from the custom application instead.
The other two commits look good to me.

What do you think?

@cpea2506
Copy link
Contributor Author

Yes, that's a great idea. It can be used to expand the ability for user customization. So, what's the next step in your thinking?

@vyfor
Copy link
Owner

vyfor commented Apr 23, 2024

I have a basic idea of how I'm going to implement it. I'll start working on it right away.
Regarding the other changes, I believe the renaming makes the file names unnecessarily long, how about we leave them as is?

@vyfor
Copy link
Owner

vyfor commented Apr 23, 2024

I'll be closing this PR for the time being.

@vyfor vyfor closed this Apr 23, 2024
@cpea2506
Copy link
Contributor Author

cpea2506 commented Apr 23, 2024

The names are changed to make it work with data fetching from discord application, since discord rich presence data is not folder-based. If you can do something to improve it, the name can be reserved as is. 😊

@vyfor
Copy link
Owner

vyfor commented Apr 26, 2024

Hey there @cpea2506. I'm almost finished with the implementation (tracked in #31). You can give it a try by switching to the dev branch instead. If you have any ideas in mind, contributions are very welcome!

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

Successfully merging this pull request may close these issues.

None yet

2 participants