LauncherTab: check if app2unit exists

This commit is contained in:
lysec
2025-10-16 12:29:06 +02:00
parent 814abf4725
commit dd882401ce
2 changed files with 10 additions and 2 deletions
+8 -2
View File
@@ -95,8 +95,14 @@ ColumnLayout {
NToggle {
label: I18n.tr("settings.launcher.settings.use-app2unit.label")
description: I18n.tr("settings.launcher.settings.use-app2unit.description")
checked: Settings.data.appLauncher.useApp2Unit
onToggled: checked => Settings.data.appLauncher.useApp2Unit = checked
checked: Settings.data.appLauncher.useApp2Unit && ProgramCheckerService.app2unitAvailable
enabled: ProgramCheckerService.app2unitAvailable
opacity: ProgramCheckerService.app2unitAvailable ? 1.0 : 0.6
onToggled: checked => {
if (ProgramCheckerService.app2unitAvailable) {
Settings.data.appLauncher.useApp2Unit = checked
}
}
}
NTextInput {
+2
View File
@@ -18,6 +18,7 @@ Singleton {
property bool fuzzelAvailable: false
property bool gpuScreenRecorderAvailable: false
property bool wlsunsetAvailable: false
property bool app2unitAvailable: false
// Discord client auto-detection
property var availableDiscordClients: []
@@ -85,6 +86,7 @@ Singleton {
"ghosttyAvailable": ["which", "ghostty"],
"footAvailable": ["which", "foot"],
"fuzzelAvailable": ["which", "fuzzel"],
"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"]
})