mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
LauncherTab: check if app2unit exists
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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"]
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user