sharkdp / insect

High precision scientific calculator with support for physical units
https://numbat.dev/
MIT License
3.17k stars 127 forks source link

Ship a .desktop file and icon with AUR #247

Closed archisman-panigrahi closed 1 year ago

archisman-panigrahi commented 3 years ago

It would be very convenient if a .desktop file and the icon is shipped with the AUR package. Then one can open it from the menu, as well as pin it to the panel to access it quickly. Screenshot_2021-02-07_11-28-52

An example .desktop file for insect.

[Desktop Entry]
Name=Insect
Comment=High precision scientific calculator with support for physical units
TryExec=insect
Exec=insect
Icon=insect-favicon
Terminal=true
Type=Application
Categories=Education;Science;Math;
Keywords=science;math;numerical computation;calculator;physics;quantities;units

I have manually placed the insect-favicon.svg to .local/share/icons/hicolor/scalable/apps/ in my system, and it can be placed in /usr/share/icons with the PKGBUILD.

sharkdp commented 3 years ago

Thank you for your request. That's a good suggestion, but I'm probably not going to work on this myself.

triallax commented 2 years ago

Is the request for adding a .desktop file to the repo, or to the AUR package? If it's the latter, we don't maintain that package, so this issue would have to be closed.

archisman-panigrahi commented 2 years ago

Is the request for adding a .desktop file to the repo, or to the AUR package? If it's the latter, we don't maintain that package

The AUR package is maintained by @sharkdp. https://aur.archlinux.org/packages/insect If you all agree, I can post an updated PKGBUILD which will install the .desktop file with the AUR package.

triallax commented 2 years ago

The AUR package is maintained by @sharkdp.

Ah, my bad, I wasn't aware of that and assumed it was community-maintained.

If you all agree, I can post an updated PKGBUILD which will install the .desktop file with the AUR package.

That's okay by me.

triallax commented 2 years ago

Is there a reason not to have the .desktop file here in the repository too?

archisman-panigrahi commented 2 years ago

No, there's no reason we cannot have one. However, I don't know if npm can be configured to install the .desktop file along with the icon, which can be easily shipped with other packaging methods like AUR or Fedora RPM (Insect is currently packaged in these GNU/Linux distributions https://repology.org/project/insect/versions).

When I created this GitHub issue (Feb 2021), I was using insect very regularly during online classes (I was a physics undergrad), and thought it would be very helpful if everyone could open Insect with a single click (without opening the terminal and entering the command insect).

triallax commented 2 years ago

However, I don't know if npm can be configured to install the .desktop file along with the icon,

Even if it were possible, I would find it a poor fit for the npm package.

which can be easily shipped with other packaging methods like AUR or Fedora RPM (Insect is currently packaged in these GNU/Linux distributions https://repology.org/project/insect/versions).

That's right, my intention was for packagers to just use the .desktop file and icon shipped in the repo/tarballs.

When I created this GitHub issue (Feb 2021), I was using insect very regularly during online classes (I was a physics undergrad), and thought it would be very helpful if everyone could open Insect with a single click (without opening the terminal and entering the command insect).

Agreed.

triallax commented 2 years ago

The insect.desktop file was added to the repo in #338, so this can be implemented now.

archisman-panigrahi commented 2 years ago

I will try to modify the PKGBUILD. I will get back in a few days.

sharkdp commented 1 year ago

Should be fixed in 5.9.0