pop-os / launcher

Modular IPC-based desktop launcher service
Mozilla Public License 2.0
228 stars 47 forks source link

[Feature request] - Per rule icon for web plugin #41

Closed oknozor closed 2 years ago

oknozor commented 2 years ago

I would be nice to have an optional per rule icon for the web plugin, falling back to the default one when not specified :

        (
            matches: ["arch"],
            queries: [(name: "Arch Wiki", query: "wiki.archlinux.org/index.php/" )],
            icon: Name("archlinux")
        ),
        (
            // Should fallback to the icon defined in plugins/web/config.ron
            matches: ["bc", "bandcamp"],
            queries: [(name: "Bandcamp", query: "bandcamp.com/search?q=")]
        ),
mmstick commented 2 years ago

I think we could cache the favicon from each and show that

oknozor commented 2 years ago

Do you mean on client side or via pop-launcher ?

mmstick commented 2 years ago

The plugin

oknozor commented 2 years ago

Would you want the url to the favicon to be sent or the raw image ?

mmstick commented 2 years ago

The plugin can download the favicon to ~/.cache/pop-launcher/, and give the path to the icon to the launcher.

oknozor commented 2 years ago

I will try to implement this, do you have a http client of choice or reqwest would do ?

mmstick commented 2 years ago

Likely isahc since it doesn't require tokio and uses the system's native libcurl.

mmstick commented 2 years ago

Unsure how much of a difference in binary size that reqwest makes compared to isahc.

oknozor commented 2 years ago

I can try both implem and run cargo bloat if you want