mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Merge pull request #2163 from notiant/patch-23
Remove app2unit in launcher settings
This commit is contained in:
@@ -425,14 +425,7 @@ Item {
|
||||
const command = prefix.concat(app.command);
|
||||
Quickshell.execDetached(command);
|
||||
}
|
||||
} else if (Settings.data.appLauncher.useApp2Unit && ProgramCheckerService.app2unitAvailable && app.id) {
|
||||
Logger.d("Taskbar", `Using app2unit for: ${app.id}`);
|
||||
if (app.runInTerminal)
|
||||
Quickshell.execDetached(["app2unit", "--", app.id + ".desktop"]);
|
||||
else
|
||||
Quickshell.execDetached(["app2unit", "--"].concat(app.command));
|
||||
} else {
|
||||
// Fallback logic when app2unit is not used
|
||||
if (app.runInTerminal) {
|
||||
Logger.d("Taskbar", "Executing terminal app manually: " + app.name);
|
||||
const terminal = Settings.data.appLauncher.terminalCommand.split(" ");
|
||||
|
||||
@@ -156,12 +156,6 @@ Item {
|
||||
const command = prefix.concat(app.command);
|
||||
Quickshell.execDetached(command);
|
||||
}
|
||||
} else if (Settings.data.appLauncher.useApp2Unit && ProgramCheckerService.app2unitAvailable && app.id) {
|
||||
Logger.d("Dock", `Using app2unit for: ${app.id}`);
|
||||
if (app.runInTerminal)
|
||||
Quickshell.execDetached(["app2unit", "--", app.id + ".desktop"]);
|
||||
else
|
||||
Quickshell.execDetached(["app2unit", "--"].concat(app.command));
|
||||
} else {
|
||||
if (app.runInTerminal) {
|
||||
Logger.d("Dock", "Executing terminal app manually: " + app.name);
|
||||
|
||||
@@ -568,14 +568,7 @@ Item {
|
||||
Logger.d("ApplicationsProvider", `Executing command (with prefix): ${command.join(" ")}`);
|
||||
Quickshell.execDetached(command);
|
||||
}
|
||||
} else if (Settings.data.appLauncher.useApp2Unit && ProgramCheckerService.app2unitAvailable && app.id) {
|
||||
Logger.d("ApplicationsProvider", `Using app2unit for: ${app.id}`);
|
||||
if (app.runInTerminal)
|
||||
Quickshell.execDetached(["app2unit", "--", app.id + ".desktop"]);
|
||||
else
|
||||
Quickshell.execDetached(["app2unit", "--"].concat(app.command));
|
||||
} else {
|
||||
// Fallback logic when app2unit is not used
|
||||
if (app.runInTerminal) {
|
||||
Logger.d("ApplicationsProvider", "Executing terminal app manually: " + app.name);
|
||||
const terminal = Settings.data.appLauncher.terminalCommand.split(" ");
|
||||
|
||||
@@ -10,23 +10,6 @@ ColumnLayout {
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.launcher.settings-use-app2unit-label")
|
||||
description: I18n.tr("panels.launcher.settings-use-app2unit-description")
|
||||
checked: Settings.data.appLauncher.useApp2Unit && ProgramCheckerService.app2unitAvailable
|
||||
enabled: ProgramCheckerService.app2unitAvailable && !Settings.data.appLauncher.customLaunchPrefixEnabled
|
||||
opacity: ProgramCheckerService.app2unitAvailable ? 1.0 : 0.6
|
||||
onToggled: checked => {
|
||||
if (ProgramCheckerService.app2unitAvailable) {
|
||||
Settings.data.appLauncher.useApp2Unit = checked;
|
||||
if (checked) {
|
||||
Settings.data.appLauncher.customLaunchPrefixEnabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
defaultValue: Settings.getDefaultValue("appLauncher.useApp2Unit")
|
||||
}
|
||||
|
||||
NTextInput {
|
||||
label: I18n.tr("panels.launcher.settings-terminal-command-label")
|
||||
description: I18n.tr("panels.launcher.settings-terminal-command-description")
|
||||
@@ -41,13 +24,7 @@ ColumnLayout {
|
||||
label: I18n.tr("panels.launcher.settings-custom-launch-prefix-enabled-label")
|
||||
description: I18n.tr("panels.launcher.settings-custom-launch-prefix-enabled-description")
|
||||
checked: Settings.data.appLauncher.customLaunchPrefixEnabled
|
||||
enabled: !Settings.data.appLauncher.useApp2Unit
|
||||
onToggled: checked => {
|
||||
Settings.data.appLauncher.customLaunchPrefixEnabled = checked;
|
||||
if (checked) {
|
||||
Settings.data.appLauncher.useApp2Unit = false;
|
||||
}
|
||||
}
|
||||
onToggled: checked => Settings.data.appLauncher.customLaunchPrefixEnabled = checked
|
||||
defaultValue: Settings.getDefaultValue("appLauncher.customLaunchPrefixEnabled")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user