 
         ui_alarm = (duration=1000)=>
             @setState {alarm:true}
+            sounds.notification.muted = false
             sounds.notification.play()
             disable_alarm = =>
                 @setState {alarm:false}

    report_window?.close()
    settings_window?.close()

{Tray, Menu, app, globalShortcut} = electron.remote
path = require 'path'

addEventListener 'keydown', (event)->
    if event.keyCode == 123
        ewin.webContents.openDevTools({mode:'detach'})

report_window = null

    console.log "Set timeout to show window in #{format_time break_time}."
    show = ->
        show_window(true)
    show_window_timeout = setTimeoutSH show, break_time

show_window_time = 0
show_window = (alarm)->
    hidden_window = false
    show_window_time = Date.now()
    ewin.setAlwaysOnTop true
    clearTimeoutSH show_window_timeout
    # play again (not pause)
    if log.is_paused
        log.new_entry {pause:false, date:show_window_time}
