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

[Linux] Implement .desktop file? #1295

Closed
1 task done
ZerdoX-x opened this issue Sep 6, 2023 · 5 comments · Fixed by #1296
Closed
1 task done

[Linux] Implement .desktop file? #1295

ZerdoX-x opened this issue Sep 6, 2023 · 5 comments · Fixed by #1296
Labels
feature Requests for a new feature.

Comments

@ZerdoX-x
Copy link

ZerdoX-x commented Sep 6, 2023

Checklist

Describe the feature request

I would like to have a .desktop file provided by bottom.
I know that bottom is a CLI tool, but it doesn't mean user's should not have ability to launch it using their app launcher.

As workaround I create it manually and put it in $XDG_DATA_HOME/applications/ with following contents:

[Desktop Entry]
Name=Bottom
Comment=Yet another cross-platform graphical process/system monitor.
Exec=btm
Terminal=true

It's very minimal and maybe even not xdg specs compliant.

As an example of valid .desktop file implementation I can provide well-known neovim, which is also used from terminal: neovim/runtime/nvim.desktop

I can spend some time and contribute myself since the only thing to do is create file with correct settings, and maintainers for each package would update their package to pick up the file. But I have a question: Is it ok if desktop entry won't have any icon? I don't really know how this will show up in gnome and other DEs (plasma, xfce, etc) since I use app launcher which doesn't even support icons. Or maybe we can come up with some icon? Afaik bottom doesn't have any icons or logos.

Thank you for this awesome tool!

@ZerdoX-x ZerdoX-x added the feature Requests for a new feature. label Sep 6, 2023
@ClementTsang
Copy link
Owner

ClementTsang commented Sep 6, 2023

I don't mind doing what neovim has and just including a desktop file in the repo.

Just to be clear though, the only way I currently imagine it being used is either a user manually copies it over, or a package maintainer makes it part of the install procedure, which I think we're on the same page for.

Also no bottom has no icon or logo. I don't have any plans for one at the moment.

@ZerdoX-x
Copy link
Author

ZerdoX-x commented Sep 6, 2023

@ClementTsang thank you for the fast response. I'll try to research how different DE's display desktop entries without icons. Probably I will send screenshots and we will think of that.

the only way I currently imagine it being used is either a user manually copies it over, or a package maintainer makes it part of the install procedure

Yes, it's always handled by package of each package manager. Personally I use Gentoo and here is example for emerge way handling alacritty's desktop entry: https://gitweb.gentoo.org/repo/gentoo.git/tree/x11-terms/alacritty/alacritty-0.12.2.ebuild#n334

This feature is very common and useful on linux, to have ability to launch gui applications. If you are not familiar with linux, you can think of window's desktop shortcut or start menu entry.

@ZerdoX-x
Copy link
Author

ZerdoX-x commented Sep 6, 2023

This is how missing icons look like in DEs

Gnome
image

XFCE
image

KDE Plasma
image

Cinnamon
image

These are most popular and some of the others have similar icons. I guess it's fine? Also while searching these images I found lots of other iconless desktop shortcuts.
I think if user really won't like it, he would find a way to mask it, change icon or deal with it any other way on his side (maybe even switching to cargo instead of distro pkg manager).

If that's ok, I'll try to find some time this week to read specs about desktop shortcuts and implement one for bottom. Where do you think it belongs to? /assets/, /src/ or other place? Package maintainers should easily find it and also I think .desktop file should also be placed in linux tars on bottom/releases page

@ClementTsang
Copy link
Owner

I'll probably just handle this later today, looks easy enough.

@ClementTsang ClementTsang mentioned this issue Sep 6, 2023
9 tasks
@ZerdoX-x
Copy link
Author

ZerdoX-x commented Sep 6, 2023

@ClementTsang forgot to mention .deb and .rpm installation files, maybe it's worth placing .desktop here too, I am not sure and don't know if they support this.
Thank you and yes, looking at the diff of the PR I can tell that you would handle it much better than me because it involves CI.

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

Successfully merging a pull request may close this issue.

2 participants