mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
feat(launcher): add configurable terminal command
The terminal command for launching applications was previously hardcoded to 'kitty', causing issues for users without it installed. This change introduces a new setting, 'appLauncher.terminalCommand', allowing users to specify their preferred terminal emulator. The default value is set to 'xterm -e'. The implementation includes: - Defining the setting in 'Commons/Settings.qml'. - Adding a text input in the launcher settings tab. - Updating the application plugin to use the new setting.
This commit is contained in:
@@ -142,7 +142,8 @@ Item {
|
||||
if (app.runInTerminal) {
|
||||
// If app.execute() fails for terminal apps, we handle it manually.
|
||||
Logger.log("ApplicationsPlugin", "Executing terminal app manually: " + app.name)
|
||||
const command = ["kitty", "-e"].concat(app.command)
|
||||
const terminal = Settings.data.appLauncher.terminalCommand.split(" ")
|
||||
const command = terminal.concat(app.command)
|
||||
Quickshell.execDetached(command)
|
||||
} else if (app.execute) {
|
||||
// Default execution for GUI apps
|
||||
|
||||
@@ -99,6 +99,16 @@ ColumnLayout {
|
||||
onToggled: checked => Settings.data.appLauncher.useApp2Unit = checked
|
||||
}
|
||||
|
||||
NTextInput {
|
||||
label: I18n.tr("settings.launcher.settings.terminal-command.label")
|
||||
description: I18n.tr("settings.launcher.settings.terminal-command.description")
|
||||
Layout.fillWidth: true
|
||||
text: Settings.data.appLauncher.terminalCommand
|
||||
onEditingFinished: {
|
||||
Settings.data.appLauncher.terminalCommand = text
|
||||
}
|
||||
}
|
||||
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: Style.marginXL * scaling
|
||||
|
||||
Reference in New Issue
Block a user