mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Do not reveal panel on notifications if "do not disturb" is enabled
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<property name="subtitle">(requires show notification counter badge option)</property>
|
||||
<property name="subtitle">(respects Gnome "Do Not Disturb" and requires show notification counter badge option)</property>
|
||||
<property name="title" translatable="yes">Reveal and hold the panel on notification</property>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="intellihide_show_on_notification_switch">
|
||||
|
||||
Reference in New Issue
Block a user