From d0a4c1c56e61da3a1248a904dc04244ddaad0c37 Mon Sep 17 00:00:00 2001 From: bbedward Date: Thu, 9 Jul 2026 12:23:13 -0400 Subject: [PATCH] default apps: add configuration for geo: URIs port: 1.5 --- .../DankDash/Overview/CalendarEventDetail.qml | 12 +++++++++--- quickshell/Modules/Settings/DefaultAppsTab.qml | 12 +++++++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/quickshell/Modules/DankDash/Overview/CalendarEventDetail.qml b/quickshell/Modules/DankDash/Overview/CalendarEventDetail.qml index f7f327003..c3b1b8608 100644 --- a/quickshell/Modules/DankDash/Overview/CalendarEventDetail.qml +++ b/quickshell/Modules/DankDash/Overview/CalendarEventDetail.qml @@ -18,15 +18,21 @@ Item { readonly property bool _descriptionIsHtml: /<[a-z][^>]*>/i.test((eventData && eventData.description) || "") - // _locationUrl returns the location when it is nothing but a URL so the - // row can open it; links inside a street address surface as meetingUrl. + // _locationUrl makes the location row clickable: the location itself when + // it is a URL, the meeting link when the event has one (conference + // events carry placeholder locations like "Microsoft Teams Meeting"), + // otherwise a geo: search (RFC 5870) so addresses open in the maps app. function _locationUrl() { const loc = ((eventData && eventData.location) || "").trim(); + if (loc === "") + return ""; if (/^https?:\/\/\S+$/i.test(loc)) return loc; if (/^www\.\S+$/i.test(loc)) return "https://" + loc; - return ""; + if (eventData && eventData.meetingUrl) + return eventData.meetingUrl; + return "geo:0,0?q=" + encodeURIComponent(loc); } function _styleAnchors(html) { diff --git a/quickshell/Modules/Settings/DefaultAppsTab.qml b/quickshell/Modules/Settings/DefaultAppsTab.qml index 9c84c90e8..dbf9895ae 100644 --- a/quickshell/Modules/Settings/DefaultAppsTab.qml +++ b/quickshell/Modules/Settings/DefaultAppsTab.qml @@ -19,7 +19,8 @@ Item { PDFReader: 6, Mail: 7, Terminal: 8, - Calendar: 9 + Calendar: 9, + Maps: 10 }) property string currentWebBrowserAppId: "" @@ -32,6 +33,7 @@ Item { property string currentMailAppId: "" property string currentTerminalAppId: "" property string currentCalendarAppId: "" + property string currentMapsAppId: "" property var categoryModels: ({}) @@ -48,6 +50,7 @@ Item { [root.appCategory.PDFReader]: ["application/pdf", "application/x-ext-pdf", "application/x-bzpdf", "application/x-gzpdf", "application/vnd.comicbook-rar", "application/vnd.comicbook+zip"], [root.appCategory.Mail]: ["x-scheme-handler/mailto"], [root.appCategory.Calendar]: ["x-scheme-handler/calendar"], + [root.appCategory.Maps]: ["x-scheme-handler/geo"], [root.appCategory.Terminal]: ["terminal"] // Special }) @@ -280,6 +283,13 @@ Item { tags: ["mail", "email"] description: I18n.tr("Handles mailto links", "Handles mailto links") } + + AppSelector { + text: I18n.tr("Maps", "Maps") + category: root.appCategory.Maps + tags: ["maps", "geo", "location"] + description: I18n.tr("Handles geo: location links", "Handles geo: location links") + } } SettingsCard {