From cfda5f123675882113820d9c907275b8e348a607 Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Fri, 6 May 2022 10:10:17 -0400 Subject: [PATCH 1/5] add LXTerminal to supported terminals --- app/src/lib/shells/linux.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/src/lib/shells/linux.ts b/app/src/lib/shells/linux.ts index 28bdeb898b0..9300d4261d6 100644 --- a/app/src/lib/shells/linux.ts +++ b/app/src/lib/shells/linux.ts @@ -19,6 +19,7 @@ export enum Shell { XFCE = 'XFCE Terminal', Alacritty = 'Alacritty', Kitty = 'Kitty', + LXTerminal = 'LXDE Terminal', } export const Default = Shell.Gnome @@ -61,6 +62,8 @@ function getShellPath(shell: Shell): Promise { return getPathIfAvailable('/usr/bin/alacritty') case Shell.Kitty: return getPathIfAvailable('/usr/bin/kitty') + case Shell.LXTerminal: + return getPathIfAvailable('/usr/bin/lxterminal') default: return assertNever(shell, `Unknown shell: ${shell}`) } @@ -84,6 +87,7 @@ export async function getAvailableShells(): Promise< xfcePath, alacrittyPath, kittyPath, + lxterminalPath, ] = await Promise.all([ getShellPath(Shell.Gnome), getShellPath(Shell.GnomeConsole), @@ -99,6 +103,7 @@ export async function getAvailableShells(): Promise< getShellPath(Shell.XFCE), getShellPath(Shell.Alacritty), getShellPath(Shell.Kitty), + getShellPath(Shell.LXTerminal), ]) const shells: Array> = [] @@ -158,6 +163,11 @@ export async function getAvailableShells(): Promise< shells.push({ shell: Shell.Kitty, path: kittyPath }) } + + if (lxterminalPath) { + shells.push({ shell: Shell.LXTerminal, path: lxterminalPath }) + } + return shells } @@ -193,6 +203,7 @@ export function launch( '--directory', path, ]) + case Shell.LXTerminal: default: return assertNever(shell, `Unknown shell: ${shell}`) } From f477f3f05c1bbe8b61ed1351810b3a5ca4feff44 Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Fri, 6 May 2022 10:12:15 -0400 Subject: [PATCH 2/5] add geany to supported editors list --- app/src/lib/editors/linux.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/lib/editors/linux.ts b/app/src/lib/editors/linux.ts index ae83e708c6d..14e33a1b2d3 100644 --- a/app/src/lib/editors/linux.ts +++ b/app/src/lib/editors/linux.ts @@ -88,6 +88,10 @@ const editors: ILinuxExternalEditor[] = [ name: 'Notepadqq', paths: ['/usr/bin/notepadqq'], }, + { + name: 'Geany', + paths: ['/usr/bin/geany'], + }, ] async function getAvailablePath(paths: string[]): Promise { From 5adf5b2955078f0e06868b7fa140d7e2533bf28e Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Fri, 6 May 2022 10:49:11 -0400 Subject: [PATCH 3/5] Update linux.ts --- app/src/lib/shells/linux.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/lib/shells/linux.ts b/app/src/lib/shells/linux.ts index 9300d4261d6..1303e6615f8 100644 --- a/app/src/lib/shells/linux.ts +++ b/app/src/lib/shells/linux.ts @@ -204,6 +204,7 @@ export function launch( path, ]) case Shell.LXTerminal: + return spawnShell(foundShell.path, ['--working-directory=' + path]) default: return assertNever(shell, `Unknown shell: ${shell}`) } From 5d9659b57812771a697e301dcef6c4356234e2bd Mon Sep 17 00:00:00 2001 From: theofficialgman <28281419+theofficialgman@users.noreply.github.com> Date: Sat, 7 May 2022 08:51:48 -0400 Subject: [PATCH 4/5] add mousepad to supported editors --- app/src/lib/editors/linux.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/lib/editors/linux.ts b/app/src/lib/editors/linux.ts index 14e33a1b2d3..8e79f457fd5 100644 --- a/app/src/lib/editors/linux.ts +++ b/app/src/lib/editors/linux.ts @@ -92,6 +92,10 @@ const editors: ILinuxExternalEditor[] = [ name: 'Geany', paths: ['/usr/bin/geany'], }, + { + name: 'Mousepad', + paths: ['/usr/bin/mousepad'], + }, ] async function getAvailablePath(paths: string[]): Promise { From c4c95e01d28c2408252c08e42e5f252944ce5ca2 Mon Sep 17 00:00:00 2001 From: Brendan Forster Date: Sat, 7 May 2022 11:21:58 -0300 Subject: [PATCH 5/5] lint changed files --- app/src/lib/editors/linux.ts | 2 +- app/src/lib/shells/linux.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/lib/editors/linux.ts b/app/src/lib/editors/linux.ts index 8e79f457fd5..4190cc6c27f 100644 --- a/app/src/lib/editors/linux.ts +++ b/app/src/lib/editors/linux.ts @@ -92,7 +92,7 @@ const editors: ILinuxExternalEditor[] = [ name: 'Geany', paths: ['/usr/bin/geany'], }, - { + { name: 'Mousepad', paths: ['/usr/bin/mousepad'], }, diff --git a/app/src/lib/shells/linux.ts b/app/src/lib/shells/linux.ts index 1303e6615f8..2eb1aa3b824 100644 --- a/app/src/lib/shells/linux.ts +++ b/app/src/lib/shells/linux.ts @@ -163,7 +163,6 @@ export async function getAvailableShells(): Promise< shells.push({ shell: Shell.Kitty, path: kittyPath }) } - if (lxterminalPath) { shells.push({ shell: Shell.LXTerminal, path: lxterminalPath }) }