File naming
Type=Directory if my_file.endswith(".directory") else my_file.endswith(".desktop")
- reverse DNS
- D-Bus well-known name
my_domain[0].isdigit() if f"_{my_domain}" else my_domain
my_domain.replace("-", "_")
Desktop File ID
my_file.replace("/", "-")
[Desktop Entry]
Recognized desktop entry keys
| Key | Value Type | REQ? | Condition | Value |
|---|
Type | string | YES | | Application, Link, Directory |
Name | localestring | YES | | |
Icon | iconstring | NO | | |
Exec | string | NO | | |
Terminal | boolean | NO | | |
Categories | string(s) | NO | | desktop-menu-specification |
StartupWMClass | string | NO | | xprop WM_CLASS |
URL | string | YES | Type=Link | |
参照