Skip to content

Add .desktop entry management for installed editors on Linux#178

Open
ismailivanov wants to merge 1 commit intoMakovWait:mainfrom
ismailivanov:linux-desktop-entries
Open

Add .desktop entry management for installed editors on Linux#178
ismailivanov wants to merge 1 commit intoMakovWait:mainfrom
ismailivanov:linux-desktop-entries

Conversation

@ismailivanov
Copy link
Copy Markdown

On Linux, registers a .desktop file in ~/.local/share/applications/ for
each managed Godot editor so the dock shows the correct icon while the editor
is running.

What it does

  • Add – creates a .desktop entry when an editor is registered
  • Remove – deletes the entry when an editor is removed
  • Rename – refreshes the entry when an editor is renamed
  • Startup – creates missing entries for already-registered editors on launch

Details

  • NoDisplay=true keeps entries out of the app grid; the dock still picks them up for window matching
  • StartupWMClass is set based on version: Godot_Engine for <4.3, org.godotengine.ProjectManager for ≥4.3
  • Icon is read from a .png in the editor directory when available, falls back to the godot theme icon name
  • Linux-only (OS.has_feature("linux") guard)

Before / After

Before After
before after

- Create ~/.local/share/applications entry when an editor is added
- Delete the entry when an editor is removed
- Refresh entry when an editor is renamed
- On startup, create missing entries for already-registered editors
- Use a PNG icon from the editor directory when available, fall back to the 'godot' theme icon
- Set StartupWMClass based on version: Godot_Engine for <4.3, org.godotengine.ProjectManager for >=4.3
- NoDisplay=true keeps entries out of the app grid while allowing the dock to show the correct icon for running editors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant