On May 9, 2013, at 11:56 PM, Ondrej Holecek <ondrej.hole...@gmail.com> wrote:

> No, the "daemon" is the picture viewer itself. It is hidden most of
> the time.

That doesn’t sound like a daemon or an agent; those types of things run in the 
background with no UI. Once there’s a UI, you are writing a regular app. If you 
don’t want it to “feel” like a full app, with a Dock icon and menu bar, what 
you’re looking for is the “LSUIElement” key in the app’s Info.plist — this 
tells the OS that the app just wants to display windows and nothing else. (For 
example, this is how the Special Characters palette is implemented.)

> When you run "xqiv image1.jpg image2.jpg" from command-line,
> then the "daemon" pops and displays image1.jpg.

All you need is to make an app, maybe with the LSUIElement flag as I said 
above. Let’s say its bundle ID is com.example.XQIVApp. Then you can implement 
the ‘xqiv’ command-line tool as a trivial shellscript:

        #!/bin/sh
        open -b com.example.XQIVApp $@

—Jens
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to