zenity/internal/zenutil/osascripts/common.gojs

14 lines
403 B
Text
Raw Normal View History

2022-06-01 19:00:08 -04:00
{
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()
}