mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Atom::beep triggers visual and audio beep
This commit is contained in:
@@ -297,18 +297,22 @@ class Atom
|
||||
process.crash()
|
||||
|
||||
beep: ->
|
||||
@audioBeep()
|
||||
@visualBeep()
|
||||
|
||||
audioBeep: ->
|
||||
shell.beep()
|
||||
|
||||
visualBeep: ->
|
||||
overlay = $$ -> @div class: 'visual-beep'
|
||||
$('body').append overlay
|
||||
setTimeout((-> overlay.remove()), 1000)
|
||||
|
||||
requireUserInitScript: ->
|
||||
userInitScriptPath = path.join(@config.configDirPath, "user.coffee")
|
||||
try
|
||||
require userInitScriptPath if fsUtils.isFileSync(userInitScriptPath)
|
||||
catch error
|
||||
visualBeep: ->
|
||||
overlay = $$ -> @div class: 'visual-beep'
|
||||
$('body').append overlay
|
||||
setTimeout((-> overlay.remove()), 1000)
|
||||
|
||||
console.error "Failed to load `#{userInitScriptPath}`", error.stack, error
|
||||
|
||||
requireWithGlobals: (id, globals={}) ->
|
||||
|
||||
Reference in New Issue
Block a user