     }
 }
 
+// Cleanup
 smc.close()
-battery.close()+battery.close()

            quit = true
            break
        case KEY_DOWN:
            var x = getcurx(stdscr)
            var y = getcury(stdscr)
            move(y + 1, x)

import Dispatch
import Foundation

//------------------------------------------------------------------------------
// MARK: GLOBAL STRUCTS
//------------------------------------------------------------------------------


/**
Like an ncurses window
*/
struct Window {
    var size : (length: Int32, width: Int32) = (0, 0)
    var pos  : (x: Int32, y: Int32) = (0, 0)
}


//------------------------------------------------------------------------------
// MARK:  GLOBAL PROTOCOLS
//------------------------------------------------------------------------------


protocol Widget {
