about summary refs log tree commit diff
path: root/pkgs/build-support/setup-hooks
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2022-03-31 13:44:15 +0200
committertoonn <toonn@toonn.io>2022-03-31 13:44:15 +0200
commit196f989ae88a13210720cb08d53a57c5c05481a0 (patch)
treef0b37a2e6983d01259ee85dcf3198d50d5eb6771 /pkgs/build-support/setup-hooks
parent4dc94e1489fd7045e4b898996cecfbf28ed87ab3 (diff)
desktopToDarwinBundle: Implement %i Exec field code
Diffstat (limited to 'pkgs/build-support/setup-hooks')
-rw-r--r--pkgs/build-support/setup-hooks/desktop-to-darwin-bundle.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/build-support/setup-hooks/desktop-to-darwin-bundle.sh b/pkgs/build-support/setup-hooks/desktop-to-darwin-bundle.sh
index 5b8a4d0e90fb0..92c790e9907fe 100644
--- a/pkgs/build-support/setup-hooks/desktop-to-darwin-bundle.sh
+++ b/pkgs/build-support/setup-hooks/desktop-to-darwin-bundle.sh
@@ -176,7 +176,9 @@ processExecFieldCodes() {
   local -r execRaw=$(getDesktopParam "${file}" "Exec")
   local -r execNoK="${execRaw/\%k/${file}}"
   local -r execNoKC="${execNoK/\%c/$(getDesktopParam "${file}" "Name")}"
-  local -r exec="${execNoKC// %[fFuUi]}"
+  local -r icon=$(getDesktopParam "${file}" "Icon")
+  local -r execNoKCI="${execNoKC/\%i/${icon:+--icon }${icon}}"
+  local -r exec="${execNoKCI// %[fFuU]}"
   if [[ "$exec" != "$execRaw" ]]; then
     echo 1>&2 "desktopToDarwinBundle: Application bundles do not understand desktop entry field codes. Changed '$execRaw' to '$exec'."
   fi