From 152a8187fd99c6c90df541e871df9747baa62d7b Mon Sep 17 00:00:00 2001 From: Etaash-mathamsetty <45927311+Etaash-mathamsetty@users.noreply.github.com> Date: Thu, 21 Apr 2022 17:10:20 +0000 Subject: [PATCH] Add support for GNOME console and newer GNOME editors (#700) * add support for gnome console * Delete configurationCache.log * Update linux.ts * fix cap of gnome * support new GNOME Text Editor * support GNOME builder --- app/src/lib/shells/linux.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/lib/shells/linux.ts b/app/src/lib/shells/linux.ts index bb4bbdbe703..79942c30f60 100644 --- a/app/src/lib/shells/linux.ts +++ b/app/src/lib/shells/linux.ts @@ -10,6 +10,7 @@ import { pathExists, spawn } from '../helpers/linux' export enum Shell { Gnome = 'GNOME Terminal', + GnomeConsole = 'GNOME Console', Mate = 'MATE Terminal', Tilix = 'Tilix', Terminator = 'Terminator', @@ -38,6 +39,8 @@ function getShellPath(shell: Shell): Promise { switch (shell) { case Shell.Gnome: return getPathIfAvailable('/usr/bin/gnome-terminal') + case Shell.GnomeConsole: + return getPathIfAvailable('/usr/bin/kgx') case Shell.Mate: return getPathIfAvailable('/usr/bin/mate-terminal') case Shell.Tilix: @@ -72,6 +75,7 @@ export async function getAvailableShells(): Promise< > { const [ gnomeTerminalPath, + gnomeConsolePath, mateTerminalPath, tilixPath, terminatorPath, @@ -86,6 +90,7 @@ export async function getAvailableShells(): Promise< kittyPath, ] = await Promise.all([ getShellPath(Shell.Gnome), + getShellPath(Shell.GnomeConsole), getShellPath(Shell.Mate), getShellPath(Shell.Tilix), getShellPath(Shell.Terminator), @@ -105,6 +110,10 @@ export async function getAvailableShells(): Promise< shells.push({ shell: Shell.Gnome, path: gnomeTerminalPath }) } + if (gnomeConsolePath) { + shells.push({ shell: Shell.GnomeConsole, path: gnomeConsolePath }) + } + if (mateTerminalPath) { shells.push({ shell: Shell.Mate, path: mateTerminalPath }) } @@ -163,6 +172,7 @@ export function launch( const shell = foundShell.shell switch (shell) { case Shell.Gnome: + case Shell.GnomeConsole: case Shell.Mate: case Shell.Tilix: case Shell.Terminator: