From 7ae5e86e1258baf0f4dca03a46ec069ade1aee28 Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Tue, 11 Feb 2025 00:35:55 -0500 Subject: [PATCH] Fix notification mappings missing .desktop --- src/appIcons.js | 2 +- src/notificationsMonitor.js | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/appIcons.js b/src/appIcons.js index 4fcc206..4f5ceb9 100644 --- a/src/appIcons.js +++ b/src/appIcons.js @@ -1681,7 +1681,7 @@ export const TaskbarAppIcon = GObject.registerClass( let panelSize = this.dtpPanel.geom[this.dtpPanel.checkIfVertical() ? 'w' : 'h'] let fontSize = Math.round( - Math.max(10, 0.3 * panelSize) / Utils.getScaleFactor(), + Math.max(11, 0.3 * panelSize) / Utils.getScaleFactor(), ) let size = Math.round(fontSize * 1.3) let style = ` diff --git a/src/notificationsMonitor.js b/src/notificationsMonitor.js index 45f4411..2deb5c6 100644 --- a/src/notificationsMonitor.js +++ b/src/notificationsMonitor.js @@ -25,7 +25,7 @@ import { EventEmitter } from 'resource:///org/gnome/shell/misc/signals.js' import * as Utils from './utils.js' const tracker = Shell.WindowTracker.get_default() -const knownCorrespondances = { +const knownIdMappings = { 'org.gnome.Evolution': [/^org\.gnome\.[eE]volution([.-].+)?$/g], } @@ -80,16 +80,17 @@ export const NotificationsMonitor = class extends EventEmitter { // depending of the notification source, some app id end // with ".desktop" and some don't ¯\_(ツ)_/¯ appId = appId.replace('.desktop', '') - appId = `${appId}.desktop` // some app have different source app id, deamon and such, // but it maps to a desktop app so match those here - if (!ignoreMapping && !knownCorrespondances[appId]) + if (!ignoreMapping && !knownIdMappings[appId]) appId = - Object.keys(knownCorrespondances).find((k) => - knownCorrespondances[k].some((regex) => appId.match(regex)), + Object.keys(knownIdMappings).find((k) => + knownIdMappings[k].some((regex) => appId.match(regex)), ) || appId + + appId = `${appId}.desktop` this._state[appId] = this._state[appId] || {} this._mergeState(appId, state)