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

[Feature Request]: Option to specify an external icon for the titlebar/taskbar/etc. icon. #4

Closed
3 tasks done
KandiPanda opened this issue Jan 4, 2024 · 3 comments
Closed
3 tasks done
Labels

Comments

@KandiPanda
Copy link

Preflight Checklist

Problem Description

Supermium-Electron uses the built-in default Electron icon. (Which in of itself is fine, but...) When using it to replace an existing app's Electron, it would be nice for the window to have that app's icon in the titlebar/taskbar/etc., rather than the generic Electron icon. (Especially if running multiple different Electron apps with it at the same time, to tell them apart in the taskbar with just a glance over the icon.)

Proposed Solution

  • Add a -icon <icon_file> launch flag to specify what icon to use. (This approach would be particularly useful for someone also using one Supermium-Electron install to launch multiple things by specifying different resources folders.)
  • If the flag is not used, check in the launch directory for an app.ico to use (much like Discord has, IIRC?).
  • If that is not present either, then fall back to using the internal default icon.

Alternatives Considered

I already tried using a resource editor to replace the icon in the exe of the testing release. That... did not go well.

Even if it had worked for me, hardcoding one icon in (either by building it with that icon substituted in place of of the default icon.png file, or by editing the new icon into the existing exe) would be less useful if someone wanted to use one install of Supermium-Electron pointed at different resources folders to launch different Electron apps with.

Being able to specify (or otherwise supply) a replacement icon without having to build with the substituted icon or to resource edit the exe would also be much more user-friendly.

Additional Information

I did look to see if there was already any way to specify this with Electron, but all I could find were ways for app developers to specify what icon would be built-in, and/or what code to use to have an app set its window icon from an internal image.

If there's already something that I missed that's closer to what I'm looking for (or even a workaround that has a prebuilt app run a script at launch to switch to using an external icon), I'd be happy to hear more about it.

@win32ss
Copy link
Owner

win32ss commented Jan 5, 2024

Seems feasible, as we can obviously review the contents of the command line when registering the window class for the windows that appear on the taskbar.

Copy link

github-actions bot commented Apr 5, 2024

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Apr 5, 2024
Copy link

github-actions bot commented May 5, 2024

This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants