Calendar: disable clicking on dates unless you have gnome-calendar installed.

This commit is contained in:
ItsLemmy
2025-11-04 09:12:15 -05:00
parent e3a2629cc6
commit 4b67e773b9
2 changed files with 7 additions and 3 deletions

View File

@@ -611,8 +611,10 @@ NPanel {
onClicked: {
const dateWithSlashes = `${(modelData.month + 1).toString().padStart(2, '0')}/${modelData.day.toString().padStart(2, '0')}/${modelData.year.toString().substring(2)}`
Quickshell.execDetached(["gnome-calendar", "--date", dateWithSlashes])
root.close()
if (ProgramCheckerService.gnomeCalendarAvailable) {
Quickshell.execDetached(["gnome-calendar", "--date", dateWithSlashes])
root.close()
}
}
onExited: {

View File

@@ -24,6 +24,7 @@ Singleton {
property bool wlsunsetAvailable: false
property bool app2unitAvailable: false
property bool codeAvailable: false
property bool gnomeCalendarAvailable: false
// Discord client auto-detection
property var availableDiscordClients: []
@@ -109,7 +110,8 @@ Singleton {
"app2unitAvailable": ["which", "app2unit"],
"gpuScreenRecorderAvailable": ["sh", "-c", "command -v gpu-screen-recorder >/dev/null 2>&1 || (command -v flatpak >/dev/null 2>&1 && flatpak list --app | grep -q 'com.dec05eba.gpu_screen_recorder')"],
"wlsunsetAvailable": ["which", "wlsunset"],
"codeAvailable": ["which", "code"]
"codeAvailable": ["which", "code"],
"gnomeCalendarAvailable": ["which", "gnome-calendar"]
})
// Internal tracking