zenity/internal/zenutil/osascripts/common.gojs
2022-06-02 00:00:08 +01:00

14 lines
No EOL
403 B
Text

{
var app = Application.currentApplication()
app.includeStandardAdditions = true
{{- if .WindowIcon}}
ObjC.import('Cocoa')
let nsapp = $.NSApplication.sharedApplication
let nsimg = $.NSImage.alloc.initWithContentsOfFile({{json .WindowIcon}})
nsapp.setActivationPolicy($.NSApplicationActivationPolicyRegular)
nsapp.setApplicationIconImage(nsimg)
{{- end}}
app.activate()
}