5 ms·
Show HN: Figure out when you closed your MacBook lid
- keyanp 12y agoWhenever I find myself asking this question the answer is always "too late". Cool idea.
- headShrinker 12y ago"If you get an error saying that this app is from an unknown developer, that's because Apple doesn't trust you to make grown-up decisions yet about what applications you want to run. Just find Sleep app in your Applications folder, right click on it, and click Open." Yes, Apple doesn't trust you, and with good reason. I think we have properly demonstrated the average public has no sense at all when when it comes to running software from unknown developers with the chance that it is potentially malicious and damaging.
- TazeTSchnitzel 12y agoI don't think developers do either. Apple prompting you when you run an untrusted app for the first time is almost certainly a good thing (app replaced with a malicious one? you'll get an unexpected prompt), and it hurts nobody.
- kstenerud 12y agoIf someone has the power to replace an installed app on my machine, it's already game over.
- TazeTSchnitzel 12y agoHow so? On OS X that doesn't require admin rights.
- babuskov 12y agoAgreed. The setting to turn that off permanently is really only a couple of clicks away. "Grown-ups" know how to find it easily. Others are better off not being able to do it without understanding how it works.
- ianlevesque 12y agoDevelopers should just sign their apps. Apple even gives signing keys away free of charge.
- steffan 12y agoDo you mean if you already have a paid Mac / iOS developer account? That's the only way I've seen that provides the ability to sign an app.
- josephpmay 12y agoIf you don't want to install an application, you could type something like pmset -g log|grep -e " Sleep " -e " Wake " And get the same results (although a bit harder to sift through) (source: http://apple.stackexchange.com/questions/52064/how-to-find-out-the-start-time-of-last-sleep http://apple.stackexchange.com/questions/52064/how-to-find-o...)
- capablemonkey 12y ago+1. Yup. Sleep is a 98MB wrapper around pmset. :)
- jimktrains2 12y agoHoly crap. The DMG is 33MB. What is being done that's so huge?
- ics 12y agonode-webkit presumably.
- deleted 12y ago[deleted]
- giggles_giggles 12y agoSounds to me like the real solution to this problem is to have some sleep hygiene and get off of your laptop for awhile when you get sleepy. If I was frequently waking on the couch with my laptop on my chest I wouldn't think "gee, did I get enough sleep? I should write an application that detects what time I doze off on the couch!" I'd think "Wow, I need to address my late night computing habits, as they're clearly interfering with my sleep."
- deleted 12y ago[deleted]
- beachstartup 12y ago> and you have no right to he has no right to do what? say that he thinks it's a bad idea? of course he does.
- nightpool 12y agoNote, this is probably troll copypasta from some recent article.
- deleted 12y ago[deleted]
- capablemonkey 12y agoHaha. Yes. I suppose you're right. I work full time and go to school full time so sleep is a luxury and I typically find myself working late nights.
- giggles_giggles 12y agoOh I understand! Please read my comment as concern and not derision :)
- GordyMD 12y agoSo you want to answer the questions 'when did i fall sleep last night?' and 'did i get enough sleep?' I have to wonder why. It suggests you are wanting to ensure you get a healthy amount of sleep by getting the answers to these questions. But really, you don't need to answer these questions at all. Instead just time-box the amount of sleep you should have (whatever you determine that to be) and then just set alarms on your phone/laptop around your schedule to instruct you when to go to bed and when to sleep - sorted. I sense your overly elaborate, approximate solution to your problem is a result of you suffering from sleep deprivation! ;)
- eugeneionesco 12y agonode.js? Seriously?
- webdevtool 12y agowe are everywhere and we're not even java
- NietTim 12y agoSure, there are a lot of other languages to write this little app in, but why not?
- duaneb 12y agoThere are plenty of other languages that are probably already installed on a given person's laptop (e.g.python, ruby, clang, swift now? etc. come built in) that also are better suited for an user-facing app with no web dependencies. Not to mention webkit running a menu bar app is nauseous, though I would certainly hope 99% of the framework isn't involved.
- capablemonkey 12y agoYes. node-webkit / nw.js is really slick. I love that I can create a desktop app without even a hint of Cocoa or Obj-C on my part. The runtime is like 90mb, yes, but the source itself is 4mb including dependencies. Memory usage is decent at ~18mb
- CrLf 12y agoI don't know about you, but I don't want an applet as small as this eating up 18MB... Really, what's up with you people? BTW, not saying that the idea is bad or anything, but it's sad to see people talking about such a waste of resources like it's OK to use in "production". People have other stuff running on their machines and it adds up, quickly.
- StavrosK 12y ago> The runtime is like 90mb, yes, but the source itself is 4mb Not to be too acerbic, but, first of all, 4 MB is already huge for an applet. Secondly, how does the fact that the source is 4 MB excuse the 90 MB runtime?!
- solusipse 12y agolittle node-webkit?
- alxmdev 12y agoI find the technology choice here very interesting, a desktop applet programmed with what I look at as mainly web technologies (JavaScript, JSON, Node, Webkit). It's impossible to ignore how the landscape has changed in the past 5 years and how web-style programming is slowly bleeding into spaces dominated by native applications. When I first got into software development years ago with an eye for tools and games, I approached web programming as a stepping stone. I wonder what direction I would go if I were to start over today.
- TazeTSchnitzel 12y agoMicrosoft was way ahead of their time with this. Windows has supported HTML Applications and JavaScript scripts for decades.
- woofyman 12y agoI prefer to put as few layers of abstraction between me and the hardware as feasible. Maybe because the first part of my career was in embedded software.
- deleted 12y ago[deleted]
- glup 12y agoTechnical content aside, anyone else think that need for this app is a pretty good indicator of some rather unhealthy sleep habits?
- azinman2 12y agoYa this is not a problem I've ever had. If I'm that tired I just go to bed. I've had many a late night but never such that I'm unable to control where it is I fall asleep. Not sure how common thesw habits are.
- guptaneil 12y agoI think it's more common among students (which the author happens to be). I used to fall asleep on my laptop during all-nighters in the library fairly often in college, when I didn't have the luxury of just going to sleep because I was tired.
- detaro 12y agoYup. I thought about building something like it, and my sleeping habits are pretty bad.
- hobarrera 12y agoIt is. On the other end of the spectrum, we've got things like redshift, and redshift-schedule, which alter the temperature on your screen to avoid sleep-depravation and actually maintain healthier sleeping habits. I used both, especially for a time when I started migrating to polyphasic sleep.
- mirchada993 12y agoFunny you used a picture of a PC
- rcarmo 12y agoThe use of Node-webkit for this... is disturbing. It's not that hard to code this in Obj-C, and I have menu bar applets that take... 200KB RAM.
- sacrilicious 12y agoGood for you making an app to scratch your own itch! Pardon being negative when I know you are sharing some of your self with the world by showing HN. I don't even mind the runtime tomfoolery, but it's disingenuous to say "Apple doesn't trust you to make grown-up decisions yet about what applications you want to run". First off, "yet"? They're going to change they're mind at some point about code signing? And second, nw.js apps like Kitematic can sign their code, no matter how quick a hack this is don't belittle Apple's security to explain away your laziness of not signing your app. Thank you for sharing, although the glamorizing of killing yourself for work is also a bit disturbing.
- rohandhruva 12y agoWay to stay on the point there.
- jvinet 12y agoIf you're on Linux, you can accomplish this with dbus. https://github.com/jvinet/dotfiles/blob/master/bin/doorman.py https://github.com/jvinet/dotfiles/blob/master/bin/doorman.p...
- hobarrera 12y agoWhat else do you need running for this? I don't see anyone exposing "org.freedesktop.login1.Manager". Or how does this get called?
- hobarrera 12y agoIt's a real shame it's OS X only, I'd love to have this on my MacBook otherwise! :(