diff --git a/package.json b/package.json index 42e8dbe34..45fce7732 100644 --- a/package.json +++ b/package.json @@ -107,6 +107,7 @@ "to-the-hubs": "0.8.0", "toml": "0.3.0", "tree-view": "0.20.0", + "visual-bell": "0.3.0", "whitespace": "0.7.0", "wrap-guide": "0.4.0", diff --git a/src/atom.coffee b/src/atom.coffee index ffe3ba324..0048f8397 100644 --- a/src/atom.coffee +++ b/src/atom.coffee @@ -303,7 +303,8 @@ class Atom process.crash() beep: -> - shell.beep() + shell.beep() if @config.get('core.audioBeep') + @rootView.trigger 'beep' requireUserInitScript: -> userInitScriptPath = path.join(@config.configDirPath, "user.coffee") diff --git a/src/root-view.coffee b/src/root-view.coffee index 033fa3f39..c483d292e 100644 --- a/src/root-view.coffee +++ b/src/root-view.coffee @@ -50,6 +50,7 @@ class RootView extends View disabledPackages: [] themes: ['atom-dark-ui', 'atom-dark-syntax'] projectHome: path.join(atom.getHomeDirPath(), 'github') + audioBeep: true @acceptsDocuments: true diff --git a/static/utilities.less b/static/utilities.less index 74b0bc030..0a0183ce6 100644 --- a/static/utilities.less +++ b/static/utilities.less @@ -60,3 +60,13 @@ div > .inline-block-tight:last-child { margin-left: 0; } } + +.error { + -webkit-animation: flash-error 0.3s ease-in; +} + +@-webkit-keyframes flash-error { + 0% { background: @background-color-error; } + + 100% { background: auto; } +}