ags: add terminal config option

This commit is contained in:
end-4
2024-03-05 22:24:03 +07:00
parent 3f541c642d
commit ee827fb713
3 changed files with 3 additions and 2 deletions
@@ -64,7 +64,7 @@ export function launchCustomCommand(command) {
export function execAndClose(command, terminal) { export function execAndClose(command, terminal) {
App.closeWindow('overview'); App.closeWindow('overview');
if (terminal) { if (terminal) {
execAsync([`bash`, `-c`, `foot fish -C "${command}"`, `&`]).catch(print); execAsync([`bash`, `-c`, `${userOptions.apps.terminal} fish -C "${command}"`, `&`]).catch(print);
} }
else else
execAsync(command).catch(print); execAsync(command).catch(print);
@@ -77,7 +77,7 @@ export default () => SidebarModule({
child: scriptStateIcon, child: scriptStateIcon,
onClicked: () => { onClicked: () => {
App.closeWindow('sideleft'); App.closeWindow('sideleft');
execAsync([`bash`, `-c`, `foot fish -C "${script.command}"`]).catch(print) execAsync([`bash`, `-c`, `${userOptions.apps.terminal} fish -C "${script.command}"`]).catch(print)
.then(() => { .then(() => {
scriptStateIcon.label = 'done'; scriptStateIcon.label = 'done';
}) })
+1
View File
@@ -11,6 +11,7 @@ let userConfigOptions = {
}, },
'apps': { 'apps': {
'imageViewer': 'loupe', 'imageViewer': 'loupe',
'terminal': 'foot', // This is only for shell actions
}, },
'battery': { 'battery': {
'low': 20, 'low': 20,