Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Conversation

@PassiveLemon
Copy link
Contributor

Before the get_executable would only return the string "flatpak" from the Exec line while the new function returns the whole string.

I also added Tym terminal to the lookup.

I know #198 fixes this but that PR has been in works for ages now.

@PassiveLemon
Copy link
Contributor Author

Um nevermind there is a slight problem. It turns out that desktop files which have percent sign variables (like `pcmanfm %U) do not work. They only "worked" before because the sign was never actually included in the executable string as a result of the get_executable function.

@PassiveLemon
Copy link
Contributor Author

PassiveLemon commented Dec 3, 2024

I've got some janky "solutions", each with pros and cons.

  1. We keep the string up until the first percent sign: (This allows us to keep any extra arguments in the Exec but may fail due to malformed inputs when the string is cut)
local executable = app:get_string("Exec")
executable = executable:match("^(.-)%%") or executable
  1. If there is a percent sign, revert to the old function: (We still can retain original functionality in a bad case but we also keep the downsides from that, aka, the entire reason to try to fix this in the first place)
local executable = app:get_string("Exec")
if executable:match("%%") then
  executable = app_info.get_executable(app)
end
  1. Could try to combine 1 and 2 in some way. If the first option fails then we can fall back to original behavior.

@PassiveLemon
Copy link
Contributor Author

I opted for the first option for now

@PassiveLemon PassiveLemon deleted the flatpak-fix branch December 21, 2025 19:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant