mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-15 00:34:05 +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 SETTINGS = null
|
||||||
export let DESKTOPSETTINGS = null
|
export let DESKTOPSETTINGS = null
|
||||||
export let TERMINALSETTINGS = null
|
export let TERMINALSETTINGS = null
|
||||||
|
export let NOTIFICATIONSSETTINGS = null
|
||||||
export let PERSISTENTSTORAGE = null
|
export let PERSISTENTSTORAGE = null
|
||||||
export let EXTENSION_PATH = null
|
export let EXTENSION_PATH = null
|
||||||
|
|
||||||
@@ -64,6 +65,9 @@ export default class DashToPanelExtension extends Extension {
|
|||||||
TERMINALSETTINGS = new Gio.Settings({
|
TERMINALSETTINGS = new Gio.Settings({
|
||||||
schema_id: 'org.gnome.desktop.default-applications.terminal',
|
schema_id: 'org.gnome.desktop.default-applications.terminal',
|
||||||
})
|
})
|
||||||
|
NOTIFICATIONSSETTINGS = new Gio.Settings({
|
||||||
|
schema_id: 'org.gnome.desktop.notifications',
|
||||||
|
})
|
||||||
EXTENSION_PATH = this.path
|
EXTENSION_PATH = this.path
|
||||||
|
|
||||||
//create a global object that can emit signals and conveniently expose functionalities to other extensions
|
//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 Proximity from './proximity.js'
|
||||||
import * as Utils from './utils.js'
|
import * as Utils from './utils.js'
|
||||||
import { SETTINGS } from './extension.js'
|
import { SETTINGS, NOTIFICATIONSSETTINGS } from './extension.js'
|
||||||
|
|
||||||
//timeout intervals
|
//timeout intervals
|
||||||
const CHECK_POINTER_MS = 200
|
const CHECK_POINTER_MS = 200
|
||||||
@@ -165,7 +165,8 @@ export const Intellihide = class {
|
|||||||
if (
|
if (
|
||||||
!this.enabled ||
|
!this.enabled ||
|
||||||
(holdStatus == Hold.NOTIFY &&
|
(holdStatus == Hold.NOTIFY &&
|
||||||
!SETTINGS.get_boolean('intellihide-show-on-notification'))
|
(!SETTINGS.get_boolean('intellihide-show-on-notification') ||
|
||||||
|
!NOTIFICATIONSSETTINGS.get_boolean('show-banners')))
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -159,7 +159,7 @@
|
|||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="AdwActionRow">
|
<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>
|
<property name="title" translatable="yes">Reveal and hold the panel on notification</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkSwitch" id="intellihide_show_on_notification_switch">
|
<object class="GtkSwitch" id="intellihide_show_on_notification_switch">
|
||||||
|
|||||||
Reference in New Issue
Block a user