U-C-S / Hurl

Choose the browser on the click of a link
MIT License
254 stars 8 forks source link

Feature Request: Parameter in UserSettings and custom icons #43

Closed hanjo closed 2 years ago

hanjo commented 2 years ago

Hi,

first of all: great App!

Sometimes I'm getting links to Office documents (Excel, PowerPoint, Word), that I would like to open directly in the respective app.

This is possible by using C:\Program Files\Microsoft Office\root\Office16\protocolhandler.exe as the browser with the argument ms-excel:ofe|u|https://... (for Excel)

to make this work, it would be required to have a parameter for the URL though that I can put into the LaunchArgs. Something like %URL% or $1, so the LaunchArgs would become ms-excel:ofe|u|%URL%

For the same use case, it would also be helpful to select a custom icon, since the icon of protocolhandler.exe is a generic Office icon, which obviously becomes confusing if you configure it three times for Excel, PowerPoint and Word.

Let me know what you think!

Thanks

U-C-S commented 2 years ago

Yeh.... This might be possible and quite a easy one. I'll try to include it in v0.7

U-C-S commented 2 years ago

Added both of them in v0.6.2

For CustomIconPath - you might need to use full absolute path of the icon.

Report any issues on those if you got time.

grentninja commented 2 years ago

Ello! Just another suggestion related to the custom icons. Is it possible to support GIF image extensions? I would be great for more customization :>

U-C-S commented 2 years ago

GIFs.... I never thought about them. I don't know whether the underlying framework of Hurl (named WPF) supports it or not. Will look into it again.

grentninja commented 2 years ago

It's alright if it's not possible, just a wacky suggestion of mine lol

hanjo commented 2 years ago

I extracted 256x256 PNGs with alpha channel from the office executables and was able to use them using the CustomIconPath. Working nicely, thanks! CustomIconPath Also the URL substitution works, e.g. using "ms-excel:ofe|u|%URL%". As @U-C-S wrote in another issue already, this currently only works for the main LaunchArgs, not the AlternateLaunches LaunchArgs. Here is the full example for Excel:

    {
      "Name": "Excel",
      "ExePath": "C:\\Program Files\\Microsoft Office\\root\\Office16\\protocolhandler.exe",
      "LaunchArgs": "ms-excel:ofe|u|%URL%",
      "Hidden": false,
      "AlternateLaunches": null,
      "CustomIconPath": "C:\\Users\\...\\Pictures\\Icons\\Excel.png"
    }