zenity/internal/zenutil/osascripts/common.gojs

16 lines
469 B
Text
Raw Normal View History

2022-06-02 07:49:31 -04:00
{{- if .Application}}
var app = Application({{json .Application}})
{{- else}}
2022-06-01 19:00:08 -04:00
var app = Application.currentApplication()
2022-06-02 07:49:31 -04:00
{{- end}}
2022-06-01 19:00:08 -04:00
2022-06-08 18:52:44 -04:00
{{if .WindowIcon}}{
2022-06-02 07:49:31 -04:00
ObjC.import('Cocoa')
let nsapp = $.NSApplication.sharedApplication
let nsimg = $.NSImage.alloc.initWithContentsOfFile({{json .WindowIcon}})
nsapp.setActivationPolicy($.NSApplicationActivationPolicyRegular)
nsapp.setApplicationIconImage(nsimg)
2022-06-08 18:52:44 -04:00
}{{end}}
2022-06-01 19:00:08 -04:00
2022-06-02 07:49:31 -04:00
app.includeStandardAdditions = true
app.activate()