Merge branch 'master' of github.com:Eugeny/terminus
4
app/dev-app-update.yml
Normal file
@ -0,0 +1,4 @@
|
||||
owner: eugeny
|
||||
repo: terminus
|
||||
provider: github
|
||||
updaterCacheDirName: terminus-updater
|
@ -2,7 +2,6 @@ import './lru'
|
||||
import { app, ipcMain, Menu } from 'electron'
|
||||
import { parseArgs } from './cli'
|
||||
import { Application } from './app'
|
||||
if (process.platform === 'win32' && require('electron-squirrel-startup')) process.exit(0)
|
||||
|
||||
if (!process.env.TERMINUS_PLUGINS) {
|
||||
process.env.TERMINUS_PLUGINS = ''
|
||||
|
@ -25,7 +25,7 @@
|
||||
"electron-config": "0.2.1",
|
||||
"electron-debug": "^2.0.0",
|
||||
"electron-is-dev": "0.1.2",
|
||||
"electron-squirrel-startup": "^1.0.0",
|
||||
"electron-updater": "^4.0.6",
|
||||
"js-yaml": "3.8.2",
|
||||
"mz": "^2.6.0",
|
||||
"ngx-toastr": "^9.1.1",
|
||||
|
@ -28,6 +28,10 @@ const userPluginsPath = path.join(
|
||||
'plugins',
|
||||
)
|
||||
|
||||
if (!fs.existsSync(userPluginsPath)) {
|
||||
fs.mkdir(userPluginsPath)
|
||||
}
|
||||
|
||||
Object.assign(window, { builtinPluginsPath, userPluginsPath })
|
||||
nodeModule.globalPaths.unshift(builtinPluginsPath)
|
||||
nodeModule.globalPaths.unshift(path.join(userPluginsPath, 'node_modules'))
|
||||
|
@ -36,7 +36,6 @@ module.exports = {
|
||||
electron: 'commonjs electron',
|
||||
'electron-config': 'commonjs electron-config',
|
||||
'electron-vibrancy': 'commonjs electron-vibrancy',
|
||||
'electron-squirrel-startup': 'commonjs electron-squirrel-startup',
|
||||
fs: 'commonjs fs',
|
||||
mz: 'commonjs mz',
|
||||
path: 'commonjs path',
|
||||
|
144
app/yarn.lock
@ -102,6 +102,33 @@ argparse@^1.0.7:
|
||||
dependencies:
|
||||
sprintf-js "~1.0.2"
|
||||
|
||||
bluebird-lst@^1.0.6, bluebird-lst@^1.0.7:
|
||||
version "1.0.8"
|
||||
resolved "https://registry.yarnpkg.com/bluebird-lst/-/bluebird-lst-1.0.8.tgz#61b572e8b3eb57e0fff676a0e54566d93597e6a4"
|
||||
integrity sha512-InUDOaBaIjIobOa3O4YRAbFgff907uTJZXW0m0rhk3zhVZ4GvsmdCLEAKC1CTWTtUWCM8iWTTfFX9N/xQR/etw==
|
||||
dependencies:
|
||||
bluebird "^3.5.4"
|
||||
|
||||
bluebird@^3.5.4:
|
||||
version "3.5.4"
|
||||
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.4.tgz#d6cc661595de30d5b3af5fcedd3c0b3ef6ec5714"
|
||||
integrity sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw==
|
||||
|
||||
buffer-from@^1.0.0:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
|
||||
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
|
||||
|
||||
builder-util-runtime@~8.1.0:
|
||||
version "8.1.1"
|
||||
resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-8.1.1.tgz#f2f6fc43e33d26892bd491667fc746ad69bccc50"
|
||||
integrity sha512-+ieS4PMB33vVE2S3ZNWBEQJ1zKmAs/agrBdh7XadE1lKLjrH4aXYuOh9OOGdxqIRldhlhNBaF+yKMMEFOdNVig==
|
||||
dependencies:
|
||||
bluebird-lst "^1.0.6"
|
||||
debug "^4.1.1"
|
||||
fs-extra-p "^7.0.0"
|
||||
sax "^1.2.4"
|
||||
|
||||
camelcase@^4.1.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd"
|
||||
@ -140,13 +167,20 @@ cross-spawn@^5.0.1:
|
||||
shebang-command "^1.2.0"
|
||||
which "^1.2.9"
|
||||
|
||||
debug@^2.2.0, debug@^2.6.8:
|
||||
debug@^2.6.8:
|
||||
version "2.6.8"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc"
|
||||
integrity sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
debug@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
|
||||
integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
|
||||
dependencies:
|
||||
ms "^2.1.1"
|
||||
|
||||
decamelize@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-2.0.0.tgz#656d7bbc8094c4c788ea53c5840908c9c7d063c7"
|
||||
@ -210,12 +244,20 @@ electron-localshortcut@^3.0.0:
|
||||
keyboardevent-from-electron-accelerator "^1.1.0"
|
||||
keyboardevents-areequal "^0.2.1"
|
||||
|
||||
electron-squirrel-startup@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/electron-squirrel-startup/-/electron-squirrel-startup-1.0.0.tgz#19b4e55933fa0ef8f556784b9c660f772546a0b8"
|
||||
integrity sha1-GbTlWTP6Dvj1VnhLnGYPdyVGoLg=
|
||||
electron-updater@^4.0.6:
|
||||
version "4.0.6"
|
||||
resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-4.0.6.tgz#9c4f495ae0e80bf4425e3e1b801c5ed2ab933c2d"
|
||||
integrity sha512-JPGLME6fxJcHG8hX7HWFl6Aew6iVm0DkcrENreKa5SUJCHG+uUaAhxDGDt+YGcNkyx1uJ6eBGMvFxDTLUv67pg==
|
||||
dependencies:
|
||||
debug "^2.2.0"
|
||||
bluebird-lst "^1.0.6"
|
||||
builder-util-runtime "~8.1.0"
|
||||
fs-extra-p "^7.0.0"
|
||||
js-yaml "^3.12.0"
|
||||
lazy-val "^1.0.3"
|
||||
lodash.isequal "^4.5.0"
|
||||
pako "^1.0.7"
|
||||
semver "^5.6.0"
|
||||
source-map-support "^0.5.9"
|
||||
|
||||
env-paths@^0.3.0:
|
||||
version "0.3.1"
|
||||
@ -227,6 +269,11 @@ esprima@^3.1.1:
|
||||
resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633"
|
||||
integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=
|
||||
|
||||
esprima@^4.0.0:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
|
||||
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
|
||||
|
||||
execa@^0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777"
|
||||
@ -255,6 +302,23 @@ find-up@^3.0.0:
|
||||
dependencies:
|
||||
locate-path "^3.0.0"
|
||||
|
||||
fs-extra-p@^7.0.0:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/fs-extra-p/-/fs-extra-p-7.0.1.tgz#4eec0b6dfa150fa90f6ddd773b4fb1d55cad54e3"
|
||||
integrity sha512-yhd2OV0HnHt2oitlp+X9hl2ReX4X/7kQeL7/72qzPHTZj5eUPGzAKOvEglU02Fa1OeG2rSy/aKB4WGVaLiF8tw==
|
||||
dependencies:
|
||||
bluebird-lst "^1.0.7"
|
||||
fs-extra "^7.0.1"
|
||||
|
||||
fs-extra@^7.0.1:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
|
||||
integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==
|
||||
dependencies:
|
||||
graceful-fs "^4.1.2"
|
||||
jsonfile "^4.0.0"
|
||||
universalify "^0.1.0"
|
||||
|
||||
get-caller-file@^1.0.1:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a"
|
||||
@ -265,6 +329,11 @@ get-stream@^3.0.0:
|
||||
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
|
||||
integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=
|
||||
|
||||
graceful-fs@^4.1.2, graceful-fs@^4.1.6:
|
||||
version "4.1.15"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
|
||||
integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==
|
||||
|
||||
highlight.js@^9.3.0:
|
||||
version "9.12.0"
|
||||
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.12.0.tgz#e6d9dbe57cbefe60751f02af336195870c90c01e"
|
||||
@ -320,6 +389,21 @@ js-yaml@3.8.2:
|
||||
argparse "^1.0.7"
|
||||
esprima "^3.1.1"
|
||||
|
||||
js-yaml@^3.12.0:
|
||||
version "3.13.1"
|
||||
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847"
|
||||
integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==
|
||||
dependencies:
|
||||
argparse "^1.0.7"
|
||||
esprima "^4.0.0"
|
||||
|
||||
jsonfile@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
|
||||
integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=
|
||||
optionalDependencies:
|
||||
graceful-fs "^4.1.6"
|
||||
|
||||
keyboardevent-from-electron-accelerator@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/keyboardevent-from-electron-accelerator/-/keyboardevent-from-electron-accelerator-1.1.0.tgz#324614f6e33490c37ffc5be5876b3e85fe223c84"
|
||||
@ -330,6 +414,11 @@ keyboardevents-areequal@^0.2.1:
|
||||
resolved "https://registry.yarnpkg.com/keyboardevents-areequal/-/keyboardevents-areequal-0.2.2.tgz#88191ec738ce9f7591c25e9056de928b40277194"
|
||||
integrity sha512-Nv+Kr33T0mEjxR500q+I6IWisOQ0lK1GGOncV0kWE6n4KFmpcu7RUX5/2B0EUtX51Cb0HjZ9VJsSY3u4cBa0kw==
|
||||
|
||||
lazy-val@^1.0.3:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/lazy-val/-/lazy-val-1.0.4.tgz#882636a7245c2cfe6e0a4e3ba6c5d68a137e5c65"
|
||||
integrity sha512-u93kb2fPbIrfzBuLjZE+w+fJbUUMhNDXxNmMfaqNgpfQf1CO5ZSe2LfsnBqVAk7i/2NF48OSoRj+Xe2VT+lE8Q==
|
||||
|
||||
lcid@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
|
||||
@ -345,6 +434,11 @@ locate-path@^3.0.0:
|
||||
p-locate "^3.0.0"
|
||||
path-exists "^3.0.0"
|
||||
|
||||
lodash.isequal@^4.5.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
|
||||
integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA=
|
||||
|
||||
lru-cache@^4.0.1:
|
||||
version "4.1.3"
|
||||
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c"
|
||||
@ -382,6 +476,11 @@ ms@2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
||||
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
|
||||
|
||||
ms@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
|
||||
integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
|
||||
|
||||
mz@^2.6.0:
|
||||
version "2.6.0"
|
||||
resolved "https://registry.yarnpkg.com/mz/-/mz-2.6.0.tgz#c8b8521d958df0a4f2768025db69c719ee4ef1ce"
|
||||
@ -448,6 +547,11 @@ p-try@^2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1"
|
||||
integrity sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==
|
||||
|
||||
pako@^1.0.7:
|
||||
version "1.0.10"
|
||||
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.10.tgz#4328badb5086a426aa90f541977d4955da5c9732"
|
||||
integrity sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==
|
||||
|
||||
path-exists@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b"
|
||||
@ -519,6 +623,16 @@ rxjs@^6.3.3:
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
sax@^1.2.4:
|
||||
version "1.2.4"
|
||||
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
|
||||
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
|
||||
|
||||
semver@^5.6.0:
|
||||
version "5.7.0"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
|
||||
integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==
|
||||
|
||||
set-blocking@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
|
||||
@ -541,6 +655,19 @@ signal-exit@^3.0.0:
|
||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
|
||||
integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
|
||||
|
||||
source-map-support@^0.5.9:
|
||||
version "0.5.12"
|
||||
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599"
|
||||
integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==
|
||||
dependencies:
|
||||
buffer-from "^1.0.0"
|
||||
source-map "^0.6.0"
|
||||
|
||||
source-map@^0.6.0:
|
||||
version "0.6.1"
|
||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
|
||||
|
||||
sprintf-js@~1.0.2:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
||||
@ -601,6 +728,11 @@ tslib@^1.9.0:
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.1.tgz#a5d1f0532a49221c87755cfcc89ca37197242ba7"
|
||||
integrity sha512-avfPS28HmGLLc2o4elcc2EIq2FcH++Yo5YxpBZi9Yw93BCTGFthI4HPE4Rpep6vSYQaK8e69PelM44tPj+RaQg==
|
||||
|
||||
universalify@^0.1.0:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
|
||||
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
|
||||
|
||||
util@^0.10.3:
|
||||
version "0.10.3"
|
||||
resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9"
|
||||
|
@ -23,6 +23,4 @@ build_script:
|
||||
- node scripts/build-windows.js
|
||||
|
||||
artifacts:
|
||||
- path: 'dist\win\*.exe'
|
||||
- path: 'dist\squirrel-windows\*.exe'
|
||||
- path: 'dist\*.exe'
|
||||
|
3
build/installer.nsh
Normal file
@ -0,0 +1,3 @@
|
||||
!macro customInit
|
||||
nsExec::Exec '"$LOCALAPPDATA\terminus\Update.exe" --uninstall -s'
|
||||
!macroend
|
35
package.json
@ -15,8 +15,7 @@
|
||||
"cross-env": "4.0.0",
|
||||
"css-loader": "0.28.0",
|
||||
"electron": "^5.0.1",
|
||||
"electron-builder": "^20.38.4",
|
||||
"electron-builder-squirrel-windows": "^20.28.3",
|
||||
"electron-builder": "^20.40.2",
|
||||
"electron-installer-snap": "^3.0.0",
|
||||
"electron-rebuild": "^1.8.4",
|
||||
"file-loader": "^1.1.11",
|
||||
@ -49,8 +48,8 @@
|
||||
"typescript": "^3.1.3",
|
||||
"url-loader": "^1.1.1",
|
||||
"val-loader": "0.5.0",
|
||||
"webpack": "^4.30.0",
|
||||
"webpack-cli": "^3.3.1",
|
||||
"webpack": "^4.31.0",
|
||||
"webpack-cli": "^3.3.2",
|
||||
"yaml-loader": "0.4.0",
|
||||
"yarn": "^1.10.1"
|
||||
},
|
||||
@ -71,16 +70,22 @@
|
||||
],
|
||||
"win": {
|
||||
"icon": "./build/windows/icon.ico",
|
||||
"publish": [
|
||||
"github"
|
||||
],
|
||||
"artifactName": "terminus-${version}-setup.exe"
|
||||
},
|
||||
"squirrelWindows": {
|
||||
"iconUrl": "https://github.com/Eugeny/terminus/raw/master/build/windows/icon.ico",
|
||||
"loadingGif": "./build/windows/squirrel.gif",
|
||||
"artifactName": "terminus-${version}-setup.exe"
|
||||
"nsis": {
|
||||
"oneClick": false,
|
||||
"artifactName": "terminus-${version}-setup.${ext}",
|
||||
"installerIcon": "./build/windows/icon.ico"
|
||||
},
|
||||
"publish": [
|
||||
{
|
||||
"provider": "bintray",
|
||||
"token": "d993c4faa708a4cba84fa3a8e822457e7298d75c"
|
||||
},
|
||||
{
|
||||
"provider": "github"
|
||||
}
|
||||
],
|
||||
"portable": {
|
||||
"artifactName": "terminus-${version}-portable.exe"
|
||||
},
|
||||
@ -88,9 +93,6 @@
|
||||
"category": "public.app-category.video",
|
||||
"icon": "./build/mac/icon.icns",
|
||||
"artifactName": "terminus-${version}-macos.${ext}",
|
||||
"publish": [
|
||||
"github"
|
||||
],
|
||||
"extendInfo": {
|
||||
"NSRequiresAquaSystemAppearance": false
|
||||
}
|
||||
@ -101,10 +103,7 @@
|
||||
"linux": {
|
||||
"category": "Utilities",
|
||||
"icon": "./build/icons",
|
||||
"artifactName": "terminus-${version}-linux.${ext}",
|
||||
"publish": [
|
||||
"github"
|
||||
]
|
||||
"artifactName": "terminus-${version}-linux.${ext}"
|
||||
},
|
||||
"deb": {
|
||||
"depends": [
|
||||
|
@ -4,7 +4,7 @@ const path = require('path')
|
||||
const vars = require('./vars')
|
||||
|
||||
lifecycles = []
|
||||
for (let dir of ['app', 'terminus-ssh', 'terminus-terminal']) {
|
||||
for (let dir of ['app', 'terminus-core', 'terminus-ssh', 'terminus-terminal']) {
|
||||
lifecycles.push([rebuild({
|
||||
buildPath: path.resolve(__dirname, '../' + dir),
|
||||
electronVersion: vars.electronVersion,
|
||||
|
@ -4,7 +4,7 @@ const vars = require('./vars')
|
||||
|
||||
builder({
|
||||
dir: true,
|
||||
win: ['squirrel', 'portable'],
|
||||
win: ['nsis', 'portable'],
|
||||
config: {
|
||||
extraMetadata: {
|
||||
version: vars.version,
|
||||
|
@ -27,10 +27,12 @@
|
||||
"electron-updater": "^2.8.9",
|
||||
"ng2-dnd": "^5.0.2",
|
||||
"ngx-perfect-scrollbar": "^6.0.0",
|
||||
"rage-edit": "^1.2.0",
|
||||
"shell-escape": "^0.2.0",
|
||||
"universal-analytics": "^0.4.17"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"windows-native-registry": "^1.0.14"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/animations": "4.0.1",
|
||||
"@angular/common": "4.0.1",
|
||||
|
@ -44,11 +44,13 @@ title-bar(
|
||||
ngbDropdownToggle,
|
||||
)
|
||||
div(*ngIf='button.submenu', ngbDropdownMenu)
|
||||
button.dropdown-item(
|
||||
button.dropdown-item.d-flex.align-items-center(
|
||||
*ngFor='let item of button.submenuItems',
|
||||
(click)='item.click()',
|
||||
ngbDropdownItem,
|
||||
) {{item.title}}
|
||||
)
|
||||
.icon-wrapper([innerHTML]='item.icon')
|
||||
.ml-3 {{item.title}}
|
||||
|
||||
.drag-space.background([class.persistent]='config.store.appearance.frame == "thin" && hostApp.platform != Platform.macOS')
|
||||
|
||||
@ -65,11 +67,13 @@ title-bar(
|
||||
ngbDropdownToggle,
|
||||
)
|
||||
div(*ngIf='button.submenu', ngbDropdownMenu)
|
||||
button.dropdown-item(
|
||||
button.dropdown-item.d-flex.align-items-center(
|
||||
*ngFor='let item of button.submenuItems',
|
||||
(click)='item.click()',
|
||||
ngbDropdownItem,
|
||||
) {{item.title}}
|
||||
)
|
||||
.icon-wrapper([innerHTML]='item.icon')
|
||||
.ml-3 {{item.title}}
|
||||
|
||||
button.btn.btn-secondary.btn-tab-bar.btn-update(
|
||||
*ngIf='updatesAvailable',
|
||||
|
@ -88,12 +88,20 @@ hotkey-hint {
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
::ng-deep .btn-tab-bar svg {
|
||||
::ng-deep .btn-tab-bar svg,
|
||||
::ng-deep .btn-tab-bar + .dropdown-menu svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
fill: white;
|
||||
fill-opacity: 0.75;
|
||||
}
|
||||
|
||||
.icon-wrapper {
|
||||
display: flex;
|
||||
width: 16px;
|
||||
height: 17px;
|
||||
}
|
||||
|
||||
::ng-deep .btn-update svg {
|
||||
fill: cyan;
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ export class HostAppService {
|
||||
*/
|
||||
shown = new EventEmitter<any>()
|
||||
isFullScreen = false
|
||||
isPortable = !!process.env.PORTABLE_EXECUTABLE_FILE
|
||||
|
||||
private preferencesMenu = new Subject<void>()
|
||||
private secondInstance = new Subject<void>()
|
||||
@ -251,6 +252,15 @@ export class HostAppService {
|
||||
this.electron.ipcRenderer.send('window-close')
|
||||
}
|
||||
|
||||
relaunch () {
|
||||
if (this.isPortable) {
|
||||
this.electron.app.relaunch({ execPath: process.env.PORTABLE_EXECUTABLE_FILE })
|
||||
} else {
|
||||
this.electron.app.relaunch()
|
||||
}
|
||||
this.electron.app.exit()
|
||||
}
|
||||
|
||||
quit () {
|
||||
this.logger.info('Quitting')
|
||||
this.electron.app.quit()
|
||||
|
@ -1,11 +1,14 @@
|
||||
import * as path from 'path'
|
||||
import * as fs from 'mz/fs'
|
||||
import { Registry } from 'rage-edit'
|
||||
import { exec } from 'mz/child_process'
|
||||
import { Injectable } from '@angular/core'
|
||||
import { ElectronService } from './electron.service'
|
||||
import { HostAppService, Platform } from './hostApp.service'
|
||||
|
||||
try {
|
||||
var wnr = require('windows-native-registry') // tslint:disable-line
|
||||
} catch (_) { } // tslint:disable-line
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class ShellIntegrationService {
|
||||
private automatorWorkflows = ['Open Terminus here.workflow', 'Paste path into Terminus.workflow']
|
||||
@ -13,11 +16,11 @@ export class ShellIntegrationService {
|
||||
private automatorWorkflowsDestination: string
|
||||
private registryKeys = [
|
||||
{
|
||||
path: 'HKCU\\Software\\Classes\\Directory\\Background\\shell\\Open Terminus here',
|
||||
path: 'Software\\Classes\\Directory\\Background\\shell\\Open Terminus here',
|
||||
command: 'open "%V"'
|
||||
},
|
||||
{
|
||||
path: 'HKCU\\Software\\Classes\\*\\shell\\Paste path into Terminus',
|
||||
path: 'Software\\Classes\\*\\shell\\Paste path into Terminus',
|
||||
command: 'paste "%V"'
|
||||
},
|
||||
]
|
||||
@ -50,20 +53,35 @@ export class ShellIntegrationService {
|
||||
if (this.hostApp.platform === Platform.macOS) {
|
||||
return fs.exists(path.join(this.automatorWorkflowsDestination, this.automatorWorkflows[0]))
|
||||
} else if (this.hostApp.platform === Platform.Windows) {
|
||||
return Registry.has(this.registryKeys[0].path)
|
||||
return !!wnr.getRegistryKey(wnr.HK.CU, this.registryKeys[0].path)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
async install () {
|
||||
const exe = process.env.PORTABLE_EXECUTABLE_FILE || this.electron.app.getPath('exe')
|
||||
if (this.hostApp.platform === Platform.macOS) {
|
||||
for (let wf of this.automatorWorkflows) {
|
||||
await exec(`cp -r "${this.automatorWorkflowsLocation}/${wf}" "${this.automatorWorkflowsDestination}"`)
|
||||
}
|
||||
} else if (this.hostApp.platform === Platform.Windows) {
|
||||
for (let registryKey of this.registryKeys) {
|
||||
await Registry.set(registryKey.path, 'Icon', this.electron.app.getPath('exe'))
|
||||
await Registry.set(registryKey.path + '\\command', '', this.electron.app.getPath('exe') + ' ' + registryKey.command)
|
||||
wnr.createRegistryKey(wnr.HK.CU, registryKey.path)
|
||||
wnr.createRegistryKey(wnr.HK.CU, registryKey.path + '\\command')
|
||||
wnr.setRegistryValue(wnr.HK.CU, registryKey.path, 'Icon', wnr.REG.SZ, exe)
|
||||
wnr.setRegistryValue(wnr.HK.CU, registryKey.path + '\\command', '', wnr.REG.SZ, exe + ' ' + registryKey.command)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async remove () {
|
||||
if (this.hostApp.platform === Platform.macOS) {
|
||||
for (let wf of this.automatorWorkflows) {
|
||||
await exec(`rm -rf "${this.automatorWorkflowsDestination}/${wf}"`)
|
||||
}
|
||||
} else if (this.hostApp.platform === Platform.Windows) {
|
||||
for (let registryKey of this.registryKeys) {
|
||||
wnr.deleteRegistryKey(wnr.HK.CU, registryKey.path)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import axios from 'axios'
|
||||
import * as os from 'os'
|
||||
|
||||
import { Injectable } from '@angular/core'
|
||||
import { Logger, LogService } from './log.service'
|
||||
import { ElectronService } from './electron.service'
|
||||
@ -11,8 +11,9 @@ const UPDATES_URL = 'https://api.github.com/repos/eugeny/terminus/releases/lates
|
||||
export class UpdaterService {
|
||||
private logger: Logger
|
||||
private downloaded: Promise<boolean>
|
||||
private isSquirrel = true
|
||||
private electronUpdaterAvailable = true
|
||||
private updateURL: string
|
||||
private autoUpdater
|
||||
|
||||
constructor (
|
||||
log: LogService,
|
||||
@ -20,38 +21,33 @@ export class UpdaterService {
|
||||
) {
|
||||
this.logger = log.create('updater')
|
||||
|
||||
try {
|
||||
electron.autoUpdater.setFeedURL(`https://terminus-updates.herokuapp.com/update/${os.platform()}/${electron.app.getVersion()}`)
|
||||
} catch (e) {
|
||||
this.isSquirrel = false
|
||||
this.logger.info('Squirrel updater unavailable, falling back')
|
||||
}
|
||||
this.autoUpdater = electron.remote.require('electron-updater').autoUpdater
|
||||
|
||||
this.electron.autoUpdater.on('update-available', () => {
|
||||
this.autoUpdater.on('update-available', () => {
|
||||
this.logger.info('Update available')
|
||||
})
|
||||
this.electron.autoUpdater.once('update-not-available', () => {
|
||||
this.autoUpdater.once('update-not-available', () => {
|
||||
this.logger.info('No updates')
|
||||
})
|
||||
|
||||
this.downloaded = new Promise<boolean>(resolve => {
|
||||
this.electron.autoUpdater.once('update-downloaded', () => resolve(true))
|
||||
this.autoUpdater.once('update-downloaded', () => resolve(true))
|
||||
})
|
||||
|
||||
this.logger.debug('Checking for updates')
|
||||
|
||||
if (this.isSquirrel) {
|
||||
if (this.electronUpdaterAvailable) {
|
||||
try {
|
||||
this.electron.autoUpdater.checkForUpdates()
|
||||
this.autoUpdater.checkForUpdates()
|
||||
} catch (e) {
|
||||
this.isSquirrel = false
|
||||
this.logger.info('Squirrel updater unavailable, falling back')
|
||||
this.electronUpdaterAvailable = false
|
||||
this.logger.info('Electron updater unavailable, falling back', e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async check (): Promise<boolean> {
|
||||
if (!this.isSquirrel) {
|
||||
if (!this.electronUpdaterAvailable) {
|
||||
this.logger.debug('Checking for updates')
|
||||
let response = await axios.get(UPDATES_URL)
|
||||
let data = response.data
|
||||
@ -68,11 +64,11 @@ export class UpdaterService {
|
||||
}
|
||||
|
||||
async update () {
|
||||
if (!this.isSquirrel) {
|
||||
if (!this.electronUpdaterAvailable) {
|
||||
this.electron.shell.openExternal(this.updateURL)
|
||||
} else {
|
||||
await this.downloaded
|
||||
this.electron.autoUpdater.quitAndInstall()
|
||||
this.autoUpdater.quitAndInstall()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -55,6 +55,7 @@ module.exports = {
|
||||
'untildify',
|
||||
'winston',
|
||||
'js-yaml',
|
||||
'windows-native-registry',
|
||||
/^rxjs/,
|
||||
/^@angular/,
|
||||
/^@ng-bootstrap/,
|
||||
|
@ -448,6 +448,11 @@ ms@2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
||||
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
|
||||
|
||||
nan@^2.13.2:
|
||||
version "2.14.0"
|
||||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c"
|
||||
integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==
|
||||
|
||||
ng2-dnd@^5.0.2:
|
||||
version "5.0.2"
|
||||
resolved "https://registry.yarnpkg.com/ng2-dnd/-/ng2-dnd-5.0.2.tgz#862278ac7dedfa14f5783bbf34014d5d73dfefb4"
|
||||
@ -486,11 +491,6 @@ qs@~6.5.1:
|
||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
|
||||
integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
|
||||
|
||||
rage-edit@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/rage-edit/-/rage-edit-1.2.0.tgz#991860a60fef934d8a6d0f057e55786b02f94a2b"
|
||||
integrity sha512-0RspBRc2s6We4g7hRCvT5mu7YPEnfjvQK8Tt354a2uUNJCMC7MKLvo/1mLvHUCQ/zbP6siQyp5VRZN7UCpMFZg==
|
||||
|
||||
request@2.86.0:
|
||||
version "2.86.0"
|
||||
resolved "https://registry.yarnpkg.com/request/-/request-2.86.0.tgz#2b9497f449b0a32654c081a5cf426bbfb5bf5b69"
|
||||
@ -647,6 +647,13 @@ verror@1.10.0:
|
||||
core-util-is "1.0.2"
|
||||
extsprintf "^1.2.0"
|
||||
|
||||
windows-native-registry@^1.0.14:
|
||||
version "1.0.14"
|
||||
resolved "https://registry.yarnpkg.com/windows-native-registry/-/windows-native-registry-1.0.14.tgz#35c742b1278473127cbfb3b76e0db3d1ef626872"
|
||||
integrity sha512-C2UgyZYJYcPFjkhfNuy09CUa6wXAti4x/tLPgzudDDrqpTyczcgnBEpiablmE6j7E7ownouWTqgVcHW8HJyqhw==
|
||||
dependencies:
|
||||
nan "^2.13.2"
|
||||
|
||||
winston@^2.4.0:
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/winston/-/winston-2.4.0.tgz#808050b93d52661ed9fb6c26b3f0c826708b0aee"
|
||||
|
@ -20,14 +20,6 @@ ngb-tabset.vertical(type='pills', [activeId]='activeTab')
|
||||
i.fas.fa-bug
|
||||
span Report a problem
|
||||
|
||||
.form-line(*ngIf='!isShellIntegrationInstalled')
|
||||
.header
|
||||
.title Shell integration
|
||||
.description Allows quickly opening a terminal in the selected folder
|
||||
button.btn.btn-primary((click)='installShellIntegration()')
|
||||
i.fas.fa-check
|
||||
span Install
|
||||
|
||||
.form-line
|
||||
.header
|
||||
.title Theme
|
||||
@ -106,6 +98,12 @@ ngb-tabset.vertical(type='pills', [activeId]='activeTab')
|
||||
step='0.01'
|
||||
)
|
||||
|
||||
.form-line(*ngIf='hostApp.platform !== Platform.Linux')
|
||||
.header
|
||||
.title Shell integration
|
||||
.description Allows quickly opening a terminal in the selected folder
|
||||
toggle([ngModel]='isShellIntegrationInstalled', (ngModelChange)='toggleShellIntegration()')
|
||||
|
||||
.form-line
|
||||
.header
|
||||
.title Window frame
|
||||
|
@ -81,6 +81,15 @@ export class SettingsTabComponent extends BaseTabComponent {
|
||||
this.isShellIntegrationInstalled = await this.shellIntegration.isInstalled()
|
||||
}
|
||||
|
||||
async toggleShellIntegration () {
|
||||
if (!this.isShellIntegrationInstalled) {
|
||||
await this.shellIntegration.install()
|
||||
} else {
|
||||
await this.shellIntegration.remove()
|
||||
}
|
||||
this.isShellIntegrationInstalled = await this.shellIntegration.isInstalled()
|
||||
}
|
||||
|
||||
async getRecoveryToken (): Promise<any> {
|
||||
return { type: 'app:settings' }
|
||||
}
|
||||
@ -91,8 +100,7 @@ export class SettingsTabComponent extends BaseTabComponent {
|
||||
}
|
||||
|
||||
restartApp () {
|
||||
this.electron.app.relaunch()
|
||||
this.electron.app.exit()
|
||||
this.hostApp.relaunch()
|
||||
}
|
||||
|
||||
saveConfigFile () {
|
||||
@ -114,11 +122,6 @@ export class SettingsTabComponent extends BaseTabComponent {
|
||||
}
|
||||
}
|
||||
|
||||
async installShellIntegration () {
|
||||
await this.shellIntegration.install()
|
||||
this.isShellIntegrationInstalled = true
|
||||
}
|
||||
|
||||
getHotkey (id: string) {
|
||||
let ptr = this.config.store.hotkeys
|
||||
for (let token of id.split(/\./g)) {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { SafeHtml } from '@angular/platform-browser'
|
||||
import { BaseTerminalTabComponent } from './components/baseTerminalTab.component'
|
||||
|
||||
/**
|
||||
@ -36,6 +37,7 @@ export interface Profile {
|
||||
name: string,
|
||||
sessionOptions: SessionOptions,
|
||||
isBuiltin?: boolean
|
||||
icon?: SafeHtml
|
||||
}
|
||||
|
||||
export interface ITerminalColorScheme {
|
||||
@ -74,6 +76,13 @@ export interface IShell {
|
||||
* Currently used for WSL only
|
||||
*/
|
||||
fsBase?: string
|
||||
|
||||
/**
|
||||
* SVG icon
|
||||
*/
|
||||
icon?: SafeHtml
|
||||
|
||||
hidden?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -46,7 +46,7 @@ export class ButtonProvider extends ToolbarButtonProvider {
|
||||
submenu: async () => {
|
||||
let profiles = await this.terminal.getProfiles()
|
||||
return profiles.map(profile => ({
|
||||
icon: null,
|
||||
icon: profile.icon,
|
||||
title: profile.name,
|
||||
click: () => this.terminal.openTab(profile),
|
||||
}))
|
||||
|
@ -11,7 +11,7 @@ h3.mb-3 Shell
|
||||
)
|
||||
option(
|
||||
*ngFor='let profile of profiles',
|
||||
[ngValue]='slug(profile.name)'
|
||||
[ngValue]='slug(profile.name).toLowerCase()'
|
||||
) {{profile.name}}
|
||||
|
||||
|
||||
|
@ -47,7 +47,7 @@ export class ShellSettingsTabComponent {
|
||||
}
|
||||
|
||||
async reload () {
|
||||
this.profiles = await this.terminalService.getProfiles()
|
||||
this.profiles = await this.terminalService.getProfiles(true)
|
||||
}
|
||||
|
||||
pickWorkingDirectory () {
|
||||
|
@ -74,7 +74,7 @@ export class TerminalHotkeyProvider extends HotkeyProvider {
|
||||
return [
|
||||
...this.hotkeys,
|
||||
...profiles.map(profile => ({
|
||||
id: `profile.${slug(profile.name)}`,
|
||||
id: `profile.${slug(profile.name).toLowerCase()}`,
|
||||
name: `New tab: ${profile.name}`
|
||||
})),
|
||||
]
|
||||
|
1
terminus-terminal/src/icons/clink.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="windows" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-windows fa-w-14 fa-2x"><path fill="cyan" d="M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z" class="" stroke="none" stroke-width="1px"></path></svg>
|
After Width: | Height: | Size: 410 B |
1
terminus-terminal/src/icons/cmd.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="windows" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-windows fa-w-14 fa-2x"><path fill="#ffffff" d="M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z" class="" stroke="none" stroke-width="1px"></path></svg>
|
After Width: | Height: | Size: 412 B |
1
terminus-terminal/src/icons/cmder-powershell.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="lambda" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-lambda fa-w-14 fa-2x"><path fill="cyan" d="M424 384h-43.5L197.6 48.68A32.018 32.018 0 0 0 169.5 32H24C10.75 32 0 42.74 0 56v48c0 13.25 10.75 24 24 24h107.5l4.63 8.49L3.25 446.55C-3.53 462.38 8.08 480 25.31 480h52.23c9.6 0 18.28-5.72 22.06-14.55l95.02-221.72L314.4 463.32A32.018 32.018 0 0 0 342.5 480H424c13.25 0 24-10.75 24-24v-48c0-13.26-10.75-24-24-24z" class="" stroke="none" stroke-width="1px"></path></svg>
|
After Width: | Height: | Size: 585 B |
1
terminus-terminal/src/icons/cmder.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="lambda" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-lambda fa-w-14 fa-2x"><path fill="#8ab91d" d="M424 384h-43.5L197.6 48.68A32.018 32.018 0 0 0 169.5 32H24C10.75 32 0 42.74 0 56v48c0 13.25 10.75 24 24 24h107.5l4.63 8.49L3.25 446.55C-3.53 462.38 8.08 480 25.31 480h52.23c9.6 0 18.28-5.72 22.06-14.55l95.02-221.72L314.4 463.32A32.018 32.018 0 0 0 342.5 480H424c13.25 0 24-10.75 24-24v-48c0-13.26-10.75-24-24-24z" class="" stroke="none" stroke-width="1px"></path></svg>
|
After Width: | Height: | Size: 588 B |
6
terminus-terminal/src/icons/cygwin.svg
Normal file
@ -0,0 +1,6 @@
|
||||
<svg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'>
|
||||
<g stroke-linejoin='round' stroke-width='4'>
|
||||
<path d='M94,19l-28-9h-39c-9,0-19,9-19,19v47c0,9,10,19,19,19h39l28-10l-28-9h-26c-9,0-13-3-13-13v-22c0-10,4-13,13-13h26z' fill='#eee' />
|
||||
<path d='M94,52l-41-11h-13v3c10,0,10,16,0,16v3h13z' fill='lime'/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 322 B |
1
terminus-terminal/src/icons/git-bash.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="git-alt" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-git-alt fa-w-14 fa-3x"><path fill="#f05033" d="M439.55 236.05L244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z" class="" stroke="none" stroke-width="1px"></path></svg>
|
After Width: | Height: | Size: 736 B |
1
terminus-terminal/src/icons/powershell-core.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="terminal" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" class="svg-inline--fa fa-terminal fa-w-20 fa-2x"><path fill="purple" d="M257.981 272.971L63.638 467.314c-9.373 9.373-24.569 9.373-33.941 0L7.029 444.647c-9.357-9.357-9.375-24.522-.04-33.901L161.011 256 6.99 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L257.981 239.03c9.373 9.372 9.373 24.568 0 33.941zM640 456v-32c0-13.255-10.745-24-24-24H312c-13.255 0-24 10.745-24 24v32c0 13.255 10.745 24 24 24h304c13.255 0 24-10.745 24-24z" class="" stroke="none" stroke-width="1px"></path></svg>
|
After Width: | Height: | Size: 680 B |
1
terminus-terminal/src/icons/powershell.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="terminal" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" class="svg-inline--fa fa-terminal fa-w-20 fa-2x"><path fill="cyan" d="M257.981 272.971L63.638 467.314c-9.373 9.373-24.569 9.373-33.941 0L7.029 444.647c-9.357-9.357-9.375-24.522-.04-33.901L161.011 256 6.99 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L257.981 239.03c9.373 9.372 9.373 24.568 0 33.941zM640 456v-32c0-13.255-10.745-24-24-24H312c-13.255 0-24 10.745-24 24v32c0 13.255 10.745 24 24 24h304c13.255 0 24-10.745 24-24z" class="" stroke="none" stroke-width="1px"></path></svg>
|
After Width: | Height: | Size: 678 B |
@ -75,13 +75,13 @@ import { hterm } from './frontends/hterm'
|
||||
{ provide: ShellProvider, useClass: MacOSDefaultShellProvider, multi: true },
|
||||
{ provide: ShellProvider, useClass: LinuxDefaultShellProvider, multi: true },
|
||||
{ provide: ShellProvider, useClass: WindowsStockShellsProvider, multi: true },
|
||||
{ provide: ShellProvider, useClass: PowerShellCoreShellProvider, multi: true },
|
||||
{ provide: ShellProvider, useClass: CmderShellProvider, multi: true },
|
||||
{ provide: ShellProvider, useClass: CustomShellProvider, multi: true },
|
||||
{ provide: ShellProvider, useClass: Cygwin32ShellProvider, multi: true },
|
||||
{ provide: ShellProvider, useClass: Cygwin64ShellProvider, multi: true },
|
||||
{ provide: ShellProvider, useClass: GitBashShellProvider, multi: true },
|
||||
{ provide: ShellProvider, useClass: POSIXShellsProvider, multi: true },
|
||||
{ provide: ShellProvider, useClass: PowerShellCoreShellProvider, multi: true },
|
||||
{ provide: ShellProvider, useClass: WSLShellProvider, multi: true },
|
||||
|
||||
{ provide: TerminalContextMenuItemProvider, useClass: NewTabContextMenu, multi: true },
|
||||
@ -163,7 +163,7 @@ export default class TerminalModule {
|
||||
}
|
||||
if (hotkey.startsWith('profile.')) {
|
||||
let profiles = await config.store.terminal.getProfiles()
|
||||
let profile = profiles.find(x => slug(x.name) === hotkey.split('.')[1])
|
||||
let profile = profiles.find(x => slug(x.name).toLowerCase() === hotkey.split('.')[1])
|
||||
if (profile) {
|
||||
terminal.openTabWithOptions(profile.sessionOptions)
|
||||
}
|
||||
|
@ -38,12 +38,13 @@ export class TerminalService {
|
||||
return shellLists.reduce((a, b) => a.concat(b), [])
|
||||
}
|
||||
|
||||
async getProfiles (): Promise<Profile[]> {
|
||||
async getProfiles (includeHidden?: boolean): Promise<Profile[]> {
|
||||
let shells = await this.shells$.toPromise()
|
||||
return [
|
||||
...this.config.store.terminal.profiles,
|
||||
...shells.map(shell => ({
|
||||
...shells.filter(x => includeHidden || !x.hidden).map(shell => ({
|
||||
name: shell.name,
|
||||
icon: shell.icon,
|
||||
sessionOptions: this.optionsFromShell(shell),
|
||||
isBuiltin: true
|
||||
}))
|
||||
@ -65,7 +66,7 @@ export class TerminalService {
|
||||
async openTab (profile?: Profile, cwd?: string, pause?: boolean): Promise<TerminalTabComponent> {
|
||||
if (!profile) {
|
||||
let profiles = await this.getProfiles()
|
||||
profile = profiles.find(x => slug(x.name) === this.config.store.terminal.profile) || profiles[0]
|
||||
profile = profiles.find(x => slug(x.name).toLowerCase() === this.config.store.terminal.profile) || profiles[0]
|
||||
}
|
||||
|
||||
cwd = cwd || profile.sessionOptions.cwd
|
||||
|
@ -1,5 +1,6 @@
|
||||
import * as path from 'path'
|
||||
import { Injectable } from '@angular/core'
|
||||
import { DomSanitizer } from '@angular/platform-browser'
|
||||
import { HostAppService, Platform } from 'terminus-core'
|
||||
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
@ -8,6 +9,7 @@ import { ShellProvider, IShell } from '../api'
|
||||
@Injectable()
|
||||
export class CmderShellProvider extends ShellProvider {
|
||||
constructor (
|
||||
private domSanitizer: DomSanitizer,
|
||||
private hostApp: HostAppService,
|
||||
) {
|
||||
super()
|
||||
@ -31,6 +33,7 @@ export class CmderShellProvider extends ShellProvider {
|
||||
'/k',
|
||||
path.join(process.env.CMDER_ROOT, 'vendor', 'init.bat'),
|
||||
],
|
||||
icon: this.domSanitizer.bypassSecurityTrustHtml(require('../icons/cmder.svg')),
|
||||
env: {
|
||||
TERM: 'cygwin',
|
||||
}
|
||||
@ -48,6 +51,7 @@ export class CmderShellProvider extends ShellProvider {
|
||||
'-command',
|
||||
`Invoke-Expression '. ''${path.join(process.env.CMDER_ROOT, 'vendor', 'profile.ps1')}'''`
|
||||
],
|
||||
icon: this.domSanitizer.bypassSecurityTrustHtml(require('../icons/cmder-powershell.svg')),
|
||||
env: {},
|
||||
},
|
||||
]
|
||||
|
@ -1,5 +1,6 @@
|
||||
import * as path from 'path'
|
||||
import { Injectable } from '@angular/core'
|
||||
import { DomSanitizer } from '@angular/platform-browser'
|
||||
import { HostAppService, Platform } from 'terminus-core'
|
||||
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
@ -12,6 +13,7 @@ try {
|
||||
@Injectable()
|
||||
export class Cygwin32ShellProvider extends ShellProvider {
|
||||
constructor (
|
||||
private domSanitizer: DomSanitizer,
|
||||
private hostApp: HostAppService,
|
||||
) {
|
||||
super()
|
||||
@ -32,6 +34,7 @@ export class Cygwin32ShellProvider extends ShellProvider {
|
||||
id: 'cygwin32',
|
||||
name: 'Cygwin (32 bit)',
|
||||
command: path.join(cygwinPath, 'bin', 'bash.exe'),
|
||||
icon: this.domSanitizer.bypassSecurityTrustHtml(require('../icons/cygwin.svg')),
|
||||
env: {
|
||||
TERM: 'cygwin',
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import * as path from 'path'
|
||||
import { Injectable } from '@angular/core'
|
||||
import { DomSanitizer } from '@angular/platform-browser'
|
||||
import { HostAppService, Platform } from 'terminus-core'
|
||||
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
@ -12,6 +13,7 @@ try {
|
||||
@Injectable()
|
||||
export class Cygwin64ShellProvider extends ShellProvider {
|
||||
constructor (
|
||||
private domSanitizer: DomSanitizer,
|
||||
private hostApp: HostAppService,
|
||||
) {
|
||||
super()
|
||||
@ -32,6 +34,7 @@ export class Cygwin64ShellProvider extends ShellProvider {
|
||||
id: 'cygwin64',
|
||||
name: 'Cygwin',
|
||||
command: path.join(cygwinPath, 'bin', 'bash.exe'),
|
||||
icon: this.domSanitizer.bypassSecurityTrustHtml(require('../icons/cygwin.svg')),
|
||||
env: {
|
||||
TERM: 'cygwin',
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import * as path from 'path'
|
||||
import { Injectable } from '@angular/core'
|
||||
import { DomSanitizer } from '@angular/platform-browser'
|
||||
import { HostAppService, Platform } from 'terminus-core'
|
||||
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
@ -12,6 +13,7 @@ try {
|
||||
@Injectable()
|
||||
export class GitBashShellProvider extends ShellProvider {
|
||||
constructor (
|
||||
private domSanitizer: DomSanitizer,
|
||||
private hostApp: HostAppService,
|
||||
) {
|
||||
super()
|
||||
@ -37,6 +39,7 @@ export class GitBashShellProvider extends ShellProvider {
|
||||
name: 'Git-Bash',
|
||||
command: path.join(gitBashPath, 'bin', 'bash.exe'),
|
||||
args: [ '--login', '-i' ],
|
||||
icon: this.domSanitizer.bypassSecurityTrustHtml(require('../icons/git-bash.svg')),
|
||||
env: {
|
||||
TERM: 'cygwin',
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ export class LinuxDefaultShellProvider extends ShellProvider {
|
||||
name: 'User default',
|
||||
command: line.split(':')[6],
|
||||
args: ['--login'],
|
||||
hidden: true,
|
||||
env: {},
|
||||
}]
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ export class MacOSDefaultShellProvider extends ShellProvider {
|
||||
name: 'User default',
|
||||
command: shellEntry.split(' ')[1].trim(),
|
||||
args: ['--login'],
|
||||
hidden: true,
|
||||
env: {},
|
||||
}]
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Injectable } from '@angular/core'
|
||||
import { DomSanitizer } from '@angular/platform-browser'
|
||||
import { HostAppService, Platform } from 'terminus-core'
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
|
||||
@ -10,6 +11,7 @@ try {
|
||||
@Injectable()
|
||||
export class PowerShellCoreShellProvider extends ShellProvider {
|
||||
constructor (
|
||||
private domSanitizer: DomSanitizer,
|
||||
private hostApp: HostAppService,
|
||||
) {
|
||||
super()
|
||||
@ -31,6 +33,7 @@ export class PowerShellCoreShellProvider extends ShellProvider {
|
||||
name: 'PowerShell Core',
|
||||
command: pwshPath,
|
||||
args: ['-nologo'],
|
||||
icon: this.domSanitizer.bypassSecurityTrustHtml(require('../icons/powershell-core.svg')),
|
||||
env: {
|
||||
TERM: 'cygwin',
|
||||
}
|
||||
|
@ -39,7 +39,8 @@ export class WindowsDefaultShellProvider extends ShellProvider {
|
||||
return [{
|
||||
...shell,
|
||||
id: 'default',
|
||||
name: 'User default',
|
||||
name: `Default (${shell.name})`,
|
||||
hidden: true,
|
||||
env: {},
|
||||
}]
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import * as path from 'path'
|
||||
import { Injectable } from '@angular/core'
|
||||
import { DomSanitizer } from '@angular/platform-browser'
|
||||
import { HostAppService, Platform, ElectronService } from 'terminus-core'
|
||||
|
||||
import { ShellProvider, IShell } from '../api'
|
||||
@ -8,6 +9,7 @@ import { ShellProvider, IShell } from '../api'
|
||||
@Injectable()
|
||||
export class WindowsStockShellsProvider extends ShellProvider {
|
||||
constructor (
|
||||
private domSanitizer: DomSanitizer,
|
||||
private hostApp: HostAppService,
|
||||
private electron: ElectronService,
|
||||
) {
|
||||
@ -35,13 +37,21 @@ export class WindowsStockShellsProvider extends ShellProvider {
|
||||
'inject',
|
||||
],
|
||||
env: {},
|
||||
icon: this.domSanitizer.bypassSecurityTrustHtml(require('../icons/clink.svg')),
|
||||
},
|
||||
{
|
||||
id: 'cmd',
|
||||
name: 'CMD (stock)',
|
||||
command: 'cmd.exe',
|
||||
env: {},
|
||||
icon: this.domSanitizer.bypassSecurityTrustHtml(require('../icons/cmd.svg')),
|
||||
},
|
||||
{ id: 'cmd', name: 'CMD (stock)', command: 'cmd.exe', env: {} },
|
||||
{
|
||||
id: 'powershell',
|
||||
name: 'PowerShell',
|
||||
command: 'powershell.exe',
|
||||
args: ['-nologo'],
|
||||
icon: this.domSanitizer.bypassSecurityTrustHtml(require('../icons/powershell.svg')),
|
||||
env: {
|
||||
TERM: 'cygwin',
|
||||
}
|
||||
|