Morning Widget

09 May 2015

Backstory

A few days ago, I stumbled across the wonderful world of CoffeeScript. I really wanted to dive right into this wonderful annoying language and felt that the best way to go about it was to make something. I’ve always been a fan of open source widget engines, and wanted to make a widget of my own. This was a great little project for me to kill two birds with one stone.

Übersicht is an open source widget engine built for OSX. What’s great is that it lets you run system commands and display their output on your desktop using CSS HTML5 and CoffeeScript (or JS).

I decided to learn the basics of CoffeeScript syntax by building a small (yet useful) Übersicht widget called, Morning.

What is it?

Morning is a Übersicht widget that displays the time, and greets the current logged in user with a brief salutation. It is a very minimal, which I like.

It is a desktop clone of the popular Google Chrome extension, Momentum.

How can I install it?

First, you’ll need to install Übersicht. Once that’s installed, head on over to the widget gallery and download Morning.

After you’ve unzipped the package, place the morning.widget directory into your Übersicht widget directory. If needed, open morning.coffee and adjust the .container margins to position the widget on your screen.

How does it work?

Morning is nothing special. Simply put, it grabs the current time, figures out what part of the day it is and spits out a string. Realizing the date logic was not difficult and fairly easy to code.

The name of the current user is not hard coded, but is found by executing the following command:

'finger 'whoam' | awk -F: '{ print $3 }' | head -n1 | sed 's/^ // '

Since we only need the first name, the output is split and the first element in the array is used. I made sure to comment every section of the code, and have pushed it to GitHub for those who would like to follow along. You can check out the source here

Update

Morning was featured in Lifehacker’s Winter Desktop. Check it out here :)

1. bash

Last updated: Sun May 31 17:29:48 on ttys000
Rohan-Likhites-MacBook-Pro:~ rohanlikhite$ cd Documents
Rohan-Likhites-MacBook-Pro:Documents rohanlikhite$ cat myBio.txt

About
-----/
> I am a creative software developer and product designer from Toronto, Canada. I have experience designing, building and testing robust enterprise applications for the web, desktop/mobile platforms, and AR/VR headsets using modern tech stacks. I enjoy modern art, Formula One, green tea and play tennis in my spare time.

Skills
------/
> JavaScript ES6, Golang, Ruby, Rails, Java, C#, Objective C, VueJs, Webpack, Nightwatch, Selenium, Capybara, Intern, Jenkins, HTML5, Slim, CSS3, SASS, Bootstrap/Foundation/Chocolate, Source Code Management (GIT + SVN), Bower, Yarn, NPM, Unity3D, Open Frameworks, Processing, MAX MSP, VPT7, Adobe Creative Suite, Autocad, Revit, Oculus Rift, META SpaceGlass.

Other Interests
---------------/
-Tennis
-Reading
-Formula One
-Architecture
-Music

Links
-----/
Email: [email protected]
Github: imRohan
Dribbble: imRohan
LinkedIn: rohan-likhite
Twitter: @rohanlikhite
Medium: @RohanLikhite


>Press ESC to close window
>Lovingly crafted by Rohan Likhite - 2015


Rohan-Likhites-MacBook-Pro:Documents rohanlikhite$