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 0b611de..54bca26 100644
--- a/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml
+++ b/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml
@@ -871,6 +871,10 @@
Prefix to use for hotkeys
You can choose between Super or SuperAlt as the prefix for hotkeys.
+
+ false
+ Show overlay on secondary monitors
+
false
Show window previews
diff --git a/src/overview.js b/src/overview.js
index 2fe21e2..a315414 100644
--- a/src/overview.js
+++ b/src/overview.js
@@ -46,9 +46,10 @@ const T1 = 'swipeEndTimeout'
const T2 = 'numberOverlayTimeout'
export const Overview = class {
- constructor() {
+ constructor(panelManager) {
this._injectionManager = new InjectionManager()
this._numHotkeys = 10
+ this._panelManager = panelManager
}
enable(primaryPanel) {
@@ -373,7 +374,7 @@ export const Overview = class {
this._hotKeysEnabled = true
if (SETTINGS.get_string('hotkeys-overlay-combo') === 'ALWAYS')
- this.taskbar.toggleHotkeysNumberOverlay(true)
+ this._toggleHotkeysNumberOverlay(true)
}
_disableHotKeys() {
@@ -418,7 +419,7 @@ export const Overview = class {
this._hotKeysEnabled = false
- this.taskbar.toggleHotkeysNumberOverlay(false)
+ this._toggleHotkeysNumberOverlay(false)
}
_optionalNumberOverlay() {
@@ -435,8 +436,8 @@ export const Overview = class {
SETTINGS.get_boolean('hot-keys') &&
SETTINGS.get_string('hotkeys-overlay-combo') === 'ALWAYS'
)
- this.taskbar.toggleHotkeysNumberOverlay(true)
- else this.taskbar.toggleHotkeysNumberOverlay(false)
+ this._toggleHotkeysNumberOverlay(true)
+ else this._toggleHotkeysNumberOverlay(false)
},
],
[SETTINGS, 'changed::shortcut-num-keys', () => this._resetHotkeys()],
@@ -468,7 +469,7 @@ export const Overview = class {
if (hotkey_option === 'NEVER') return
if (hotkey_option === 'TEMPORARILY' || overlayFromShortcut)
- this.taskbar.toggleHotkeysNumberOverlay(true)
+ this._toggleHotkeysNumberOverlay(true)
this._panel.intellihide.revealAndHold(Intellihide.Hold.TEMPORARY)
@@ -484,7 +485,7 @@ export const Overview = class {
timeout,
() => {
if (hotkey_option != 'ALWAYS') {
- this.taskbar.toggleHotkeysNumberOverlay(false)
+ this._toggleHotkeysNumberOverlay(false)
}
this._panel.intellihide.release(Intellihide.Hold.TEMPORARY)
@@ -492,6 +493,21 @@ export const Overview = class {
])
}
+ _toggleHotkeysNumberOverlay(show) {
+ // this.taskbar is the primary taskbar
+ this.taskbar.toggleHotkeysNumberOverlay(show)
+
+ if (SETTINGS.get_boolean('overlay-on-secondary-switch')) {
+ // on secondary panels, show the overlay on icons matching the ones
+ // found on the primary panel (see Taksbar.hotkeyAppNumbers)
+ this._panelManager.allPanels.forEach((p) => {
+ if (p.isPrimary) return
+
+ p.taskbar.toggleHotkeysNumberOverlay(show)
+ })
+ }
+ }
+
_optionalClickToExit() {
this._clickToExitEnabled = false
if (SETTINGS.get_boolean('overview-click-to-exit'))
diff --git a/src/panelManager.js b/src/panelManager.js
index 7feaa3d..cbfc3e0 100755
--- a/src/panelManager.js
+++ b/src/panelManager.js
@@ -59,7 +59,7 @@ let tracker = Shell.WindowTracker.get_default()
export const PanelManager = class {
constructor() {
- this.overview = new Overview.Overview()
+ this.overview = new Overview.Overview(this)
this._injectionManager = new InjectionManager()
}
diff --git a/src/prefs.js b/src/prefs.js
index 42ac665..0fa0812 100644
--- a/src/prefs.js
+++ b/src/prefs.js
@@ -2788,6 +2788,13 @@ const Preferences = class {
this._settings.set_string('hotkeys-overlay-combo', widget.get_active_id())
})
+ this._settings.bind(
+ 'overlay-on-secondary-switch',
+ this._builder.get_object('overlay_on_secondary_switch'),
+ 'active',
+ Gio.SettingsBindFlags.DEFAULT,
+ )
+
this._settings.bind(
'shortcut-previews',
this._builder.get_object('shortcut_preview_switch'),
diff --git a/src/taskbar.js b/src/taskbar.js
index f69641f..f119ea1 100644
--- a/src/taskbar.js
+++ b/src/taskbar.js
@@ -46,6 +46,8 @@ import { DTP_EXTENSION, SETTINGS } from './extension.js'
const SearchController = Main.overview.searchController
+export var hotkeyAppNumbers = {}
+
export const DASH_ANIMATION_TIME = 0.2 // Dash.DASH_ANIMATION_TIME is now private
const DASH_ITEM_HOVER_TIMEOUT = 0.3 // Dash.DASH_ITEM_HOVER_TIMEOUT is now private
export const MIN_ICON_SIZE = 4
@@ -1276,17 +1278,22 @@ export const Taskbar = class extends EventEmitter {
}
_updateHotkeysNumberOverlay() {
- let seenApps = {}
let counter = 0
+ if (this.dtpPanel.isPrimary) hotkeyAppNumbers = {}
+
this._getAppIcons().forEach((icon) => {
- if (!seenApps[icon.app] || this.allowSplitApps) {
- seenApps[icon.app] = 1
- counter++
+ if (
+ this.dtpPanel.isPrimary &&
+ (!hotkeyAppNumbers[icon.app] || this.allowSplitApps)
+ ) {
+ hotkeyAppNumbers[icon.app] = ++counter
}
- if (counter <= 10) {
- icon.setHotkeysNumberOverlayLabel(counter == 10 ? 0 : counter)
+ let label = hotkeyAppNumbers[icon.app]
+
+ if (label <= 10) {
+ icon.setHotkeysNumberOverlayLabel(label == 10 ? 0 : label)
} else {
// No overlay after 10
icon.setHotkeysNumberOverlayLabel(-1)
diff --git a/ui/BoxOverlayShortcut.ui b/ui/BoxOverlayShortcut.ui
index 5f87589..606dd35 100644
--- a/ui/BoxOverlayShortcut.ui
+++ b/ui/BoxOverlayShortcut.ui
@@ -1,29 +1,27 @@
-
+
+
-
+
-
-
-
\ No newline at end of file
+