Skip to content

Commit

Permalink
make app not show up in applications
Browse files Browse the repository at this point in the history
  • Loading branch information
not-coded committed Oct 22, 2024
1 parent a6c00a3 commit 4062b95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ public static void inject() {
try (InputStream stream = DesktopFileInjector.class.getResourceAsStream(RESOURCE_LOCATION)) {
Path location = getDesktopFileLocation();

String desktop = System.getenv("XDG_CURRENT_DESKTOP");
String version = MinecraftClient.getInstance().getGameVersion();
injectFile(location, String.format(IOUtils.toString(Objects.requireNonNull(stream), StandardCharsets.UTF_8),
version, ICON_NAME.substring(0, ICON_NAME.lastIndexOf("."))).getBytes(StandardCharsets.UTF_8));
version, ICON_NAME.substring(0, ICON_NAME.lastIndexOf(".")), !desktop.contains("GNOME") ? "Hidden=true" : "").getBytes(StandardCharsets.UTF_8));
} catch (IOException e) {
WayFix.LOGGER.error("Failed to inject icon: ", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ Icon=%s
Exec=true
Terminal=false
Type=Application
Categories=Game;
Categories=Game;
%s

0 comments on commit 4062b95

Please sign in to comment.