[Feature request] Add `Comment` and/or `GenericName` entries to the .desktop file
File .desktop
can include a Comment
and a GenericName
entry:
Name
Specific name of the application, for example "Mozilla".
GenericName
Generic name of the application, for example "Web Browser".
Comment
Tooltip for the entry, for example "View sites on the Internet". The value should not be redundant with the values ofName
andGenericName
.
Both Comment
and GenericName
can be used as a tagline/subheading by desktop environments. For example, KDE's application launcher "Kickoff" shows them in smaller font next to the Name of the application:
You can see other examples of the comments in /usr/share/applications/
:
$ grep '^Comment=' /usr/share/applications/*
It would be nice if Shortwave also included a Comment entry in its .desktop
file. GenericName=Internet radio
would be nice to have too.
Unfortunately I don't have enough bandwidth to implement this myself. Plus I have zero experience with Rust. But I did poke at the source code a little bit. I didn't even get it to build, because I'm missing some Rust files on my machine:
diff --git a/data/de.haeckerfelix.Shortwave.desktop.in.in b/data/de.haeckerfelix.Shortwave.desktop.in.in
index 2fccdb1..4218c90 100644
--- a/data/de.haeckerfelix.Shortwave.desktop.in.in
+++ b/data/de.haeckerfelix.Shortwave.desktop.in.in
@@ -1,5 +1,6 @@
[Desktop Entry]
Name=@NAME@
+Comment=@DESKTOP_COMMENT@
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=@APP_ID@
Exec=@PKGNAME@
diff --git a/data/meson.build b/data/meson.build
index f9dac58..517a8e0 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -6,6 +6,7 @@ conf = configuration_data()
conf.set('APP_ID', app_id)
conf.set('PKGNAME', meson.project_name())
conf.set('NAME', name)
+conf.set('DESKTOP_COMMENT', 'Listen to internet radio')
desktop_file = i18n.merge_file(
input: configure_file(
input: '@0@.desktop.in.in'.format(base_id),