diff --git a/src/extension.js b/src/extension.js index 4bb9c6c..d7a1d22 100644 --- a/src/extension.js +++ b/src/extension.js @@ -42,6 +42,7 @@ export let DTP_EXTENSION = null export let SETTINGS = null export let DESKTOPSETTINGS = null export let TERMINALSETTINGS = null +export let NOTIFICATIONSSETTINGS = null export let PERSISTENTSTORAGE = null export let EXTENSION_PATH = null @@ -64,6 +65,9 @@ export default class DashToPanelExtension extends Extension { TERMINALSETTINGS = new Gio.Settings({ schema_id: 'org.gnome.desktop.default-applications.terminal', }) + NOTIFICATIONSSETTINGS = new Gio.Settings({ + schema_id: 'org.gnome.desktop.notifications', + }) EXTENSION_PATH = this.path //create a global object that can emit signals and conveniently expose functionalities to other extensions diff --git a/src/intellihide.js b/src/intellihide.js index 02cdec0..aff5bb0 100644 --- a/src/intellihide.js +++ b/src/intellihide.js @@ -28,7 +28,7 @@ import * as PointerWatcher from 'resource:///org/gnome/shell/ui/pointerWatcher.j import * as Proximity from './proximity.js' import * as Utils from './utils.js' -import { SETTINGS } from './extension.js' +import { SETTINGS, NOTIFICATIONSSETTINGS } from './extension.js' //timeout intervals const CHECK_POINTER_MS = 200 @@ -165,7 +165,8 @@ export const Intellihide = class { if ( !this.enabled || (holdStatus == Hold.NOTIFY && - !SETTINGS.get_boolean('intellihide-show-on-notification')) + (!SETTINGS.get_boolean('intellihide-show-on-notification') || + !NOTIFICATIONSSETTINGS.get_boolean('show-banners'))) ) return diff --git a/ui/BoxIntellihideOptions.ui b/ui/BoxIntellihideOptions.ui index 9ea6037..8075dfa 100644 --- a/ui/BoxIntellihideOptions.ui +++ b/ui/BoxIntellihideOptions.ui @@ -159,7 +159,7 @@ - (requires show notification counter badge option) + (respects Gnome "Do Not Disturb" and requires show notification counter badge option) Reveal and hold the panel on notification