From 6a17b2ba8c872a3a1f19f41945c09c3c8b362f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darrel=20Gri=C3=ABt?= Date: Tue, 20 Sep 2022 21:59:57 +0200 Subject: [PATCH] Add ability to keep the panel hidden. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds a toggle that allows you to enable/disable the ability to reveal the panel when it's obstructed by windows. Signed-off-by: Darrel Griƫt --- Settings.ui | 47 ++++++++++++++++--- intellihide.js | 4 ++ .../D2P_import settings/Mountain_intellihide | 1 + .../D2P_import settings/Wolf_programmer | 1 + prefs.js | 9 ++++ ...shell.extensions.dash-to-panel.gschema.xml | 5 ++ 6 files changed, 61 insertions(+), 6 deletions(-) diff --git a/Settings.ui b/Settings.ui index 382b0368..2408924e 100644 --- a/Settings.ui +++ b/Settings.ui @@ -1772,11 +1772,10 @@ - - 100 + True - + True 12 12 @@ -1785,10 +1784,10 @@ 12 32 - + True True - Allow the panel to be revealed while in fullscreen mode + Allow the panel to be revealed when it is obstructed by windows True 0 @@ -1798,7 +1797,7 @@ - + True end center @@ -1808,6 +1807,42 @@ + + + True + 12 + 4 + + + True + True + Allow the panel to be revealed while in fullscreen mode + True + 0 + + 0 + 0 + + + + + + True + end + center + + 0 + 1 + + + + + 1 + 0 + 2 + + + diff --git a/intellihide.js b/intellihide.js index fde0801a..082b541e 100644 --- a/intellihide.js +++ b/intellihide.js @@ -321,6 +321,10 @@ var Intellihide = class { if (fromRevealMechanism) { let mouseBtnIsPressed = global.get_pointer()[2] & Clutter.ModifierType.BUTTON1_MASK; + + if (!Me.settings.get_boolean('intellihide-show-in-windows')) { + return false; + } //the user is trying to reveal the panel if (this._monitor.inFullscreen && !mouseBtnIsPressed) { diff --git a/media/sources/D2P_import settings/Mountain_intellihide b/media/sources/D2P_import settings/Mountain_intellihide index 7af05439..d1a88d4d 100644 --- a/media/sources/D2P_import settings/Mountain_intellihide +++ b/media/sources/D2P_import settings/Mountain_intellihide @@ -51,6 +51,7 @@ intellihide-pressure-time=1000 app-ctrl-hotkey-10=['0'] status-icon-padding=-1 intellihide-show-in-fullscreen=false +intellihide-show-in-windows=true app-hotkey-kp-1=['KP_1'] app-hotkey-2=['2'] app-hotkey-kp-2=['KP_2'] diff --git a/media/sources/D2P_import settings/Wolf_programmer b/media/sources/D2P_import settings/Wolf_programmer index e040070a..e641ba65 100644 --- a/media/sources/D2P_import settings/Wolf_programmer +++ b/media/sources/D2P_import settings/Wolf_programmer @@ -51,6 +51,7 @@ intellihide-pressure-time=1000 app-ctrl-hotkey-10=['0'] status-icon-padding=-1 intellihide-show-in-fullscreen=false +intellihide-show-in-windows=true app-hotkey-kp-1=['KP_1'] app-hotkey-2=['2'] app-hotkey-kp-2=['KP_2'] diff --git a/prefs.js b/prefs.js index a250a4f5..6a33158f 100644 --- a/prefs.js +++ b/prefs.js @@ -1157,6 +1157,14 @@ const Preferences = class { 'sensitive', Gio.SettingsBindFlags.DEFAULT); + this._settings.bind('intellihide-show-in-windows', + this._builder.get_object('intellihide_show_in_windows_switch'), + 'active', + Gio.SettingsBindFlags.DEFAULT); + this._settings.bind('intellihide-show-in-windows', + this._builder.get_object('intellihide_show_in_windows_options'), + 'sensitive', + Gio.SettingsBindFlags.DEFAULT); this._settings.bind('intellihide-show-in-fullscreen', this._builder.get_object('intellihide_show_in_fullscreen_switch'), 'active', @@ -1228,6 +1236,7 @@ const Preferences = class { this._settings.set_value('intellihide-behaviour', this._settings.get_default_value('intellihide-behaviour')); this._settings.set_value('intellihide-use-pressure', this._settings.get_default_value('intellihide-use-pressure')); this._settings.set_value('intellihide-show-in-fullscreen', this._settings.get_default_value('intellihide-show-in-fullscreen')); + this._settings.set_value('intellihide-show-in-windows', this._settings.get_default_value('intellihide-show-in-windows')); this._settings.set_value('intellihide-only-secondary', this._settings.get_default_value('intellihide-only-secondary')); this._settings.set_value('intellihide-pressure-threshold', this._settings.get_default_value('intellihide-pressure-threshold')); diff --git a/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml b/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml index 7e8ea3a9..b8e05da4 100644 --- a/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml +++ b/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml @@ -339,6 +339,11 @@ Intellihide pressure Allow the panel to be revealed while an application is in fullscreen mode + + true + Intellihide pressure + Allow the panel to be revealed when it is obstructed by windows + false Intellihide only secondary