zenity/internal/zenutil/osascripts/common.gojs

16 lines
473 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-02 07:49:31 -04:00
{{- if .WindowIcon}}{
ObjC.import('Cocoa')
let nsapp = $.NSApplication.sharedApplication
let nsimg = $.NSImage.alloc.initWithContentsOfFile({{json .WindowIcon}})
nsapp.setActivationPolicy($.NSApplicationActivationPolicyRegular)
nsapp.setApplicationIconImage(nsimg)
}{{- end}}
2022-06-01 19:00:08 -04:00
2022-06-02 07:49:31 -04:00
app.includeStandardAdditions = true
app.activate()