@loceee I know he pays attention, and he might bring in the changes since he doesn't have to do the work. Otherwise, no.
@loceee It just so happens @bentoms volunteered me to modernize it with swift. I made it a part of my annual goals at work so you'll see a whole new version at some point this year if all goes according to plan.
well @jesseshipley if you are taking requests, the bubble notifications should turn into notification center items. Although I still think that is the worst new feature they have provided, a notice pops up and disappears somewhere I never remember to look for notices, much like JAMF notices winding up there. But maybe some people actually use that thing regularly and it would be handy for those notices to go there.
Depending on how it goes @nessts that could be a part of it. Currently Yo does that very well and they are persistent alerts not just banners. Check it out here https://github.com/sheagcraig/yo.
@jesseshipley Kind of psyched to hear that you'll actually be looking to keep cocoaDialog alive! As you can imagine and see by the myriad threads here, its one of those tools that, should it just stop working one day, there will be many sad Mac admins out there. :'-( We'd all survive of course, but our world will be a little duller and more "cookie cutter" like if you ask me. So any effort you put into this will be much appreciated!
I'm looking forward to see what you can do. Just fixing a few of the current bugs would be a major thing by itself. For example, I had to stop using the dropdown window style a few OS versions back as the window size doesn't respect the amount of text you add to the dialog, meaning the drop down menus get smooshed up against the text, looking rather ugly. No amount of fiddling has been able to work around the issue in all my testing.
FWIW, I kind of stopped using the bubble or notify window a while ago. Although I generally would agree with @nessts on what he's stating, at least NC messages get logged into the full Notification Center view, and the user can see them later if they happened to miss them. The bubble/notify style in CD just disappears after the time out and does not log anything anywhere, so they can be completely missed. I don't see much point in using them anymore, and the original developer was thinking the same thing before he dropped any development on it.
Haha. Go @jesseshipley! go!
@bentoms only way I'll make it happen is by making myself fully accountable for it. Now everyone in the IRC, here, and my boss expects it to happen. Completely painted into a corner now haha.
@jesseshipley let us know if we need to send you some caffeine at any point. :)
I'd just like to point out I still use the CocoaDialog progress dialog to output rsync progress at login hook, as that is what I use for roaming mobile profiles (flawlessly). Logout is just a black screen. I've not been able to get anything on top of that hook's screen since 10.8 I don't think.
One has to wonder if swift has any value here.
@chris.hotte a number of the functions within CocoaDialog have been deprecated now & so large parts need to be re-written/replaced.
So my idea was to attack it in Swift as then they would be current functions & it would have been a cool swift project.
But as @jesseshipley has more swift knowledge & seemingly more drive.. I just talked them into it.
Meanwhile, I can bugger about with $other_projects
@bentoms More wife knowledge? How can I get some of that please? I never quite seem to have enough of that... and some days it gets me into trouble.
This doesn't work with my wife
#!/bin/sh
sudo make_me_a_sandwich
https://xkcd.com/149/
My wife knowledge is greatly exaggerated seeing as I'm without one.
if you want a sandwhich its more like
#!/bin/sh
nice -10 make_me_a_sandwhich
if [ -e /tmp/hell_no ]; then
sudo please
fi
@nessts haha good point, please goes a long way. I never used the nice
binary before, very interesting.
@loceee Awesome, I will be giving that a try! Could maybe use it instead of messing around in Cocoa anyway - I used my own progress bars in 10.8 but couldn't in 10.9. Also can't wait to see the new swift version @jesseshipley
@jesseshipley - Were you able to make any progress on updating CocoaDialog over the last year?
@jreitzersmith I postponed it to this year waiting en El Cap and some other stuff. I have a couple of tools I'm hoping to build for the community and will post them once I have more info to share.
So I got a cocoa app written in swift to appear at logout. Its just a very basic app that opens a window for now - just a test case but happy I got it working. The code I need to add was a single line.
self.window.level=2147483631
Heres is my appdelegate code. It makes a window appear then it pauses for 10 seconds before it terminates the application.
I used 2 sources - the new version of Cocoa Dialog that @loceee made and the FileVault code from here that he referenced on his github. Initially I had a lot of extra lines in there but turns out that all I needed was to set the window level to be higher than the fullscreen window at logout. So simple now I've got it working.
import Cocoa
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
@IBOutlet weak var window: NSWindow!
func applicationWillFinishLaunching(notification: NSNotification) {
}
func applicationDidFinishLaunching(aNotification: NSNotification) {
// Insert code here to initialize your application
self.window.level=2147483631
let time = dispatch_time(dispatch_time_t(DISPATCH_TIME_NOW), 10 * Int64(NSEC_PER_SEC))
dispatch_after(time, dispatch_get_main_queue()) {
//put your code which should be executed with a delay here
NSApplication.sharedApplication().terminate(self)
}
}
func applicationWillTerminate(aNotification: NSNotification) {
// Insert code here to tear down your application
}
}