Simple Idea - Can I menuify existing applications?

Discussion in 'Mac Programming' started by ArtOfWarfare, Sep 7, 2013.

  1. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #1
    I'm pretty sure this idea blows away Apple's concept of Sandboxing in OS X and so couldn't possibly be allowed in the OS X App store, but here it is anyways (just because it'd be amazing for me and I'm sure other would like it too):

    Could an application or utility or something exist which allows you to turn another application into a menulet? IE, its UI would consist of nothing more than a list of running (docked) applications, you'd click one, and that application's windows would hide and the dock icon would go to the menu bar. Clicking that menu bar icon would expand to show the application's window. Clicking off of the window collapses the menu bar icon / window so that it's gone in a flash.

    I think a lot of applications should be menulets but for whatever reason aren't, and as a result they clutter your screen and dock while running. Examples of good candidates to use the application I described on:
    - Activity Monitor. Full of tons of useful data that you just want to glance at quickly and then have it go away.
    - Spotify. I don't think I need to say anything more...
    - AU Lab. Wouldn't it be nice to have a system wide EQ right in your menu all the time? Swap out OS X's volume slider for it.
    - Stickies. Personally, I always have dozens of them drifting around.
    - System Preferences? IDK - I kind of like the idea of having the whole thing accessible from the dock.

    So, that's my idea. The question is: how feasible is it? What kinds of APIs would I need to be looking at? I've made Xcode plugins and Battery Status (a menu based application,) but I can't think of how I would go about doing what I want.

    I suppose I could utilize AppleScripts to move, show, and hide windows... my own application could produce the menubar icons that show and hide them... finding the list of running windowed applications shouldn't be too hard... I suppose since I control the window's positions, I can just set up a tap that receives all clicks and will detect when the window is clicked off of and hide it properly... but what about removing the application from the dock? I guess I could have my application go into the other application's plist within its bundle and set the properties to hide that... then just quit and relaunch the app (it's being hidden anyways, so why not?)... but that might screw with Gate Keeper and code signing.

    Since I'm going into the bundle anyways I may as well pluck the dock icon and use that for my animation from the dock into the menu bar... although I feel like there's probably a cocoa API that can handle doing that for me more easily.

    I want to hear from other developers - what would be the best way of doing this, do you think?

    Has it been done before? I'm not a fan of resolving problems, so I'm happy to use anyone else's solutions.
     
  2. Madd the Sane macrumors 6502

    Madd the Sane

    Joined:
    Nov 8, 2010
    Location:
    Utah
    #2
    Having an application "hide" in the menu bar would require extensive hacking and modification of the Dock and/or Application Services, assuming this behavior isn't hidden in them.

    Sorry.
     

Share This Page