Compare commits
64 Commits
v0.0.1
...
v1.0.0-alp
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9badd88c80 | ||
![]() |
7a24c9aa3a | ||
![]() |
8a7e7c4eb5 | ||
![]() |
d0c10278fb | ||
![]() |
2ae004db53 | ||
![]() |
7b34b668c1 | ||
![]() |
7c09fc4a38 | ||
![]() |
89ff9d0ea2 | ||
![]() |
b4e503b26c | ||
![]() |
edc911605b | ||
![]() |
30115d0996 | ||
![]() |
5204d944c6 | ||
![]() |
39335bc23a | ||
![]() |
cad417694d | ||
![]() |
fe75b77420 | ||
![]() |
5372ccf59c | ||
![]() |
4dad9b1661 | ||
![]() |
19e4620676 | ||
![]() |
3eea217728 | ||
![]() |
cedb0d50f6 | ||
![]() |
434199c108 | ||
![]() |
aaad210901 | ||
![]() |
126bc555e3 | ||
![]() |
1e9cbabbf0 | ||
![]() |
bf3882b557 | ||
![]() |
3ada9b703f | ||
![]() |
274a57ef4c | ||
![]() |
7d362fb04b | ||
![]() |
80fb79b31e | ||
![]() |
b87f9a8ca2 | ||
![]() |
d3c8a0d3a3 | ||
![]() |
fa6f968e87 | ||
![]() |
b5486b2ac9 | ||
![]() |
d4c9ac2f67 | ||
![]() |
4d9d765d78 | ||
![]() |
6f2008e5a2 | ||
![]() |
30afccdc57 | ||
![]() |
3459d6c78f | ||
![]() |
1a7437ed7c | ||
![]() |
5e2dae153e | ||
![]() |
d9fd78fb42 | ||
![]() |
65e9cbe759 | ||
![]() |
2edcd5b57a | ||
![]() |
2e81a1657e | ||
![]() |
3ceaaec896 | ||
![]() |
5eac621ac5 | ||
![]() |
fd67a3c697 | ||
![]() |
741f7ee8e5 | ||
![]() |
73722c0b2f | ||
![]() |
c0f7cd9a7a | ||
![]() |
791822be12 | ||
![]() |
6cb5351460 | ||
![]() |
2377a8c522 | ||
![]() |
452589f8ee | ||
![]() |
34c90326da | ||
![]() |
7d22e8e861 | ||
![]() |
b52055785a | ||
![]() |
889a60ba3b | ||
![]() |
8837173b1c | ||
![]() |
21da3bebfb | ||
![]() |
cb6e9243c1 | ||
![]() |
46b0b0e172 | ||
![]() |
94d8886d5a | ||
![]() |
c7828e55f2 |
12
.gitignore
vendored
@@ -1,19 +1,10 @@
|
||||
app/node_modules
|
||||
app/src/daemonInstaller.generated.js
|
||||
app/assets/webpack
|
||||
app/elements-native.node
|
||||
|
||||
node_modules
|
||||
typings
|
||||
|
||||
build/files.wxs
|
||||
native/windows/build
|
||||
native/mac/build
|
||||
native/linux/build
|
||||
native/build
|
||||
dist
|
||||
driver/build
|
||||
driver/obj
|
||||
|
||||
*.xcworkspacedata
|
||||
*.xcuserstate
|
||||
@@ -22,3 +13,6 @@ driver/obj
|
||||
coverage
|
||||
.nyc_output
|
||||
npm-debug.log
|
||||
|
||||
builtin-plugins
|
||||
package-lock.json
|
||||
|
43
.travis.yml
Normal file
@@ -0,0 +1,43 @@
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
env: BUILD_FOR=linux
|
||||
- os: osx
|
||||
env: BUILD_FOR=macos
|
||||
|
||||
language: node_js
|
||||
node_js: 7
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
- app/node_modules
|
||||
|
||||
before_install:
|
||||
- npm i
|
||||
- scripts/install-deps.js
|
||||
|
||||
script:
|
||||
- scripts/build-native.js
|
||||
- npm run build
|
||||
- scripts/prepackage-plugins.js
|
||||
- scripts/build-$BUILD_FOR.js
|
||||
|
||||
dist: trusty
|
||||
sudo: false
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- rpm
|
||||
- wine
|
||||
- mono-runtime
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key: $GITHUB_TOKEN
|
||||
file_glob: true
|
||||
file: "dist/terminus*"
|
||||
skip_cleanup: true
|
||||
on:
|
||||
tags: true
|
115
HACKING.md
Normal file
@@ -0,0 +1,115 @@
|
||||
# Some background
|
||||
|
||||
Terminus is an Electron app, with the frontend written in Typescript with the help of Angular framework. It's built using Webpack.
|
||||
|
||||
# Getting started
|
||||
|
||||
First of all, clone this repository. You'll also need a recent version of Node installed.
|
||||
|
||||
First, install the dependencies:
|
||||
|
||||
```
|
||||
# macOS/Linux:
|
||||
npm i
|
||||
./scripts/install-deps.js
|
||||
./scripts/build-native.js
|
||||
|
||||
# Windows:
|
||||
npm i
|
||||
node scripts\install-deps.js
|
||||
node scripts\build-native.js
|
||||
```
|
||||
|
||||
Now, check if your build is working:
|
||||
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
Start Terminus with
|
||||
|
||||
```
|
||||
npm start
|
||||
```
|
||||
|
||||
# Project layout
|
||||
```
|
||||
terminus
|
||||
├─ app # Electron app, just the bare essentials
|
||||
| ├─ src # Electron renderer code
|
||||
| └─ main.js # Electron main entry point
|
||||
├─ build
|
||||
├─ clink # Clink distributive, for Windows
|
||||
├─ scripts # Maintenance scripts
|
||||
├─ terminus-community-color-schemes # Plugin that provides color schemes
|
||||
├─ terminus-core # Plugin that provides base UI and tab management
|
||||
├─ terminus-plugin-manager # Plugin that installs other plugins
|
||||
├─ terminus-settings # Plugin that provides the settings tab
|
||||
└─ terminus-terminal # Plugin that provides terminal tabs
|
||||
```
|
||||
|
||||
# Plugin layout
|
||||
```
|
||||
terminus-pluginname
|
||||
├─ src # Typescript code
|
||||
| ├─ components # Angular components
|
||||
| | ├─ foo.component.ts # Code
|
||||
| | ├─ foo.component.scss # Styles
|
||||
| | └─ foo.component.pug # Template
|
||||
| ├─ services # Angular services
|
||||
| | └─ foo.service.ts
|
||||
| ├─ api.ts # Publicly exported API
|
||||
| └─ index.ts # Module entry point
|
||||
├─ package.json
|
||||
├─ tsconfig.json
|
||||
└─ webpack.config.js
|
||||
```
|
||||
|
||||
# Plugins
|
||||
|
||||
The app will load all plugins from the source checkout in the dev mode, and from the user's plugins directory at all times (click `Open Plugins Directory` under `Settings` > `Plugins`).
|
||||
|
||||
A plugin should only provide a default export, which should be a `NgModule` class (or a `NgModuleWithDependencies` where applicable). This module will be injected as a dependency to the app's root module.
|
||||
|
||||
```javascript
|
||||
import { NgModule } from '@angular/core'
|
||||
|
||||
@NgModule()
|
||||
export default class MyModule {
|
||||
constructor () {
|
||||
console.log('Angular engaged, cap\'n.')
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Plugins provide functionality by exporting singular or multi providers:
|
||||
|
||||
|
||||
```javascript
|
||||
import { NgModule, Injectable } from '@angular/core'
|
||||
import { ToolbarButtonProvider, IToolbarButton } from 'terminus-core'
|
||||
|
||||
@Injectable()
|
||||
export class MyButtonProvider extends ToolbarButtonProvider {
|
||||
provide (): IToolbarButton[] {
|
||||
return [{
|
||||
icon: 'star',
|
||||
title: 'Foobar',
|
||||
weight: 10,
|
||||
click: () => {
|
||||
alert('Woohoo!')
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
providers: [
|
||||
{ provide: ToolbarButtonProvider, useClass: MyButtonProvider, multi: true },
|
||||
],
|
||||
})
|
||||
export default class MyModule { }
|
||||
```
|
||||
|
||||
|
||||
See `terminus-core/src/api.ts`, `terminus-settings/src/api.ts` and `terminus-terminal/src/api.ts` for the available extension points.
|
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Eugene Pankov
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
112
Makefile
@@ -1,112 +0,0 @@
|
||||
MAC_WS="/tmp/elements-build"
|
||||
MAC_OUTPUT="./dist/Elements-Electron.pkg"
|
||||
FULL_VERSION=$(shell python -c 'import subprocess; v = subprocess.check_output("git describe --tags --long", shell=True).strip()[1:]; print(v.split("-0-g")[0])')
|
||||
SHORT_VERSION=$(shell python -c 'import subprocess; v = subprocess.check_output("git describe --tags --long", shell=True).strip()[1:].split("-")[0]; print(v)')
|
||||
|
||||
all: run
|
||||
|
||||
run:
|
||||
DEV=1 TERMINUS_PLUGINS=$$PWD ./node_modules/.bin/electron ./app --debug
|
||||
|
||||
lint:
|
||||
tslint -c tslint.json app/src/*.ts app/src/**/*.ts
|
||||
|
||||
build:
|
||||
DEV=1 ./node_modules/.bin/webpack --progress --display-modules
|
||||
|
||||
watch:
|
||||
DEV=1 ./node_modules/.bin/webpack --progress -w
|
||||
|
||||
install-deps:
|
||||
npm install
|
||||
npm prune
|
||||
for dir in app terminus-* ; do \
|
||||
cd $$dir; \
|
||||
npm install; \
|
||||
npm prune; \
|
||||
cd ..; \
|
||||
done
|
||||
make build-native
|
||||
|
||||
build-native:
|
||||
./node_modules/.bin/electron-rebuild -f -w terminus-terminal/node_modules/node-pty -m terminus-terminal
|
||||
./node_modules/.bin/electron-rebuild -f -w terminus-terminal/node_modules/font-manager -m terminus-terminal
|
||||
|
||||
build-native-windows:
|
||||
echo :: Building native extensions
|
||||
rm -r ./native/windows/build || true
|
||||
cd native/windows && node-gyp rebuild --target=1.4.12 --arch=x64 --dist-url=https://atom.io/download/atom-shell
|
||||
mkdir native/build || true
|
||||
cp ./native/windows/build/Release/elements-native.node ./app/
|
||||
|
||||
build-native-mac:
|
||||
echo :: Building native extensions
|
||||
rm -r ./native/mac/build || true
|
||||
cd native/mac && node-gyp rebuild --target=1.4.12 --arch=x64 --dist-url=https://atom.io/download/atom-shell
|
||||
mkdir native/build || true
|
||||
cp ./native/mac/build/Release/elements-native.node ./app/
|
||||
|
||||
build-native-linux:
|
||||
echo :: Building native extensions
|
||||
rm -r ./native/linux/build || true
|
||||
cd native/linux && node-gyp rebuild --target=1.4.12 --arch=x64 --dist-url=https://atom.io/download/atom-shell
|
||||
mkdir native/build || true
|
||||
cp ./native/linux/build/Release/elements-native.node ./app/
|
||||
|
||||
build-windows: build-native-windows
|
||||
echo :: Building application
|
||||
./node_modules/.bin/build --dir --win --em.version=$(FULL_VERSION)
|
||||
cp ./app/assets/img/disk.ico dist/win-unpacked/
|
||||
|
||||
build-mac: build-native-mac
|
||||
echo :: Building application
|
||||
./node_modules/.bin/build --dir --mac --em.version=$(FULL_VERSION)
|
||||
|
||||
build-linux: build-native-linux
|
||||
echo :: Building application
|
||||
./node_modules/.bin/build --linux --em.version=$(FULL_VERSION)
|
||||
|
||||
package-windows-app:
|
||||
echo :: Building app MSI $(SHORT_VERSION)
|
||||
heat dir dist/win-unpacked/ -cg Files -gg -scom -sreg -sfrag -srd -dr INSTALLDIR -var var.SourceDir -out build/files.wxs
|
||||
candle -dSourceDir=dist\\win-unpacked -dProductVersion=$(SHORT_VERSION) -arch x64 -o dist/ build/files.wxs build/windows/elements.wxs
|
||||
light -o dist/elements-app.msi dist/files.wixobj dist/elements.wixobj
|
||||
build/windows/signtool.exe sign /f "build\\certificates\\Code Signing.p12" dist/elements-app.msi
|
||||
|
||||
package-windows-bundle:
|
||||
echo :: Building installer
|
||||
candle -dVersion=$(SHORT_VERSION) -ext WixBalExtension -arch x64 -o dist/build.wixobj build/windows/build.wxs
|
||||
light -ext WixBalExtension -o bundle.exe dist/build.wixobj
|
||||
insignia -ib bundle.exe -o engine.exe
|
||||
build/windows/signtool.exe sign /f "build\\certificates\\Code Signing.p12" engine.exe
|
||||
insignia -ab engine.exe bundle.exe -o dist/Elements-Electron.exe
|
||||
build/windows/signtool.exe sign /f "build\\certificates\\Code Signing.p12" dist/Elements-Electron.exe
|
||||
rm engine.exe bundle.exe || true
|
||||
|
||||
package-windows: build-windows package-windows-app package-windows-bundle
|
||||
|
||||
package-mac: driver-mac build-mac
|
||||
rm -rf $(MAC_WS) || true
|
||||
mkdir -p $(MAC_WS)
|
||||
mkdir -p $(MAC_WS)/app/Applications
|
||||
mkdir -p $(MAC_WS)/driver/Library/Extensions
|
||||
cp -Rv dist/mac/ELEMENTS.app $(MAC_WS)/app/Applications/
|
||||
cp -Rv dist/ElementsDriver.kext $(MAC_WS)/driver/Library/Extensions
|
||||
pkgbuild --root $(MAC_WS)/app \
|
||||
--component-plist ./build/mac/Elements.component.plist \
|
||||
--version $(SHORT_VERSION) \
|
||||
--scripts ./build/mac \
|
||||
$(MAC_WS)/Elements.pkg
|
||||
pkgbuild --root $(MAC_WS)/driver \
|
||||
--component-plist ./build/mac/ElementsDriver.component.plist \
|
||||
--scripts ./build/mac \
|
||||
$(MAC_WS)/ElementsDriver.pkg
|
||||
cp ./build/mac/AFPTuner.pkg $(MAC_WS)/
|
||||
|
||||
productbuild --distribution "./build/mac/Distribution.xml" \
|
||||
--package-path $(MAC_WS) \
|
||||
--version $(SHORT_VERSION) \
|
||||
--sign "Developer ID Installer: Syslink GmbH (V4JSMC46SY)" \
|
||||
$(MAC_OUTPUT)
|
||||
|
||||
.PHONY: run native build coverage
|
28
README.md
@@ -0,0 +1,28 @@
|
||||
# Terminus α
|
||||
*A terminal for a more modern age*
|
||||
|
||||
[](https://travis-ci.org/Eugeny/terminus) [](https://ci.appveyor.com/project/Eugeny/terminus) [](https://raw.githubusercontent.com/Eugeny/terminus/master/LICENSE) [](https://github.com/Eugeny/terminus/releases/latest)
|
||||
|
||||
----
|
||||
|
||||

|
||||
|
||||
**Terminus** is a web technology based terminal heavily inspired by Hyper. It is, however, designed for people who need to get things done.
|
||||
|
||||
* Runs on Windows, macOS and Linux
|
||||
* Theming and color schemes
|
||||
* Configurable hotkey schemes
|
||||
* **GNU Screen** style hotkeys available by default
|
||||
* Full Unicode support including double-width characters
|
||||
* Doesn't choke on fast-flowing outputs
|
||||
* Tab persistence on macOS and Linux
|
||||
* Proper shell-like experience on Windows including tab completion (thanks, Clink!)
|
||||
* CMD, PowerShell and Bash on Windows support
|
||||
|
||||
---
|
||||
|
||||
# Contributing
|
||||
|
||||
Pull requests and plugins are welcome! Publish your plugin on NPM with a `terminus-plugin` keyword to make them appear in the Plugin Manager.
|
||||
|
||||
See [HACKING.md](https://github.com/Eugeny/terminus/blob/master/HACKING.md) for a very plugin development tutorial!
|
||||
|
Before Width: | Height: | Size: 213 KiB |
Before Width: | Height: | Size: 361 KiB |
Before Width: | Height: | Size: 215 B |
Before Width: | Height: | Size: 241 B |
Before Width: | Height: | Size: 261 B |
Before Width: | Height: | Size: 261 B |
@@ -8,6 +8,7 @@ html
|
||||
window.nodeRequire = require
|
||||
script(src='./preload.js')
|
||||
script(src='./bundle.js', defer)
|
||||
style#custom-css
|
||||
body(style='background: ; min-height: 100vh; overflow: hidden')
|
||||
app-root
|
||||
.preload-logo
|
||||
@@ -29,6 +30,6 @@ html
|
||||
div
|
||||
h1.terminus-title Terminus
|
||||
.progress
|
||||
.bar(style='width: 50%')
|
||||
.bar(style='width: 0%')
|
||||
|
||||
|
||||
|
20
app/main.js
@@ -1,5 +1,9 @@
|
||||
if (process.platform == 'win32' && require('electron-squirrel-startup')) process.exit(0)
|
||||
|
||||
const electron = require('electron')
|
||||
require('electron-debug')({enabled: true, showDevTools: (process.argv.indexOf('--debug') != -1) ? 'undocked' : false})
|
||||
if (process.argv.indexOf('--debug') !== -1) {
|
||||
require('electron-debug')({enabled: true, showDevTools: 'undocked'})
|
||||
}
|
||||
|
||||
|
||||
let app = electron.app
|
||||
@@ -18,7 +22,6 @@ const yaml = require('js-yaml')
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
const Config = require('electron-config')
|
||||
const platform = require('os').platform()
|
||||
require('electron-debug')({enabled: true, showDevTools: process.argv.indexOf('--debug') != -1})
|
||||
let windowConfig = new Config({name: 'window'})
|
||||
|
||||
@@ -27,15 +30,10 @@ if (!process.env.TERMINUS_PLUGINS) {
|
||||
process.env.TERMINUS_PLUGINS = ''
|
||||
}
|
||||
|
||||
if (process.env.DEV) {
|
||||
process.env.TERMINUS_PLUGINS += `:${path.resolve(__dirname, '..')}`
|
||||
}
|
||||
|
||||
setupWindowManagement = () => {
|
||||
let windowCloseable
|
||||
|
||||
app.window.on('show', () => {
|
||||
app.window.focus()
|
||||
app.window.webContents.send('host:window-shown')
|
||||
})
|
||||
|
||||
@@ -150,7 +148,7 @@ start = () => {
|
||||
|
||||
let options = {
|
||||
width: 800,
|
||||
height: 400,
|
||||
height: 600,
|
||||
//icon: `${app.getAppPath()}/assets/img/icon.png`,
|
||||
title: 'Terminus',
|
||||
minWidth: 400,
|
||||
@@ -166,7 +164,7 @@ start = () => {
|
||||
if ((configData.appearance || {}).frame == 'native') {
|
||||
options.frame = true
|
||||
} else {
|
||||
if (platform == 'darwin') {
|
||||
if (process.platform == 'darwin') {
|
||||
options.titleBarStyle = 'hidden-inset'
|
||||
}
|
||||
}
|
||||
@@ -176,7 +174,7 @@ start = () => {
|
||||
app.window = new electron.BrowserWindow(options)
|
||||
app.window.loadURL(`file://${app.getAppPath()}/dist/index.html`, {extraHeaders: "pragma: no-cache\n"})
|
||||
|
||||
if (platform != 'darwin') {
|
||||
if (process.platform != 'darwin') {
|
||||
app.window.setMenu(null)
|
||||
}
|
||||
|
||||
@@ -185,7 +183,7 @@ start = () => {
|
||||
|
||||
setupWindowManagement()
|
||||
|
||||
if (platform == 'darwin') {
|
||||
if (process.platform == 'darwin') {
|
||||
setupMenu()
|
||||
} else {
|
||||
app.window.setMenu(null)
|
||||
|
@@ -1,10 +1,15 @@
|
||||
{
|
||||
"name": "terminus",
|
||||
"version": "0.0.1",
|
||||
"description": "A terminal for a modern age",
|
||||
"author": {
|
||||
"name": "Eugene Pankov",
|
||||
"email": "e@ajenti.org"
|
||||
},
|
||||
"main": "main.js",
|
||||
"version": "1.0.0-alpha.1",
|
||||
"scripts": {
|
||||
"build": "../node_modules/.bin/webpack --progress --color --display-modules",
|
||||
"watch": "../node_modules/.bin/webpack --progress --color --watch"
|
||||
"build": "webpack --progress --color --display-modules",
|
||||
"watch": "webpack --progress --color --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "4.0.1",
|
||||
@@ -19,10 +24,14 @@
|
||||
"electron-config": "0.2.1",
|
||||
"electron-debug": "^1.0.1",
|
||||
"electron-is-dev": "0.1.2",
|
||||
"fs-promise": "^2.0.2",
|
||||
"electron-squirrel-startup": "^1.0.0",
|
||||
"js-yaml": "3.8.2",
|
||||
"mz": "^2.6.0",
|
||||
"path": "0.12.7",
|
||||
"rxjs": "5.3.0",
|
||||
"zone.js": "0.8.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mz": "0.0.31"
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@ import { NgModule } from '@angular/core'
|
||||
import { BrowserModule } from '@angular/platform-browser'
|
||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap'
|
||||
|
||||
export async function getRootModule(plugins: any[]): Promise<any> {
|
||||
export async function getRootModule (plugins: any[]): Promise<any> {
|
||||
let imports = [
|
||||
BrowserModule,
|
||||
...(plugins.map(x => x.default.forRoot ? x.default.forRoot() : x.default)),
|
||||
@@ -12,7 +12,7 @@ export async function getRootModule(plugins: any[]): Promise<any> {
|
||||
...(plugins.filter(x => x.bootstrap).map(x => x.bootstrap)),
|
||||
]
|
||||
|
||||
if (bootstrap.length == 0) {
|
||||
if (bootstrap.length === 0) {
|
||||
throw new Error('Did not find any bootstrap components. Are there any plugins installed?')
|
||||
}
|
||||
|
||||
|
@@ -1,3 +1,33 @@
|
||||
import 'source-sans-pro'
|
||||
import 'font-awesome/css/font-awesome.css'
|
||||
import './preload.scss'
|
||||
|
||||
import * as Raven from 'raven-js'
|
||||
|
||||
const SENTRY_DSN = 'https://4717a0a7ee0b4429bd3a0f06c3d7eec3@sentry.io/181876'
|
||||
|
||||
Raven.config(
|
||||
SENTRY_DSN,
|
||||
{
|
||||
release: require('electron').remote.app.getVersion(),
|
||||
dataCallback: (data: any) => {
|
||||
const normalize = (filename) => {
|
||||
let splitArray = filename.split('/')
|
||||
return splitArray[splitArray.length - 1]
|
||||
}
|
||||
|
||||
data.exception.values[0].stacktrace.frames.forEach(frame => {
|
||||
frame.filename = normalize(frame.filename)
|
||||
})
|
||||
|
||||
data.culprit = data.exception.values[0].stacktrace.frames[0].filename
|
||||
|
||||
return data
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
process.on('uncaughtException', (err) => {
|
||||
Raven.captureException(err)
|
||||
console.error(err)
|
||||
})
|
||||
|
@@ -1,8 +1,6 @@
|
||||
(<any>console).timeStamp('entry point')
|
||||
|
||||
import 'core-js'
|
||||
import 'zone.js/dist/zone.js'
|
||||
import 'core-js/es7/reflect'
|
||||
import 'core-js/core/delay'
|
||||
import 'rxjs'
|
||||
|
||||
// Always land on the start view
|
||||
@@ -14,15 +12,15 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
|
||||
import { getRootModule } from './app.module'
|
||||
import { findPlugins, loadPlugins } from './plugins'
|
||||
|
||||
if ((<any>global).require('electron-is-dev')) {
|
||||
if (require('electron-is-dev')) {
|
||||
console.warn('Running in debug mode')
|
||||
} else {
|
||||
enableProdMode()
|
||||
}
|
||||
|
||||
findPlugins().then(async plugins => {
|
||||
let pluginsModules = loadPlugins(plugins, (current, total) => {
|
||||
(<HTMLElement>document.querySelector('.progress .bar')).style.width = 100 * current / total + '%'
|
||||
let pluginsModules = await loadPlugins(plugins, (current, total) => {
|
||||
(document.querySelector('.progress .bar') as HTMLElement).style.width = 100 * current / total + '%'
|
||||
})
|
||||
let module = await getRootModule(pluginsModules)
|
||||
platformBrowserDynamic().bootstrapModule(module)
|
||||
|
@@ -1,6 +1,9 @@
|
||||
import * as fs from 'fs-promise'
|
||||
import * as fs from 'mz/fs'
|
||||
import * as path from 'path'
|
||||
const nodeModule = (<any>global).require('module')
|
||||
const nodeModule = require('module')
|
||||
const nodeRequire = (global as any).require
|
||||
|
||||
declare function delay (ms: number): Promise<void>
|
||||
|
||||
function normalizePath (path: string): string {
|
||||
const cygwinPrefix = '/cygdrive/'
|
||||
@@ -9,9 +12,29 @@ function normalizePath (path: string): string {
|
||||
path = path[0] + ':' + path.substring(1)
|
||||
}
|
||||
return path
|
||||
};
|
||||
}
|
||||
|
||||
(<any>global).require.main.paths.map(x => nodeModule.globalPaths.push(normalizePath(x)))
|
||||
nodeRequire.main.paths.map(x => nodeModule.globalPaths.push(normalizePath(x)))
|
||||
|
||||
if (process.env.DEV) {
|
||||
nodeModule.globalPaths.unshift(path.dirname(require('electron').remote.app.getAppPath()))
|
||||
}
|
||||
|
||||
const builtinPluginsPath = path.join(
|
||||
path.dirname(require('electron').remote.app.getPath('exe')),
|
||||
(process.platform === 'darwin') ? '../Resources' : 'resources',
|
||||
'builtin-plugins',
|
||||
)
|
||||
|
||||
const userPluginsPath = path.join(
|
||||
require('electron').remote.app.getPath('appData'),
|
||||
'terminus',
|
||||
'plugins',
|
||||
)
|
||||
|
||||
Object.assign(window, { builtinPluginsPath, userPluginsPath })
|
||||
nodeModule.globalPaths.unshift(builtinPluginsPath)
|
||||
nodeModule.globalPaths.unshift(path.join(userPluginsPath, 'node_modules'))
|
||||
|
||||
if (process.env.TERMINUS_PLUGINS) {
|
||||
process.env.TERMINUS_PLUGINS.split(':').map(x => nodeModule.globalPaths.unshift(normalizePath(x)))
|
||||
@@ -19,15 +42,20 @@ if (process.env.TERMINUS_PLUGINS) {
|
||||
|
||||
export declare type ProgressCallback = (current, total) => void
|
||||
|
||||
interface IPluginEntry {
|
||||
export interface IPluginInfo {
|
||||
name: string
|
||||
path: string
|
||||
info: any
|
||||
description: string
|
||||
packageName: string
|
||||
isBuiltin: boolean
|
||||
version: string
|
||||
homepage?: string
|
||||
path?: string
|
||||
info?: any
|
||||
}
|
||||
|
||||
export async function findPlugins (): Promise<IPluginEntry[]> {
|
||||
export async function findPlugins (): Promise<IPluginInfo[]> {
|
||||
let paths = nodeModule.globalPaths
|
||||
let foundPlugins: IPluginEntry[] = []
|
||||
let foundPlugins: IPluginInfo[] = []
|
||||
|
||||
for (let pluginDir of paths) {
|
||||
pluginDir = normalizePath(pluginDir)
|
||||
@@ -41,11 +69,22 @@ export async function findPlugins (): Promise<IPluginEntry[]> {
|
||||
if (!await fs.exists(infoPath)) {
|
||||
continue
|
||||
}
|
||||
|
||||
if (foundPlugins.some(x => x.name === pluginName)) {
|
||||
console.info(`Plugin ${pluginName} already exists`)
|
||||
}
|
||||
|
||||
try {
|
||||
let info = JSON.parse(await fs.readFile(infoPath, {encoding: 'utf-8'}))
|
||||
console.log(pluginDir, builtinPluginsPath)
|
||||
foundPlugins.push({
|
||||
name: pluginName,
|
||||
name: pluginName.substring('terminus-'.length),
|
||||
packageName: pluginName,
|
||||
isBuiltin: pluginDir === builtinPluginsPath,
|
||||
version: info.version,
|
||||
description: info.description,
|
||||
path: pluginPath,
|
||||
info: await fs.readJson(infoPath),
|
||||
info,
|
||||
})
|
||||
} catch (error) {
|
||||
console.error('Cannot load package info for', pluginName)
|
||||
@@ -53,22 +92,26 @@ export async function findPlugins (): Promise<IPluginEntry[]> {
|
||||
}
|
||||
}
|
||||
|
||||
(window as any).installedPlugins = foundPlugins
|
||||
return foundPlugins
|
||||
}
|
||||
|
||||
export function loadPlugins (foundPlugins: IPluginEntry[], progress: ProgressCallback): any[] {
|
||||
export async function loadPlugins (foundPlugins: IPluginInfo[], progress: ProgressCallback): Promise<any[]> {
|
||||
let plugins: any[] = []
|
||||
progress(0, 1)
|
||||
foundPlugins.forEach((foundPlugin, index) => {
|
||||
console.info(`Loading ${foundPlugin.name}: ${(<any>global).require.resolve(foundPlugin.path)}`)
|
||||
let index = 0
|
||||
for (let foundPlugin of foundPlugins) {
|
||||
console.info(`Loading ${foundPlugin.name}: ${nodeRequire.resolve(foundPlugin.path)}`)
|
||||
progress(index, foundPlugins.length)
|
||||
try {
|
||||
let pluginModule = (<any>global).require(foundPlugin.path)
|
||||
let pluginModule = nodeRequire(foundPlugin.path)
|
||||
plugins.push(pluginModule)
|
||||
} catch (error) {
|
||||
console.error(`Could not load ${foundPlugin.name}:`, error)
|
||||
}
|
||||
})
|
||||
await delay(1)
|
||||
index++
|
||||
}
|
||||
progress(1, 1)
|
||||
return plugins
|
||||
}
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { Component } from '@angular/core'
|
||||
|
||||
|
||||
@Component({
|
||||
template: '<app-root></app-root>'
|
||||
})
|
||||
|
@@ -18,21 +18,16 @@
|
||||
"dom",
|
||||
"es2015",
|
||||
"es2015.iterable.ts",
|
||||
"es2017",
|
||||
"es7"
|
||||
]
|
||||
},
|
||||
"compileOnSave": false,
|
||||
"exclude": [
|
||||
"dist",
|
||||
"node_modules",
|
||||
"*/node_modules",
|
||||
"terminus*",
|
||||
"platforms"
|
||||
],
|
||||
"filesGlob" : [
|
||||
"app/src/*.ts",
|
||||
"app/src/**/*.ts",
|
||||
"!node_modules/**",
|
||||
"!app/node_modules/**",
|
||||
"!*/node_modules/**"
|
||||
]
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@ module.exports = {
|
||||
name: 'terminus',
|
||||
target: 'node',
|
||||
entry: {
|
||||
'index.ignore': 'file-loader?name=index.html!pug-html-loader!' + path.resolve(__dirname, './index.pug'),
|
||||
'index.ignore': 'file-loader?name=index.html!val-loader!pug-html-loader!' + path.resolve(__dirname, './index.pug'),
|
||||
'preload': path.resolve(__dirname, 'src/entry.preload.ts'),
|
||||
'bundle': path.resolve(__dirname, 'src/entry.ts'),
|
||||
},
|
||||
@@ -55,10 +55,15 @@ module.exports = {
|
||||
'@angular/forms': 'commonjs @angular/forms',
|
||||
'@angular/common': 'commonjs @angular/common',
|
||||
'@ng-bootstrap/ng-bootstrap': 'commonjs @ng-bootstrap/ng-bootstrap',
|
||||
'fs-promise': 'commonjs fs-promise',
|
||||
'electron': 'commonjs electron',
|
||||
'electron-is-dev': 'commonjs electron-is-dev',
|
||||
'module': 'commonjs module',
|
||||
'mz': 'commonjs mz',
|
||||
'path': 'commonjs path',
|
||||
'rxjs': 'commonjs rxjs',
|
||||
'zone.js': 'commonjs zone.js',
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new webpack.optimize.ModuleConcatenationPlugin(),
|
||||
],
|
||||
}
|
||||
|
37
appveyor.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
os: Visual Studio 2017
|
||||
|
||||
platform:
|
||||
- x64
|
||||
|
||||
environment:
|
||||
nodejs_version: "7"
|
||||
|
||||
cache:
|
||||
- '%USERPROFILE%\.electron'
|
||||
|
||||
version: "{build}"
|
||||
|
||||
install:
|
||||
- ps: Install-Product node $env:nodejs_version $env:platform
|
||||
- npm install
|
||||
- node scripts/install-deps.js
|
||||
- node scripts/build-native.js
|
||||
|
||||
build_script:
|
||||
- npm run build
|
||||
- node scripts/prepackage-plugins.js
|
||||
- node scripts/build-windows.js
|
||||
|
||||
artifacts:
|
||||
- path: 'dist\win\*.exe'
|
||||
deploy:
|
||||
provider: GitHub
|
||||
auth_token:
|
||||
secure: wvxHVlprvhfdOHgmVEDIwjCHYlmuDykteIEHpAfpi807+1lJD3ld2/OS6+0fgU4e
|
||||
artifact: /.*\.exe/
|
||||
draft: false
|
||||
prerelease: false
|
||||
force_update: true
|
||||
on:
|
||||
branch: master
|
||||
appveyor_repo_tag: true
|
@@ -1,62 +0,0 @@
|
||||
# Do not edit. File was generated by node-gyp's "configure" step
|
||||
{
|
||||
"target_defaults": {
|
||||
"cflags": [],
|
||||
"default_configuration": "Release",
|
||||
"defines": [],
|
||||
"include_dirs": [],
|
||||
"libraries": []
|
||||
},
|
||||
"variables": {
|
||||
"asan": 0,
|
||||
"debug_devtools": "node",
|
||||
"force_dynamic_crt": 0,
|
||||
"host_arch": "x64",
|
||||
"icu_data_file": "icudt57l.dat",
|
||||
"icu_data_in": "..\\..\\deps/icu-small\\source/data/in\\icudt57l.dat",
|
||||
"icu_endianness": "l",
|
||||
"icu_gyp_path": "tools/icu/icu-generic.gyp",
|
||||
"icu_locales": "en,root",
|
||||
"icu_path": "deps/icu-small",
|
||||
"icu_small": "true",
|
||||
"icu_ver_major": "57",
|
||||
"node_byteorder": "little",
|
||||
"node_enable_d8": "false",
|
||||
"node_enable_v8_vtunejit": "false",
|
||||
"node_install_npm": "true",
|
||||
"node_module_version": 48,
|
||||
"node_no_browser_globals": "false",
|
||||
"node_prefix": "/usr/local",
|
||||
"node_release_urlbase": "https://nodejs.org/download/release/",
|
||||
"node_shared": "false",
|
||||
"node_shared_cares": "false",
|
||||
"node_shared_http_parser": "false",
|
||||
"node_shared_libuv": "false",
|
||||
"node_shared_openssl": "false",
|
||||
"node_shared_zlib": "false",
|
||||
"node_tag": "",
|
||||
"node_use_bundled_v8": "true",
|
||||
"node_use_dtrace": "false",
|
||||
"node_use_etw": "true",
|
||||
"node_use_lttng": "false",
|
||||
"node_use_openssl": "true",
|
||||
"node_use_perfctr": "true",
|
||||
"node_use_v8_platform": "true",
|
||||
"openssl_fips": "",
|
||||
"openssl_no_asm": 0,
|
||||
"shlib_suffix": "so.48",
|
||||
"target_arch": "x64",
|
||||
"v8_enable_gdbjit": 0,
|
||||
"v8_enable_i18n_support": 1,
|
||||
"v8_inspector": "true",
|
||||
"v8_no_strict_aliasing": 1,
|
||||
"v8_optimized_debug": 0,
|
||||
"v8_random_seed": 0,
|
||||
"v8_use_snapshot": "true",
|
||||
"want_separate_host_toolset": 0,
|
||||
"nodedir": "C:\\cygwin64\\home\\Avid\\.node-gyp\\iojs-1.3.5",
|
||||
"copy_dev_lib": "true",
|
||||
"standalone_static_library": 1,
|
||||
"target": "1.3.5"
|
||||
}
|
||||
}
|
BIN
build/icon.ico
Before Width: | Height: | Size: 361 KiB |
Before Width: | Height: | Size: 213 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 749 B After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 164 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 21 KiB |
BIN
build/icons/Icon.psd
Normal file
BIN
build/logo.png
Before Width: | Height: | Size: 4.3 KiB |
@@ -1,35 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<installer-gui-script minSpecVersion="1">
|
||||
<title>ELEMENTS Client</title>
|
||||
<options customize="never" require-scripts="true" rootVolumeOnly="true" />
|
||||
|
||||
<choices-outline>
|
||||
<line choice="default">
|
||||
<line choice="com.syslink.elements.driver" />
|
||||
<line choice="com.syslink.Elements" />
|
||||
<line choice="com.syslink.afptuner" />
|
||||
</line>
|
||||
</choices-outline>
|
||||
|
||||
<choice id="default"/>
|
||||
|
||||
<choice id="com.syslink.elements.driver">
|
||||
<pkg-ref id="com.syslink.elements.driver"/>
|
||||
</choice>
|
||||
<pkg-ref id="com.syslink.elements.driver" version="1" auth="root">ElementsDriver.pkg</pkg-ref>
|
||||
|
||||
<choice id="com.syslink.Elements">
|
||||
<pkg-ref id="com.syslink.Elements"/>
|
||||
</choice>
|
||||
<pkg-ref id="com.syslink.Elements" version="1" auth="root">Elements.pkg</pkg-ref>
|
||||
<pkg-ref id="com.syslink.Elements">
|
||||
<must-close>
|
||||
<app id="com.syslink.Elements"/>
|
||||
</must-close>
|
||||
</pkg-ref>
|
||||
|
||||
<choice id="com.syslink.afptuner" title="AvidSharedStorageAccess">
|
||||
<pkg-ref id="com.syslink.afptuner"/>
|
||||
</choice>
|
||||
<pkg-ref id="com.syslink.afptuner" version="1" auth="root">AFPTuner.pkg</pkg-ref>
|
||||
</installer-gui-script>
|
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<array>
|
||||
<dict>
|
||||
<key>BundleHasStrictIdentifier</key>
|
||||
<true/>
|
||||
<key>BundleIsRelocatable</key>
|
||||
<false/>
|
||||
<key>BundleIsVersionChecked</key>
|
||||
<false/>
|
||||
<key>BundleOverwriteAction</key>
|
||||
<string>upgrade</string>
|
||||
<key>BundlePostInstallScriptPath</key>
|
||||
<string>Elements.postinst.sh</string>
|
||||
<key>RootRelativeBundlePath</key>
|
||||
<string>Applications/ELEMENTS.app</string>
|
||||
</dict>
|
||||
</array>
|
||||
</plist>
|
@@ -1,44 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cat > /Library/LaunchDaemons/com.elements.VolumesFix.plist << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>KeepAlive</key>
|
||||
<false/>
|
||||
<key>Label</key>
|
||||
<string>com.elements.VolumesFix</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/bin/bash</string>
|
||||
<string>-c</string>
|
||||
<string>sleep 3; chmod 777 /Volumes</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>/dev/null</string>
|
||||
<key>StandardOutPath</key>
|
||||
<string>/dev/null</string>
|
||||
<key>UserName</key>
|
||||
<string>root</string>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF
|
||||
|
||||
chmod 600 /Library/LaunchDaemons/com.elements.VolumesFix.plist
|
||||
|
||||
cat > /etc/nsmb.conf << EOF
|
||||
[default]
|
||||
minauth=none
|
||||
streams=yes
|
||||
soft=yes
|
||||
notify_off=yes
|
||||
port445=no_netbios
|
||||
signing_required=false
|
||||
EOF
|
||||
|
||||
launchctl load -w /Library/LaunchDaemons/com.elements.VolumesFix.plist
|
||||
launchctl start com.elements.VolumesFix
|
BIN
build/windows/icon.ico
Normal file
After Width: | Height: | Size: 361 KiB |
215
clink/CHANGES
Normal file
@@ -0,0 +1,215 @@
|
||||
|
||||
### Changes
|
||||
|
||||
##### v0.4.8
|
||||
|
||||
- Environment variable 'clink_profile' overrides Clink's profile path (#390).
|
||||
- Load a clink_inputrc file from Clink's profile directory (fixes #406).
|
||||
- Bug fixes;
|
||||
- Redraw issues when prompts end in OSC ANSI codes (#387, #384).
|
||||
- Fixed 'clink autorun --help' crash.
|
||||
|
||||
##### v0.4.7
|
||||
|
||||
- Bug fixes;
|
||||
- Sometimes autorun tries to run clink.exe (#374).
|
||||
- Autorun would cause cmd.exe to return an error if it wasn't interactive (#373).
|
||||
|
||||
##### v0.4.6
|
||||
|
||||
- HOME is only set if it is currently unset.
|
||||
- Readline can be initialised with .inputrc and _inputrc files too (#258).
|
||||
- Bug fixes;
|
||||
- Executable completion;
|
||||
- Paths from PATH were checked twice.
|
||||
- Incorrect results were returned for words ending in '.' or '-'.
|
||||
- Directories . and .. were incorrectly displayed.
|
||||
- Fixed a crash if .bat script's stdout is redirected (#366).
|
||||
- Occasional crash when injecting Clink (#351).
|
||||
- Display errors;
|
||||
- When editing near the window's right-hand edge (#347).
|
||||
- Double display of multi-line prompts when resizing the terminal (#352).
|
||||
- Very rare wrap artefacts when making the terminal window larger.
|
||||
- Doskey emulation (#344).
|
||||
- Improved 'clink autorun' help (#348).
|
||||
- Fixed launching Clink when clink.bat is renamed (#357).
|
||||
|
||||
##### v0.4.5
|
||||
|
||||
- Improved 'clink autorun'. It now defaults to the Current User registry hive.
|
||||
- 'clink set' gives more details for enumeration-type settings.
|
||||
- Tab completion for p4vc.
|
||||
- New settings 'history_expand_mode' to control history expansion in quotes (#317).
|
||||
- Bug fixes;
|
||||
- Use full width of the terminal (#337).
|
||||
- Fixed MinGW compile error (#335).
|
||||
- Autorun now defaults to the current user's hive (#332).
|
||||
- Creating clink.html no longer needs Pandoc, plus it looks a bit better (#331).
|
||||
- Added settings to control history expansion (#326).
|
||||
- Correct fallback when 'use_altgr_substitute' is off (#325).
|
||||
- Load history prior to saving it on shutdown (#318).
|
||||
- Added Shift-Tab documentation and menu completion example (#190).
|
||||
- Added shim for backwards menu completion (#190).
|
||||
- Input handling now outputs '\e`Z' for Shift-Tab (#190).
|
||||
- Updated Readme with current Premake info (#310).
|
||||
- Guard against there being no buffer to read from (#304).
|
||||
- Fixed artefacts when resizing conhost's buffer (#139).
|
||||
- Clear remaining characters if scroll window was too small (#301)
|
||||
- Escape % characters when expanding aliases (#280).
|
||||
- Fixed leaking exception filters.
|
||||
- Clearing the screen doesn't leave artefacts behind.
|
||||
|
||||
##### v0.4.4
|
||||
|
||||
- Completing .. behaves more like Bash (#277).
|
||||
- Escape from yes/no question when Ctrl+C is pressed.
|
||||
- Valid XP executables (#278, #289).
|
||||
- Fixed n-th argument yank not working as expected (#254).
|
||||
- Fixed prompt colours sometimes not working (#279, #286).
|
||||
- Fixed '!0' causing Clink to crash.
|
||||
- Save/restore cursor position in case Readline moves it.
|
||||
|
||||
##### v0.4.3
|
||||
|
||||
- Localised Y/N when auto-answering 'terminate?' prompt.
|
||||
- $* would early out if there was no arguments.
|
||||
- Disable ANSI code support if third party provides it.
|
||||
- Installer can now set %CLINK_DIR% to install location.
|
||||
- Improved output from 'clink set'.
|
||||
- Support for Windows 10 Technical Preview.
|
||||
- Ctrl-L now scrolls last line to the top of the window rather than clearing.
|
||||
- New option to control how newline characters are pasted to the line.
|
||||
- New options to control history;
|
||||
- 'history_file_lines' - maximum lines saved to disk.
|
||||
- 'history_ignore_space' - ignore lines prefixed with whitespace.
|
||||
- 'history_dupe_mode' - how duplicate entries are handled.
|
||||
- 'history_io' - load/save history from disk every line.
|
||||
- Fixed nonfunctional numpad keys.
|
||||
- Fixed missing WINCH signals if other processes resize the buffer.
|
||||
- Support Alt codes sent from Conhost.
|
||||
|
||||
##### v0.4.2
|
||||
|
||||
- Prompt colouring no longer requires third party ANSI code utility.
|
||||
- Override settings with environment variables prefixed with 'clink'.
|
||||
- Ctrl-PgUp goes up a directory.
|
||||
- Updated Go completions (by matrixik).
|
||||
- Arguments to clink.arg.new_parser() now initialise parser's flags/args (from vladimir-kotikov).
|
||||
- New clink.arg.add_flags() and clink.arg.add_arguments() functions.
|
||||
- Removed footer and Alt-H tip for more succinct stdout output.
|
||||
- Bug fixes;
|
||||
- Windows XP works again.
|
||||
- Fixed race condition in lua_execute().
|
||||
|
||||
##### v0.4.1
|
||||
|
||||
- Bug fixes;
|
||||
- Various Unicode fixes causing corrupt environment variables.
|
||||
- Fixed thread resume/suspend causing rare system-wide deadlock.
|
||||
- Fixed incorrect translation of suffixed slash when completing flags.
|
||||
- Add --nolog argument to disable file logging. Fix #187 Fix #154
|
||||
- Added missing escape sequences from doskey emulation.
|
||||
- Reinstated unix-kill-line key binding.
|
||||
- Mapped PgUp/Down to search history using line typed so far.
|
||||
- Added documentation covering escape codes for special keys.
|
||||
- Added support for Windows' AltGr substitute Ctrl-Alt.
|
||||
- Support for Readline's 'menu' style completion (see docs).
|
||||
|
||||
##### v0.4
|
||||
|
||||
- New features;
|
||||
- Better 'clink.arg' API. Easier, more intuitive, and more powerful.
|
||||
- Whitespace prefix skips exec matching.
|
||||
- Added a 'set' verb to easily change settings from the command line.
|
||||
- Basic support for a shells other than cmd.exe.
|
||||
- Completion for Go (contributed by Dobroslaw Zybort).
|
||||
- Setting 'exec_match_style' to -1 disables it entirely.
|
||||
- Make history persistence optional.
|
||||
- Alias/doskey completion.
|
||||
- Very basic support for Powershell.
|
||||
- View cmd.exe's autorun entry without needing admin rights.
|
||||
- New key bindings;
|
||||
- Ctrl-Alt-C : Copy command line to the clipboard.
|
||||
- Ctrl-Alt-E : Expand environment variable under cursor.
|
||||
- Ctrl-Alt-U : 'up directory' (formerly Shift-Up).
|
||||
- Ctrl-U : Adds '..\' to the command line.
|
||||
- Alt-H : Shows active keymap's key bindings.
|
||||
- New Lua functions;
|
||||
- clink.execute().
|
||||
- clink.get_host_process().
|
||||
- clink.match_files().
|
||||
- clink.match_words().
|
||||
- clink.get_console_aliases().
|
||||
- Lots of bug fixes, including;
|
||||
- Better command extraction.
|
||||
- Fixed cmd.exe command paging and Ctrl-C/Ctrl-Break handling.
|
||||
- Multiple locale fixes.
|
||||
- Use localised text for 'Terminate batch job?' prompt.
|
||||
|
||||
##### v0.3
|
||||
|
||||
- Automatic answering of cmd.exe's 'Terminate batch script?' prompt.
|
||||
- Coloured prompts (requires ANSICON or ConEmu).
|
||||
- Added Shift-Up keyboard shortcut to automatically execute 'cd ..'
|
||||
- Mapped Ctrl-Z to undo, Microsoft style.
|
||||
- Improved integration of Readline;
|
||||
- New input handling code (Ctrl-Alt combos now work).
|
||||
- An implementation of the Termcap library.
|
||||
- Fully functional Vi-mode support.
|
||||
- Support for resizable consoles.
|
||||
- Line wrapping now works correctly (issue 50).
|
||||
- Adjustable executable match style (issue 65).
|
||||
- Improved environment variable completion.
|
||||
- Added settings file to customise Clink.
|
||||
- New Lua features and functions;
|
||||
- Matches can now be filtered in Lua before they are display.
|
||||
- clink.quote_split().
|
||||
- clink.arg.node_merge().
|
||||
- clink.get_screen_info() (issue 71).
|
||||
- clink.split() (for splitting strings).
|
||||
- clink.chdir().
|
||||
- clink.get_cwd().
|
||||
- Functions to query Clink's settings.
|
||||
- New command line options;
|
||||
- '--profile <dir>' to override default profile directory.
|
||||
- '--nohostcheck' disables verification that host is cmd.exe.
|
||||
- '--pid' specifies the process to inject into.
|
||||
- Update Mercurial completion (issue 73).
|
||||
- Start menu shortcut starts in USERPROFILE, like cmd.exe
|
||||
- Zip distribution is now portable.
|
||||
|
||||
##### v0.2.1
|
||||
|
||||
- The .history file now merges multiple sessions together.
|
||||
- Fixed missing y/n, pause, and other prompts.
|
||||
- Fixed segfault in loader executable.
|
||||
- Better ConEmu compatibility.
|
||||
|
||||
##### v0.2
|
||||
|
||||
- Basic argument completion for 'git', 'hg', 'svn', and 'p4'.
|
||||
- Traditional Bash clear screen ('Ctrl-L') and exit shortcuts ('Ctrl-D').
|
||||
- Scrollable command window using 'PgUp'/'PgDown' keys.
|
||||
- Doskey support.
|
||||
- Automatic quoting of file names with spaces.
|
||||
- Scriptable custom prompts.
|
||||
- New argument framework to ease writing context-sensitive match generators.
|
||||
- History and log file is now saved per-user rather than globally.
|
||||
- Improved Clink's command line interface ('clink --help').
|
||||
- More reliable handling of cmd.exe's autorun entry.
|
||||
- General improvements to executable and directory-command completion.
|
||||
- Symbolic link support.
|
||||
- Documentation.
|
||||
- Windows 8 support.
|
||||
- Improved hooking so Clink can be shared with other thirdparty utilities that
|
||||
also hook cmd.exe (ConEmu, ANSICon, etc.).
|
||||
|
||||
##### v0.1.1
|
||||
|
||||
- Fixed AltGr+<key> on international keyboards.
|
||||
- Fixed broken completion when directories have a '-' in their name (Mark Hammond)
|
||||
- The check for single match scenarios now correctly handles case-insensitivity.
|
||||
|
||||
##### v0.1
|
||||
|
||||
- Initial release.
|
675
clink/LICENSE
Normal file
@@ -0,0 +1,675 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
60
clink/clink.bat
Normal file
@@ -0,0 +1,60 @@
|
||||
:: Copyright (c) 2012 Martin Ridgers
|
||||
::
|
||||
:: Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
:: of this software and associated documentation files (the "Software"), to deal
|
||||
:: in the Software without restriction, including without limitation the rights
|
||||
:: to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
:: copies of the Software, and to permit persons to whom the Software is
|
||||
:: furnished to do so, subject to the following conditions:
|
||||
::
|
||||
:: The above copyright notice and this permission notice shall be included in
|
||||
:: all copies or substantial portions of the Software.
|
||||
::
|
||||
:: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
:: IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
:: FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
:: AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
:: LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
:: OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
:: SOFTWARE.
|
||||
|
||||
@echo off
|
||||
|
||||
:: Mimic cmd.exe's behaviour when starting from the start menu.
|
||||
if /i "%1"=="startmenu" (
|
||||
cd /d "%userprofile%"
|
||||
shift /1
|
||||
)
|
||||
|
||||
:: Check for the --profile option.
|
||||
if /i "%1"=="--profile" (
|
||||
set clink_profile_arg=--profile "%~2"
|
||||
shift /1
|
||||
shift /1
|
||||
)
|
||||
|
||||
:: If the .bat is run without any arguments, then start a cmd.exe instance.
|
||||
if "%1"=="" (
|
||||
call :launch
|
||||
goto :end
|
||||
)
|
||||
|
||||
:: Pass through to appropriate loader.
|
||||
if /i "%processor_architecture%"=="x86" (
|
||||
"%~dp0\clink_x86.exe" %*
|
||||
) else if /i "%processor_architecture%"=="amd64" (
|
||||
if defined processor_architew6432 (
|
||||
"%~dp0\clink_x86.exe" %*
|
||||
) else (
|
||||
"%~dp0\clink_x64.exe" %*
|
||||
)
|
||||
)
|
||||
|
||||
:end
|
||||
set clink_profile_arg=
|
||||
goto :eof
|
||||
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:launch
|
||||
start "Clink" cmd.exe /s /k ""%~dpnx0" inject %clink_profile_arg%"
|
||||
exit /b 0
|
915
clink/clink.html
Normal file
3420
clink/clink.lua
Normal file
BIN
clink/clink_dll_x64.dll
Normal file
BIN
clink/clink_dll_x86.dll
Normal file
72
clink/clink_inputrc_base
Normal file
@@ -0,0 +1,72 @@
|
||||
set bell-style visible
|
||||
set completion-ignore-case on
|
||||
set completion-map-case on
|
||||
set completion-display-width 106
|
||||
set output-meta on
|
||||
set skip-completed-text on
|
||||
set convert-meta on
|
||||
|
||||
"\e`s": backward-word # ctrl-left
|
||||
"\e`t": forward-word # ctrl-right
|
||||
"\e`O": end-of-line # end
|
||||
"\e`G": beginning-of-line # home
|
||||
"\e`S": delete-char # del
|
||||
"\e`c": page-up # shift page-up
|
||||
"\e`u": kill-line # ctrl+end
|
||||
"\e`w": backward-kill-line # ctrl+home
|
||||
"\e`I": history-search-backward # page-up
|
||||
"\e`Q": history-search-forward # page-down
|
||||
|
||||
set keymap emacs
|
||||
"\t": clink-completion-shim
|
||||
C-v: paste-from-clipboard
|
||||
C-q: reload-lua-state
|
||||
C-z: undo
|
||||
M-h: show-rl-help
|
||||
M-C-c: copy-line-to-clipboard
|
||||
C-c: ctrl-c
|
||||
M-a: "..\\"
|
||||
|
||||
set keymap vi-insert
|
||||
"\t": clink-completion-shim
|
||||
C-v: paste-from-clipboard
|
||||
C-z: undo
|
||||
M-h: show-rl-help
|
||||
M-C-c: copy-line-to-clipboard
|
||||
C-c: ctrl-c
|
||||
M-a: "..\\"
|
||||
|
||||
set keymap vi-move
|
||||
C-v: paste-from-clipboard
|
||||
C-z: undo
|
||||
M-h: show-rl-help
|
||||
M-C-c: copy-line-to-clipboard
|
||||
C-c: ctrl-c
|
||||
M-a: "..\\"
|
||||
|
||||
$if cmd.exe
|
||||
set keymap emacs
|
||||
"\e`U": up-directory
|
||||
M-C-u: up-directory
|
||||
M-C-e: expand-env-vars
|
||||
|
||||
set keymap vi-insert
|
||||
"\e`U": up-directory
|
||||
M-C-u: up-directory
|
||||
M-C-e: expand-env-vars
|
||||
|
||||
set keymap vi-move
|
||||
"\e`U": up-directory
|
||||
M-C-u: up-directory
|
||||
M-C-e: expand-env-vars
|
||||
$endif
|
||||
|
||||
set keymap emacs
|
||||
|
||||
# Uncomment these two lines for vanilla cmd.exe style completion.
|
||||
# "\t": clink-menu-completion-shim
|
||||
# "\e`Z": clink-backward-menu-completion-shim
|
||||
|
||||
$include ~/clink_inputrc
|
||||
$include ~/_inputrc
|
||||
$include ~/.inputrc
|
BIN
clink/clink_x64.exe
Normal file
BIN
clink/clink_x86.exe
Normal file
1
clink/profile/.history
Normal file
@@ -0,0 +1 @@
|
||||
Ls
|
116
clink/profile/settings
Normal file
@@ -0,0 +1,116 @@
|
||||
# name: Pressing Ctrl-D exits session
|
||||
# type: bool
|
||||
# Ctrl-D exits cmd.exe when it is pressed on an empty line.
|
||||
ctrld_exits = 1
|
||||
|
||||
# name: Toggle if pressing Esc clears line
|
||||
# type: bool
|
||||
# Clink clears the current line when Esc is pressed (unless Readline's Vi mode
|
||||
# is enabled).
|
||||
esc_clears_line = 1
|
||||
|
||||
# name: Match display colour
|
||||
# type: int
|
||||
# Colour to use when displaying matches. A value less than 0 will be the
|
||||
# opposite brightness of the default colour.
|
||||
match_colour = -1
|
||||
|
||||
# name: Executable match style
|
||||
# type: enum
|
||||
# 0 = PATH only
|
||||
# 1 = PATH and CWD
|
||||
# 2 = PATH, CWD, and directories
|
||||
# Changes how Clink will match executables when there is no path separator on
|
||||
# the line. 0 = PATH only, 1 = PATH and CWD, 2 = PATH, CWD, and directories. In
|
||||
# all cases both executables and directories are matched when there is a path
|
||||
# separator present. A value of -1 will disable executable matching completely.
|
||||
exec_match_style = 2
|
||||
|
||||
# name: Whitespace prefix matches files
|
||||
# type: bool
|
||||
# If the line begins with whitespace then Clink bypasses executable matching and
|
||||
# will match all files and directories instead.
|
||||
space_prefix_match_files = 1
|
||||
|
||||
# name: Colour of the prompt
|
||||
# type: int
|
||||
# Surrounds the prompt in ANSI escape codes to set the prompt's colour. Disabled
|
||||
# when the value is less than 0.
|
||||
prompt_colour = -1
|
||||
|
||||
# name: Auto-answer terminate prompt
|
||||
# type: enum
|
||||
# 0 = Disabled
|
||||
# 1 = Answer 'Y'
|
||||
# 2 = Answer 'N'
|
||||
# Automatically answers cmd.exe's 'Terminate batch job (Y/N)?' prompts. 0 =
|
||||
# disabled, 1 = answer 'Y', 2 = answer 'N'.
|
||||
terminate_autoanswer = 0
|
||||
|
||||
# name: Lines of history saved to disk
|
||||
# type: int
|
||||
# When set to a positive integer this is the number of lines of history that
|
||||
# will persist when Clink saves the command history to disk. Use 0 for infinite
|
||||
# lines and <0 to disable history persistence.
|
||||
history_file_lines = 10000
|
||||
|
||||
# name: Skip adding lines prefixed with whitespace
|
||||
# type: bool
|
||||
# Ignore lines that begin with whitespace when adding lines in to the history.
|
||||
history_ignore_space = 0
|
||||
|
||||
# name: Controls how duplicate entries are handled
|
||||
# type: enum
|
||||
# 0 = Always add
|
||||
# 1 = Ignore
|
||||
# 2 = Erase previous
|
||||
# If a line is a duplicate of an existing history entry Clink will erase the
|
||||
# duplicate when this is set 2. A value of 1 will not add duplicates to the
|
||||
# history and a value of 0 will always add lines. Note that history is not
|
||||
# deduplicated when reading/writing to disk.
|
||||
history_dupe_mode = 2
|
||||
|
||||
# name: Read/write history file each line edited
|
||||
# type: bool
|
||||
# When non-zero the history will be read from disk before editing a new line and
|
||||
# written to disk afterwards.
|
||||
history_io = 0
|
||||
|
||||
# name: Sets how command history expansion is applied
|
||||
# type: enum
|
||||
# 0 = Off
|
||||
# 1 = On
|
||||
# 2 = Not in single quotes
|
||||
# 3 = Not in double quote
|
||||
# 4 = Not in any quotes
|
||||
# The '!' character in an entered line can be interpreted to introduce words
|
||||
# from the history. This can be enabled and disable by setting this value to 1
|
||||
# or 0. Values or 2, 3 or 4 will skip any ! character quoted in single, double,
|
||||
# or both quotes respectively.
|
||||
history_expand_mode = 4
|
||||
|
||||
# name: Support Windows' Ctrl-Alt substitute for AltGr
|
||||
# type: bool
|
||||
# Windows provides Ctrl-Alt as a substitute for AltGr, historically to support
|
||||
# keyboards with no AltGr key. This may collide with some of Readline's
|
||||
# bindings.
|
||||
use_altgr_substitute = 1
|
||||
|
||||
# name: Strips CR and LF chars on paste
|
||||
# type: enum
|
||||
# 0 = Paste unchanged
|
||||
# 1 = Strip
|
||||
# 2 = As space
|
||||
# Setting this to a value >0 will make Clink strip CR and LF characters from
|
||||
# text pasted into the current line. Set this to 1 to strip all newline
|
||||
# characters and 2 to replace them with a space.
|
||||
strip_crlf_on_paste = 2
|
||||
|
||||
# name: Enables basic ANSI escape code support
|
||||
# type: bool
|
||||
# When printing the prompt, Clink has basic built-in support for SGR ANSI escape
|
||||
# codes to control the text colours. This is automatically disabled if a third
|
||||
# party tool is detected that also provides this facility. It can also be
|
||||
# disabled by setting this to 0.
|
||||
ansi_code_support = 1
|
||||
|
53
docs/index.html
Normal file
@@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html><html><head><link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400" rel="stylesheet"><link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"><link href="https://cdn.jsdelivr.net/g/bootstrap@4.0.0-alpha.6(css/bootstrap.min.css)" rel="stylesheet"><script src="https://cdn.jsdelivr.net/g/jquery@3.2.1,tether@1.4.0,bootstrap@4.0.0-alpha.6,modernizr@3.3.1,detectizr@2.2.0"></script><title>Terminus</title><style>body {
|
||||
font-family: 'Source Sans Pro', sans-serif;
|
||||
background: #111;
|
||||
color: #ccc;
|
||||
min-height: 100vh;
|
||||
background-image: radial-gradient(#111, #000);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 64px;
|
||||
}
|
||||
|
||||
h1, h2, h3, h5 {
|
||||
font-weight: 300;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn i + span,
|
||||
.nav-link i + span {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.btn-outline-primary {
|
||||
color: #b6e7ff !important;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
video, img {
|
||||
max-width: 100%;
|
||||
box-shadow: 0 0 50px black;
|
||||
}
|
||||
</style><script defer>setTimeout(function () {
|
||||
/*
|
||||
if (Detectizr.os.name == 'windows') {
|
||||
$('[href="#windows"]').tab('show')
|
||||
}
|
||||
if (Detectizr.os.name == 'mac os') {
|
||||
$('[href="#macos"]').tab('show')
|
||||
}
|
||||
if (Detectizr.os.name == 'linux') {
|
||||
$('[href="#linux"]').tab('show')
|
||||
}
|
||||
*/
|
||||
})</script></head><body><div class="container mt-5 mb-5"><div class="text-center"><h1>Terminus</h1><h5>A terminal for a more modern age</h5><h2 class="text-muted">alpha</h2></div><div class="d-flex flex-row mt-5 mb-5"><ul class="nav nav-pills flex-column mr-5" style="min-width: 200px;"><li class="nav-item"><a class="nav-link active" data-toggle="tab" href="#windows" role="tab"><i class="fa fa-windows"></i><span>Windows</span></a></li><li class="nav-item"><a class="nav-link" data-toggle="tab" href="#macos" role="tab"><i class="fa fa-apple"></i><span>macOS</span></a></li><li class="nav-item"><a class="nav-link" data-toggle="tab" href="#linux" role="tab"><i class="fa fa-linux"></i><span>Linux</span></a></li></ul><div class="tab-content"><div class="tab-pane active" id="windows" role="tabpanel"><div class="row"><div class="col-6"><video src="videos/windows.mp4" autoplay loop></video></div><div class="col-6"><h3>A proper Windows experience</h3><p> <b>Clink </b>provides tab completion, readline-style editing and persistent command history on Windows.</p><p>Also supported:<ul> <li>Classic CMD</li><li>PowerShell </li><li>Bash on Windows </li></ul></p></div></div></div><div class="tab-pane" id="macos" role="tabpanel"><div class="row"><div class="col-6"><!--video(src='videos/windows.mp4', autoplay, loop)--></div><div class="col-6"><h3>Well...</h3><p>Not much to say here, it just works.</p></div></div></div><div class="tab-pane" id="linux" role="tabpanel"><div class="row"><div class="col-6"><img src="linux.png"></div><div class="col-6"><p><ul> <li>Spawn with a global hotkey</li><li>Tabs persist after restart</li><li>Auto-dock to any side of any screen</li><li>Full Unicode and double-width character support</li></ul></p></div></div></div></div></div><div class="text-center"><div class="mt-3 mb-3"><h2></h2><div><div class="btn-group mt-3 mb-1"><a class="btn btn-lg btn-outline-success" href="https://github.com/Eugeny/terminus/releases/latest" target="_blank"><i class="fa fa-download"></i><span>Downloads</span></a><a class="btn btn-lg btn-outline-secondary" href="https://github.com/Eugeny/terminus" target="_blank"><i class="fa fa-github"></i><span>GitHub</span></a></div></div><small class="text-muted">EXE, DMG, DEB, RPM, TGZ</small></div></div><div class="row mt-5"><div class="col-6"><h3>User experience</h3><ul><li>Spawn and hide with a global hotkey</li><li>Fully customizable hotkey schema</li><li>Restores tabs </li><li>Drag in a file to paste the path</li><li>Click paths and URLs to open in browser/file manager</li><li>Keeps the current directory in new tabs</li></ul></div><div class="col-6"><div class="mb-5"><h3>Customizable</h3><p>Multiple app themes and a myriad of community color schemes for the terminal. Color scheme editor included.</p></div><div> <h3>Infinitely extensible</h3><p>Install plugins from the NPM repository, or create your own with Typescript and Angular framework.</p></div></div></div></div><script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-3278102-18', 'auto');
|
||||
ga('send', 'pageview');</script></body></html>
|
160
docs/index.pug
Normal file
@@ -0,0 +1,160 @@
|
||||
doctype html
|
||||
html
|
||||
head
|
||||
link(href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400", rel="stylesheet")
|
||||
link(href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css", rel="stylesheet")
|
||||
link(href="https://cdn.jsdelivr.net/g/bootstrap@4.0.0-alpha.6(css/bootstrap.min.css)", rel="stylesheet")
|
||||
script(src="https://cdn.jsdelivr.net/g/jquery@3.2.1,tether@1.4.0,bootstrap@4.0.0-alpha.6,modernizr@3.3.1,detectizr@2.2.0")
|
||||
title Terminus
|
||||
style.
|
||||
body {
|
||||
font-family: 'Source Sans Pro', sans-serif;
|
||||
background: #111;
|
||||
color: #ccc;
|
||||
min-height: 100vh;
|
||||
background-image: radial-gradient(#111, #000);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 64px;
|
||||
}
|
||||
|
||||
h1, h2, h3, h5 {
|
||||
font-weight: 300;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn i + span,
|
||||
.nav-link i + span {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.btn-outline-primary {
|
||||
color: #b6e7ff !important;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
video, img {
|
||||
max-width: 100%;
|
||||
box-shadow: 0 0 50px black;
|
||||
}
|
||||
|
||||
script(defer).
|
||||
setTimeout(function () {
|
||||
/*
|
||||
if (Detectizr.os.name == 'windows') {
|
||||
$('[href="#windows"]').tab('show')
|
||||
}
|
||||
if (Detectizr.os.name == 'mac os') {
|
||||
$('[href="#macos"]').tab('show')
|
||||
}
|
||||
if (Detectizr.os.name == 'linux') {
|
||||
$('[href="#linux"]').tab('show')
|
||||
}
|
||||
*/
|
||||
})
|
||||
body
|
||||
.container.mt-5.mb-5
|
||||
.text-center
|
||||
h1 Terminus
|
||||
h5 A terminal for a more modern age
|
||||
h2.text-muted alpha
|
||||
|
||||
.d-flex.flex-row.mt-5.mb-5
|
||||
ul.nav.nav-pills.flex-column.mr-5(style='min-width: 200px')
|
||||
li.nav-item
|
||||
a.nav-link.active(data-toggle='tab', href='#windows', role='tab')
|
||||
i.fa.fa-windows
|
||||
span Windows
|
||||
li.nav-item
|
||||
a.nav-link(data-toggle='tab', href='#macos', role='tab')
|
||||
i.fa.fa-apple
|
||||
span macOS
|
||||
li.nav-item
|
||||
a.nav-link(data-toggle='tab', href='#linux', role='tab')
|
||||
i.fa.fa-linux
|
||||
span Linux
|
||||
|
||||
.tab-content
|
||||
#windows.tab-pane.active(role='tabpanel')
|
||||
.row
|
||||
.col-6
|
||||
video(src='videos/windows.mp4', autoplay, loop)
|
||||
.col-6
|
||||
h3 A proper Windows experience
|
||||
p
|
||||
b Clink
|
||||
| provides tab completion, readline-style editing and persistent command history on Windows.
|
||||
p Also supported:
|
||||
ul
|
||||
li Classic CMD
|
||||
li PowerShell
|
||||
li Bash on Windows
|
||||
|
||||
#macos.tab-pane(role='tabpanel')
|
||||
.row
|
||||
.col-6
|
||||
//video(src='videos/windows.mp4', autoplay, loop)
|
||||
.col-6
|
||||
h3 Well...
|
||||
p Not much to say here, it just works.
|
||||
|
||||
#linux.tab-pane(role='tabpanel')
|
||||
.row
|
||||
.col-6
|
||||
img(src='linux.png')
|
||||
.col-6
|
||||
p
|
||||
ul
|
||||
li Spawn with a global hotkey
|
||||
li Tabs persist after restart
|
||||
li Auto-dock to any side of any screen
|
||||
li Full Unicode and double-width character support
|
||||
|
||||
|
||||
.text-center
|
||||
.mt-3.mb-3
|
||||
h2
|
||||
|
||||
div
|
||||
.btn-group.mt-3.mb-1
|
||||
a.btn.btn-lg.btn-outline-success(href='https://github.com/Eugeny/terminus/releases/latest', target='_blank')
|
||||
i.fa.fa-download
|
||||
span Downloads
|
||||
a.btn.btn-lg.btn-outline-secondary(href='https://github.com/Eugeny/terminus', target='_blank')
|
||||
i.fa.fa-github
|
||||
span GitHub
|
||||
small.text-muted EXE, DMG, DEB, RPM, TGZ
|
||||
|
||||
|
||||
.row.mt-5
|
||||
.col-6
|
||||
h3 User experience
|
||||
ul
|
||||
li Spawn and hide with a global hotkey
|
||||
li Fully customizable hotkey schema
|
||||
li Restores tabs
|
||||
li Drag in a file to paste the path
|
||||
li Click paths and URLs to open in browser/file manager
|
||||
li Keeps the current directory in new tabs
|
||||
|
||||
.col-6
|
||||
.mb-5
|
||||
h3 Customizable
|
||||
p Multiple app themes and a myriad of community color schemes for the terminal. Color scheme editor included.
|
||||
|
||||
div
|
||||
h3 Infinitely extensible
|
||||
p Install plugins from the NPM repository, or create your own with Typescript and Angular framework.
|
||||
|
||||
script.
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-3278102-18', 'auto');
|
||||
ga('send', 'pageview');
|
BIN
docs/linux.png
Normal file
After Width: | Height: | Size: 94 KiB |
15
docs/package.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "docs",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "pug index.pug",
|
||||
"watch": "pug -w index.pug"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"pug-cli": "^1.0.0-alpha6"
|
||||
}
|
||||
}
|
BIN
docs/videos/windows.mp4
Normal file
107
package.json
@@ -1,67 +1,84 @@
|
||||
{
|
||||
"name": "term",
|
||||
"devDependencies": {
|
||||
"@types/core-js": "^0.9.35",
|
||||
"@types/electron": "1.4.34",
|
||||
"@types/fs-promise": "^1.0.1",
|
||||
"@types/node": "^7.0.5",
|
||||
"@types/webpack-env": "^1.13.0",
|
||||
"apply-loader": "^0.1.0",
|
||||
"@types/fs-promise": "1.0.1",
|
||||
"@types/node": "7.0.5",
|
||||
"@types/webpack-env": "1.13.0",
|
||||
"apply-loader": "0.1.0",
|
||||
"awesome-typescript-loader": "3.1.2",
|
||||
"cross-env": "^4.0.0",
|
||||
"css-loader": "0.26.1",
|
||||
"electron": "1.6.2",
|
||||
"electron-builder": "10.6.1",
|
||||
"electron-osx-sign": "electron-userland/electron-osx-sign#f092181a1bffa2b3248a23ee28447a47e14a8f04",
|
||||
"electron-rebuild": "1.5.7",
|
||||
"file-loader": "^0.9.0",
|
||||
"core-js": "2.4.1",
|
||||
"cross-env": "4.0.0",
|
||||
"css-loader": "0.28.0",
|
||||
"electron": "1.7.2",
|
||||
"electron-builder": "17.1.1",
|
||||
"electron-builder-squirrel-windows": "17.0.1",
|
||||
"electron-rebuild": "1.5.11",
|
||||
"file-loader": "0.9.0",
|
||||
"font-awesome": "4.7.0",
|
||||
"html-loader": "^0.4.4",
|
||||
"less": "^2.7.1",
|
||||
"less-loader": "^2.2.3",
|
||||
"node-gyp": "^3.4.0",
|
||||
"node-sass": "^4.5.0",
|
||||
"pug-html-loader": "^1.0.9",
|
||||
"pug-loader": "^2.3.0",
|
||||
"html-loader": "0.4.4",
|
||||
"json-loader": "0.5.4",
|
||||
"less": "2.7.1",
|
||||
"less-loader": "2.2.3",
|
||||
"node-abi": "2.0.3",
|
||||
"node-gyp": "3.4.0",
|
||||
"node-sass": "^4.5.3",
|
||||
"npmlog": "4.1.0",
|
||||
"pug": "2.0.0-beta11",
|
||||
"pug-html-loader": "1.0.9",
|
||||
"pug-loader": "2.3.0",
|
||||
"pug-static-loader": "0.0.1",
|
||||
"raw-loader": "^0.5.1",
|
||||
"sass-loader": "^6.0.3",
|
||||
"source-sans-pro": "^2.0.10",
|
||||
"style-loader": "^0.13.1",
|
||||
"to-string-loader": "^1.1.5",
|
||||
"tslint": "5.0.0",
|
||||
"raven-js": "3.16.0",
|
||||
"raw-loader": "0.5.1",
|
||||
"sass-loader": "6.0.3",
|
||||
"shelljs": "0.7.7",
|
||||
"source-sans-pro": "2.0.10",
|
||||
"style-loader": "0.13.1",
|
||||
"to-string-loader": "1.1.5",
|
||||
"tslint": "5.1.0",
|
||||
"tslint-config-standard": "5.0.2",
|
||||
"tslint-eslint-rules": "4.0.0",
|
||||
"typescript": "~2.1.0",
|
||||
"url-loader": "^0.5.7",
|
||||
"val-loader": "^0.5.0",
|
||||
"vrsource-tslint-rules": "^4.0.1",
|
||||
"webpack": "2.4.1"
|
||||
"typescript": "2.2.2",
|
||||
"url-loader": "0.5.7",
|
||||
"val-loader": "0.5.0",
|
||||
"webpack": "^3.0.0",
|
||||
"yaml-loader": "0.4.0"
|
||||
},
|
||||
"build": {
|
||||
"appId": "com.elements.benchmark",
|
||||
"productName": "ELEMENTS Benchmark",
|
||||
"appId": "org.terminus",
|
||||
"productName": "Terminus",
|
||||
"compression": "normal",
|
||||
"extraResources": [
|
||||
"builtin-plugins",
|
||||
"clink"
|
||||
],
|
||||
"win": {
|
||||
"target": "zip",
|
||||
"icon": "./app/assets/img/shortcut.ico"
|
||||
"icon": "./build/windows/icon.ico"
|
||||
},
|
||||
"squirrelWindows": {
|
||||
"iconUrl": "https://github.com/Eugeny/terminus/raw/master/build/windows/icon.ico"
|
||||
},
|
||||
"mac": {
|
||||
"category": "public.app-category.video",
|
||||
"icon": "./build/mac/icon.icns",
|
||||
"identity": "Syslink GmbH"
|
||||
"identity": null
|
||||
},
|
||||
"linux": {
|
||||
"category": "Network",
|
||||
"target": "AppImage",
|
||||
"icon": "./app/assets/img/icon.png"
|
||||
"category": "Utilities",
|
||||
"icon": "./build/icons"
|
||||
},
|
||||
"deb": {
|
||||
"depends": ["screen", "gconf2", "gconf-service", "libnotify4", "libappindicator1", "libxtst6", "libnss3"]
|
||||
},
|
||||
"rpm": {
|
||||
"depends": ["screen"]
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build": "webpack --progress --color",
|
||||
"build": "webpack --color --config app/webpack.config.js && webpack --color --config terminus-core/webpack.config.js && webpack --color --config terminus-settings/webpack.config.js && webpack --color --config terminus-terminal/webpack.config.js && webpack --color --config terminus-settings/webpack.config.js && webpack --color --config terminus-plugin-manager/webpack.config.js && webpack --color --config terminus-community-color-schemes/webpack.config.js",
|
||||
"watch": "webpack --progress --color --watch",
|
||||
"start": "cross-env DEV=1 electron app --debug",
|
||||
"pack": "build --dir",
|
||||
"postinstall": "install-app-deps",
|
||||
"dist": "build"
|
||||
}
|
||||
"start": "cross-env DEV=1 electron --js-flags='--ignition' app --debug",
|
||||
"lint": "tslint -c tslint.json -t stylish terminus-*/src/**/*.ts terminus-*/src/*.ts app/src/*.ts",
|
||||
"postinstall": "install-app-deps"
|
||||
},
|
||||
"false": {}
|
||||
}
|
||||
|
11
scripts/build-linux.js
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env node
|
||||
const builder = require('electron-builder').build
|
||||
const vars = require('./vars')
|
||||
|
||||
builder({
|
||||
dir: true,
|
||||
linux: ['deb', 'rpm', 'tar.gz'],
|
||||
extraMetadata: {
|
||||
version: vars.version,
|
||||
},
|
||||
})
|
11
scripts/build-macos.js
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env node
|
||||
const builder = require('electron-builder').build
|
||||
const vars = require('./vars')
|
||||
|
||||
builder({
|
||||
dir: true,
|
||||
mac: ['dmg'],
|
||||
extraMetadata: {
|
||||
version: vars.version,
|
||||
},
|
||||
})
|
9
scripts/build-native.js
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env node
|
||||
const rebuild = require('electron-rebuild').default
|
||||
const path = require('path')
|
||||
const vars = require('./vars')
|
||||
|
||||
let buildPath = path.resolve(__dirname, '../terminus-terminal')
|
||||
rebuild(buildPath, vars.electronVersion, process.arch, [], true).then(() => {
|
||||
console.log('Done')
|
||||
})
|
11
scripts/build-windows.js
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env node
|
||||
const builder = require('electron-builder').build
|
||||
const vars = require('./vars')
|
||||
|
||||
builder({
|
||||
dir: true,
|
||||
win: ['squirrel'],
|
||||
extraMetadata: {
|
||||
version: vars.version,
|
||||
},
|
||||
})
|
25
scripts/install-deps.js
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env node
|
||||
const sh = require('shelljs')
|
||||
const path = require('path')
|
||||
const vars = require('./vars')
|
||||
const log = require('npmlog')
|
||||
|
||||
log.info('deps', 'app')
|
||||
sh.exec('npm prune')
|
||||
sh.exec('npm install')
|
||||
sh.exec('npm update --dev')
|
||||
|
||||
sh.cd('app')
|
||||
sh.exec('npm prune')
|
||||
sh.exec('npm install')
|
||||
sh.exec('npm update --dev')
|
||||
sh.cd('..')
|
||||
|
||||
vars.builtinPlugins.forEach(plugin => {
|
||||
log.info('deps', plugin)
|
||||
sh.cd(plugin)
|
||||
sh.exec('npm prune')
|
||||
sh.exec('npm install')
|
||||
sh.exec('npm update --dev')
|
||||
sh.cd('..')
|
||||
})
|
24
scripts/prepackage-plugins.js
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env node
|
||||
const rebuild = require('electron-rebuild').default
|
||||
const sh = require('shelljs')
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
const vars = require('./vars')
|
||||
const log = require('npmlog')
|
||||
|
||||
let target = path.resolve(__dirname, '../builtin-plugins')
|
||||
sh.mkdir('-p', target)
|
||||
fs.writeFileSync(path.join(target, 'package.json'), '{}')
|
||||
sh.cd(target)
|
||||
vars.builtinPlugins.forEach(plugin => {
|
||||
log.info('install', plugin)
|
||||
sh.cp('-r', path.join('..', plugin), '.')
|
||||
sh.rm('-rf', path.join(plugin, 'node_modules'))
|
||||
sh.cd(plugin)
|
||||
sh.exec(`npm install --only=prod`)
|
||||
log.info('rebuild', 'native')
|
||||
if (fs.existsSync('node_modules')) {
|
||||
rebuild(path.resolve('.'), vars.electronVersion, process.arch, [], true)
|
||||
}
|
||||
sh.cd('..')
|
||||
})
|
20
scripts/vars.js
Executable file
@@ -0,0 +1,20 @@
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
const childProcess = require('child_process')
|
||||
|
||||
const appInfo = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../app/package.json')))
|
||||
const pkgInfo = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../package.json')))
|
||||
|
||||
exports.version = childProcess.execSync('git describe --tags', {encoding:'utf-8'})
|
||||
exports.version = exports.version.substring(1, exports.version.length - 1)
|
||||
|
||||
exports.builtinPlugins = [
|
||||
'terminus-core',
|
||||
'terminus-settings',
|
||||
'terminus-terminal',
|
||||
'terminus-community-color-schemes',
|
||||
'terminus-plugin-manager',
|
||||
]
|
||||
exports.nativeModules = ['node-pty', 'font-manager']
|
||||
exports.version = appInfo.version
|
||||
exports.electronVersion = pkgInfo.devDependencies.electron
|
2
terminus-clickable-links/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
dist
|
||||
node_modules
|
@@ -1,26 +0,0 @@
|
||||
{
|
||||
"name": "terminus-clickable-links",
|
||||
"version": "0.0.1",
|
||||
"description": "Makes URLs and file paths clickable in Terminus",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "webpack --progress --color",
|
||||
"watch": "webpack --progress --color --watch"
|
||||
},
|
||||
"author": "Eugene Pankov",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"awesome-typescript-loader": "^3.1.2",
|
||||
"typescript": "^2.2.2",
|
||||
"webpack": "^2.3.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/core": "^4.0.1",
|
||||
"terminus-core": "*",
|
||||
"terminus-terminal": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
"untildify": "^3.0.2"
|
||||
}
|
||||
}
|
@@ -1,6 +0,0 @@
|
||||
export abstract class LinkHandler {
|
||||
regex: string
|
||||
convert (uri: string): string { return uri }
|
||||
verify (_uri: string): boolean { return true }
|
||||
abstract handle (uri: string): void
|
||||
}
|
@@ -1,91 +0,0 @@
|
||||
import { Inject, Injectable } from '@angular/core'
|
||||
import { TerminalDecorator, TerminalTabComponent } from 'terminus-terminal'
|
||||
|
||||
import { LinkHandler } from './api'
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class LinkHighlighterDecorator extends TerminalDecorator {
|
||||
constructor (@Inject(LinkHandler) private handlers: LinkHandler[]) {
|
||||
super()
|
||||
}
|
||||
|
||||
attach (terminal: TerminalTabComponent): void {
|
||||
terminal.contentUpdated$
|
||||
.debounceTime(1000)
|
||||
.subscribe(() => {
|
||||
this.insertLinks(terminal.hterm.screen_)
|
||||
})
|
||||
}
|
||||
|
||||
insertLinks (screen) {
|
||||
if ('#text' === screen.cursorNode_.nodeName) {
|
||||
// replace text node to element
|
||||
const cursorNode = document.createElement('span');
|
||||
cursorNode.textContent = screen.cursorNode_.textContent;
|
||||
screen.cursorRowNode_.replaceChild(cursorNode, screen.cursorNode_);
|
||||
screen.cursorNode_ = cursorNode;
|
||||
}
|
||||
|
||||
const traverse = (parentNode: Node) => {
|
||||
Array.from(parentNode.childNodes).forEach((node) => {
|
||||
if (node.nodeName == '#text') {
|
||||
parentNode.replaceChild(this.urlizeNode(node), node)
|
||||
} else if (node.nodeName != 'A') {
|
||||
traverse(node)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
screen.rowsArray.forEach((x) => traverse(x))
|
||||
}
|
||||
|
||||
urlizeNode (node) {
|
||||
let matches = []
|
||||
this.handlers.forEach((handler) => {
|
||||
let regex = new RegExp(handler.regex, 'gi')
|
||||
let match
|
||||
while (match = regex.exec(node.textContent)) {
|
||||
let uri = handler.convert(match[0])
|
||||
if (!handler.verify(uri)) {
|
||||
continue;
|
||||
}
|
||||
matches.push({
|
||||
start: regex.lastIndex - match[0].length,
|
||||
end: regex.lastIndex,
|
||||
text: match[0],
|
||||
uri,
|
||||
handler
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
if (matches.length == 0) {
|
||||
return node
|
||||
}
|
||||
|
||||
matches.sort((a, b) => a.start < b.start ? -1 : 1)
|
||||
|
||||
let span = document.createElement('span')
|
||||
let position = 0
|
||||
matches.forEach((match) => {
|
||||
if (match.start < position) {
|
||||
return
|
||||
}
|
||||
if (match.start > position) {
|
||||
span.appendChild(document.createTextNode(node.textContent.slice(position, match.start)))
|
||||
}
|
||||
|
||||
let a = document.createElement('a')
|
||||
a.textContent = match.text
|
||||
a.addEventListener('click', () => {
|
||||
match.handler.handle(match.uri)
|
||||
})
|
||||
span.appendChild(a)
|
||||
|
||||
position = match.end
|
||||
})
|
||||
span.appendChild(document.createTextNode(node.textContent.slice(position)))
|
||||
return span
|
||||
}
|
||||
}
|
@@ -1,41 +0,0 @@
|
||||
import * as fs from 'fs'
|
||||
const untildify = require('untildify')
|
||||
import { Injectable } from '@angular/core'
|
||||
import { ElectronService } from 'terminus-core'
|
||||
|
||||
import { LinkHandler } from './api'
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class URLHandler extends LinkHandler {
|
||||
regex = 'http(s)?://[^\\s;\'"]+[^,;\\s]'
|
||||
|
||||
constructor (private electron: ElectronService) {
|
||||
super()
|
||||
}
|
||||
|
||||
handle (uri: string) {
|
||||
this.electron.shell.openExternal(uri)
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class FileHandler extends LinkHandler {
|
||||
regex = '[~/][^\\s.,;\'"]+'
|
||||
|
||||
constructor (private electron: ElectronService) {
|
||||
super()
|
||||
}
|
||||
|
||||
convert (uri: string): string {
|
||||
return untildify(uri)
|
||||
}
|
||||
|
||||
verify (uri: string) {
|
||||
return fs.existsSync(uri)
|
||||
}
|
||||
|
||||
handle (uri: string) {
|
||||
this.electron.shell.openExternal('file://' + uri)
|
||||
}
|
||||
}
|
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
This plugin is based on Hyperterm Hyperlinks:
|
||||
https://github.com/zeit/hyperlinks/blob/master/index.js
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core'
|
||||
import { TerminalDecorator } from 'terminus-terminal'
|
||||
|
||||
import { LinkHandler } from './api'
|
||||
import { FileHandler, URLHandler } from './handlers'
|
||||
import { LinkHighlighterDecorator } from './decorator'
|
||||
|
||||
|
||||
@NgModule({
|
||||
providers: [
|
||||
{ provide: LinkHandler, useClass: FileHandler, multi: true },
|
||||
{ provide: LinkHandler, useClass: URLHandler, multi: true },
|
||||
{ provide: TerminalDecorator, useClass: LinkHighlighterDecorator, multi: true },
|
||||
],
|
||||
})
|
||||
export default class LinkHighlighterModule { }
|
||||
|
||||
export * from './api'
|
@@ -1,42 +0,0 @@
|
||||
const path = require('path')
|
||||
|
||||
module.exports = {
|
||||
target: 'node',
|
||||
entry: 'src/index.ts',
|
||||
devtool: 'source-map',
|
||||
context: __dirname,
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: 'index.js',
|
||||
pathinfo: true,
|
||||
libraryTarget: 'umd',
|
||||
devtoolModuleFilenameTemplate: 'webpack-terminus-clickable-links:///[resource-path]',
|
||||
},
|
||||
resolve: {
|
||||
modules: ['.', 'src', 'node_modules', '../app/node_modules'].map(x => path.join(__dirname, x)),
|
||||
extensions: ['.ts', '.js'],
|
||||
},
|
||||
module: {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
loader: 'awesome-typescript-loader',
|
||||
query: {
|
||||
configFileName: path.resolve(__dirname, 'tsconfig.json'),
|
||||
paths: {
|
||||
"terminus-*": [path.resolve(__dirname, '../terminus-*')],
|
||||
"*": [path.resolve(__dirname, '../app/node_modules/*')],
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
externals: [
|
||||
'fs',
|
||||
'untildify',
|
||||
/^rxjs/,
|
||||
/^@angular/,
|
||||
/^@ng-bootstrap/,
|
||||
/^terminus-/,
|
||||
]
|
||||
}
|
@@ -8,6 +8,9 @@
|
||||
"build": "webpack --progress --color",
|
||||
"watch": "webpack --progress --color --watch"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"author": "Eugene Pankov",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
@@ -17,9 +20,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.0.12",
|
||||
"@types/webpack-env": "^1.13.0",
|
||||
"awesome-typescript-loader": "3.1.2",
|
||||
"raw-loader": "0.5.1",
|
||||
"webpack": "2.3.3"
|
||||
}
|
||||
"@types/webpack-env": "^1.13.0"
|
||||
},
|
||||
"false": {}
|
||||
}
|
||||
|
@@ -3,14 +3,13 @@ import { TerminalColorSchemeProvider, ITerminalColorScheme } from 'terminus-term
|
||||
|
||||
const schemeContents = require.context('../schemes/', true, /.*/)
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class ColorSchemes extends TerminalColorSchemeProvider {
|
||||
async getSchemes (): Promise<ITerminalColorScheme[]> {
|
||||
let schemes: ITerminalColorScheme[] = []
|
||||
|
||||
schemeContents.keys().forEach(schemeFile => {
|
||||
let lines = (<string>schemeContents(schemeFile)).split('\n')
|
||||
let lines = (schemeContents(schemeFile) as string).split('\n')
|
||||
let values: any = {}
|
||||
lines
|
||||
.filter(x => x.startsWith('*.'))
|
||||
|
@@ -3,7 +3,6 @@ import { TerminalColorSchemeProvider } from 'terminus-terminal'
|
||||
|
||||
import { ColorSchemes } from './colorSchemes'
|
||||
|
||||
|
||||
@NgModule({
|
||||
providers: [
|
||||
{ provide: TerminalColorSchemeProvider, useClass: ColorSchemes, multi: true },
|
||||
|
@@ -1,26 +1,8 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"exclude": ["node_modules", "dist"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"module": "commonjs",
|
||||
"target": "es2016",
|
||||
"declaration": false,
|
||||
"noImplicitAny": false,
|
||||
"removeComments": false,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"sourceMap": true,
|
||||
"noUnusedParameters": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUnusedParameters": true,
|
||||
"noUnusedLocals": true,
|
||||
"declaration": true,
|
||||
"declarationDir": "dist",
|
||||
"lib": [
|
||||
"dom",
|
||||
"es2015",
|
||||
"es7"
|
||||
]
|
||||
},
|
||||
"exclude": ["node_modules", "dist"]
|
||||
"declarationDir": "dist"
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
|
||||
module.exports = {
|
||||
target: 'node',
|
||||
@@ -38,5 +39,8 @@ module.exports = {
|
||||
/^@angular/,
|
||||
/^@ng-bootstrap/,
|
||||
/^terminus-/,
|
||||
]
|
||||
],
|
||||
plugins: [
|
||||
new webpack.optimize.ModuleConcatenationPlugin(),
|
||||
],
|
||||
}
|
||||
|
@@ -8,25 +8,20 @@
|
||||
"build": "rm -rf dist && webpack --progress --color --display-modules",
|
||||
"watch": "rm -rf dist && webpack --progress --color --watch"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"author": "Eugene Pankov",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.22",
|
||||
"@types/electron": "^1.4.35",
|
||||
"@types/js-yaml": "^3.5.29",
|
||||
"@types/node": "^7.0.12",
|
||||
"@types/webpack-env": "^1.13.0",
|
||||
"angular2-toaster": "3.0.1",
|
||||
"awesome-typescript-loader": "^3.1.2",
|
||||
"bootstrap": "4.0.0-alpha.6",
|
||||
"core-js": "^2.4.1",
|
||||
"json-loader": "^0.5.4",
|
||||
"ngx-perfect-scrollbar": "^4.0.0",
|
||||
"style-loader": "^0.13.1",
|
||||
"to-string-loader": "^1.1.5",
|
||||
"typescript": "^2.2.2",
|
||||
"webpack": "^2.3.3",
|
||||
"yaml-loader": "^0.4.0"
|
||||
"ngx-perfect-scrollbar": "4.0.0",
|
||||
"typescript": "^2.4.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/animations": "4.0.1",
|
||||
@@ -39,7 +34,8 @@
|
||||
"zone.js": "0.8.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"deepmerge": "^1.3.2",
|
||||
"js-yaml": "^3.8.3"
|
||||
}
|
||||
"deepmerge": "^1.4.4",
|
||||
"js-yaml": "^3.8.4"
|
||||
},
|
||||
"false": {}
|
||||
}
|
||||
|
@@ -1,9 +1,14 @@
|
||||
title-bar(*ngIf='config.store.appearance.frame == "full" && config.store.appearance.dock == "off"')
|
||||
title-bar(
|
||||
*ngIf='config.store.appearance.frame == "full" && config.store.appearance.dock == "off"',
|
||||
[class.inset]='hostApp.platform == Platform.macOS'
|
||||
)
|
||||
|
||||
.content(
|
||||
[class.tabs-on-top]='config.store.appearance.tabsOnTop'
|
||||
[class.tabs-on-top]='config.store.appearance.tabsLocation == "top"'
|
||||
)
|
||||
.tab-bar
|
||||
.tab-bar(
|
||||
[class.inset]='hostApp.platform == Platform.macOS && config.store.appearance.frame == "thin" && config.store.appearance.tabsLocation == "top"'
|
||||
)
|
||||
.tabs
|
||||
tab-header(
|
||||
*ngFor='let tab of app.tabs; let idx = index',
|
||||
@@ -11,44 +16,35 @@ title-bar(*ngIf='config.store.appearance.frame == "full" && config.store.appeara
|
||||
[tab]='tab',
|
||||
[active]='tab == app.activeTab',
|
||||
[hasActivity]='tab.hasActivity',
|
||||
[class.drag-region]='hostApp.platform == Platform.macOS',
|
||||
@animateTab,
|
||||
(click)='app.selectTab(tab)',
|
||||
(closeClicked)='app.closeTab(tab)',
|
||||
)
|
||||
|
||||
button.btn.btn-secondary(
|
||||
*ngFor='let button of getLeftToolbarButtons()',
|
||||
[title]='button.title',
|
||||
(click)='button.click()',
|
||||
)
|
||||
i.fa([class]='"fa fa-" + button.icon')
|
||||
.btn-group
|
||||
button.btn.btn-secondary.btn-tab-bar(
|
||||
*ngFor='let button of leftToolbarButtons',
|
||||
[title]='button.title',
|
||||
(click)='button.click()',
|
||||
)
|
||||
i.fa([class]='"fa fa-" + button.icon')
|
||||
|
||||
.drag-space
|
||||
|
||||
.btn-group
|
||||
button.btn.btn-secondary.btn-tab-bar(
|
||||
*ngFor='let button of rightToolbarButtons',
|
||||
[title]='button.title',
|
||||
(click)='button.click()',
|
||||
)
|
||||
i.fa([class]='"fa fa-" + button.icon')
|
||||
|
||||
button.btn.btn-secondary(
|
||||
*ngFor='let button of getRightToolbarButtons()',
|
||||
[title]='button.title',
|
||||
(click)='button.click()',
|
||||
window-controls(
|
||||
*ngIf='config.store.appearance.frame == "thin" && (hostApp.platform == Platform.Windows || hostApp.platform == Platform.Linux)',
|
||||
)
|
||||
i.fa([class]='"fa fa-" + button.icon')
|
||||
|
||||
button.btn.btn-secondary.btn-minimize(
|
||||
*ngIf='config.store.appearance.frame == "thin"',
|
||||
(click)='hostApp.minimize()',
|
||||
)
|
||||
i.fa.fa-window-minimize
|
||||
button.btn.btn-secondary.btn-maximize(
|
||||
*ngIf='config.store.appearance.frame == "thin"',
|
||||
(click)='hostApp.toggleMaximize()',
|
||||
)
|
||||
i.fa.fa-window-maximize
|
||||
button.btn.btn-secondary.btn-close(
|
||||
*ngIf='config.store.appearance.frame == "thin"',
|
||||
(click)='hostApp.quit()',
|
||||
)
|
||||
i.fa.fa-close
|
||||
|
||||
start-page(*ngIf='app.tabs.length == 0')
|
||||
start-page(*ngIf='ready && app.tabs.length == 0')
|
||||
|
||||
tab-body(
|
||||
*ngFor='let tab of app.tabs; trackBy: tab?.id',
|
||||
@@ -57,5 +53,4 @@ title-bar(*ngIf='config.store.appearance.frame == "full" && config.store.appeara
|
||||
[scrollable]='tab.scrollable',
|
||||
)
|
||||
|
||||
toaster-container([toasterconfig]="toasterconfig")
|
||||
ng-template(ngbModalContainer)
|
||||
|
@@ -5,12 +5,13 @@
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
-webkit-user-select: none;
|
||||
-webkit-user-drag: none;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
cursor: default;
|
||||
animation: 0.5s ease-out fadeIn;
|
||||
}
|
||||
|
||||
$tabs-height: 40px;
|
||||
$tabs-height: 36px;
|
||||
$tab-border-radius: 4px;
|
||||
|
||||
|
||||
@@ -29,7 +30,7 @@ $tab-border-radius: 4px;
|
||||
height: $tabs-height;
|
||||
display: flex;
|
||||
|
||||
&>button {
|
||||
.btn-tab-bar {
|
||||
line-height: $tabs-height + 2px;
|
||||
cursor: pointer;
|
||||
|
||||
@@ -45,17 +46,6 @@ $tab-border-radius: 4px;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
|
||||
&.btn-minimize {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
&.btn-minimize, &.btn-maximize {
|
||||
font-size: 8px;
|
||||
}
|
||||
|
||||
&.btn-close {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
&>.tabs {
|
||||
@@ -69,6 +59,14 @@ $tab-border-radius: 4px;
|
||||
flex: 1 0 25%;
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
|
||||
&.inset {
|
||||
padding-left: 85px;
|
||||
}
|
||||
|
||||
window-controls {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.tabs-content {
|
||||
|
@@ -1,9 +1,8 @@
|
||||
import { Component, Inject } from '@angular/core'
|
||||
import { Component, Inject, Input, HostListener } from '@angular/core'
|
||||
import { trigger, style, animate, transition, state } from '@angular/animations'
|
||||
import { ToasterConfig } from 'angular2-toaster'
|
||||
|
||||
import { ElectronService } from '../services/electron.service'
|
||||
import { HostAppService } from '../services/hostApp.service'
|
||||
import { HostAppService, Platform } from '../services/hostApp.service'
|
||||
import { HotkeysService } from '../services/hotkeys.service'
|
||||
import { Logger, LogService } from '../services/log.service'
|
||||
import { QuitterService } from '../services/quitter.service'
|
||||
@@ -14,7 +13,6 @@ import { ThemesService } from '../services/themes.service'
|
||||
|
||||
import { AppService, IToolbarButton, ToolbarButtonProvider } from '../api'
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
template: require('./appRoot.component.pug'),
|
||||
@@ -22,30 +20,33 @@ import { AppService, IToolbarButton, ToolbarButtonProvider } from '../api'
|
||||
animations: [
|
||||
trigger('animateTab', [
|
||||
state('in', style({
|
||||
'flex-grow': '1000',
|
||||
'flex-basis': '200px',
|
||||
'width': '200px',
|
||||
})),
|
||||
transition(':enter', [
|
||||
style({
|
||||
'flex-grow': '1',
|
||||
'flex-basis': '1px',
|
||||
'width': '1px',
|
||||
}),
|
||||
animate('250ms ease-in-out')
|
||||
]),
|
||||
transition(':leave', [
|
||||
animate('250ms ease-in-out', style({
|
||||
'flex-grow': '1',
|
||||
'flex-basis': '1px',
|
||||
'width': '1px',
|
||||
}))
|
||||
])
|
||||
])
|
||||
]
|
||||
})
|
||||
export class AppRootComponent {
|
||||
toasterConfig: ToasterConfig
|
||||
Platform = Platform
|
||||
@Input() ready = false
|
||||
@Input() leftToolbarButtons: IToolbarButton[]
|
||||
@Input() rightToolbarButtons: IToolbarButton[]
|
||||
private logger: Logger
|
||||
|
||||
constructor(
|
||||
constructor (
|
||||
private docking: DockingService,
|
||||
private electron: ElectronService,
|
||||
private tabRecovery: TabRecoveryService,
|
||||
@@ -61,11 +62,8 @@ export class AppRootComponent {
|
||||
this.logger = log.create('main')
|
||||
this.logger.info('v', electron.app.getVersion())
|
||||
|
||||
this.toasterConfig = new ToasterConfig({
|
||||
mouseoverTimerStop: true,
|
||||
preventDuplicates: true,
|
||||
timeout: 4000,
|
||||
})
|
||||
this.leftToolbarButtons = this.getToolbarButtons(false)
|
||||
this.rightToolbarButtons = this.getToolbarButtons(true)
|
||||
|
||||
this.hotkeys.matchedHotkey.subscribe((hotkey) => {
|
||||
if (hotkey.startsWith('tab-')) {
|
||||
@@ -75,16 +73,16 @@ export class AppRootComponent {
|
||||
}
|
||||
}
|
||||
if (this.app.activeTab) {
|
||||
if (hotkey == 'close-tab') {
|
||||
if (hotkey === 'close-tab') {
|
||||
this.app.closeTab(this.app.activeTab)
|
||||
}
|
||||
if (hotkey == 'toggle-last-tab') {
|
||||
if (hotkey === 'toggle-last-tab') {
|
||||
this.app.toggleLastTab()
|
||||
}
|
||||
if (hotkey == 'next-tab') {
|
||||
if (hotkey === 'next-tab') {
|
||||
this.app.nextTab()
|
||||
}
|
||||
if (hotkey == 'previous-tab') {
|
||||
if (hotkey === 'previous-tab') {
|
||||
this.app.previousTab()
|
||||
}
|
||||
}
|
||||
@@ -112,7 +110,7 @@ export class AppRootComponent {
|
||||
// unfocused, invisible
|
||||
this.electron.app.window.show()
|
||||
} else {
|
||||
if (this.config.store.appearance.dock == 'off') {
|
||||
if (this.config.store.appearance.dock === 'off') {
|
||||
// not docked, visible
|
||||
setTimeout(() => {
|
||||
this.electron.app.window.focus()
|
||||
@@ -125,15 +123,12 @@ export class AppRootComponent {
|
||||
}
|
||||
}
|
||||
|
||||
getLeftToolbarButtons (): IToolbarButton[] { return this.getToolbarButtons(false) }
|
||||
|
||||
getRightToolbarButtons (): IToolbarButton[] { return this.getToolbarButtons(true) }
|
||||
|
||||
async ngOnInit () {
|
||||
await this.tabRecovery.recoverTabs()
|
||||
this.ready = true
|
||||
this.tabRecovery.saveTabs(this.app.tabs)
|
||||
|
||||
if (this.app.tabs.length == 0) {
|
||||
if (this.app.tabs.length === 0) {
|
||||
this.app.openDefaultTab()
|
||||
}
|
||||
}
|
||||
@@ -148,4 +143,13 @@ export class AppRootComponent {
|
||||
.sort((a: IToolbarButton, b: IToolbarButton) => (a.weight || 0) - (b.weight || 0))
|
||||
}
|
||||
|
||||
@HostListener('dragover')
|
||||
onDragOver () {
|
||||
return false
|
||||
}
|
||||
|
||||
@HostListener('drop')
|
||||
onDrop () {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
import { Subject, BehaviorSubject } from 'rxjs'
|
||||
import { ViewRef } from '@angular/core'
|
||||
|
||||
|
||||
export abstract class BaseTabComponent {
|
||||
private static lastTabID = 0
|
||||
id: number
|
||||
title$ = new BehaviorSubject<string>(null)
|
||||
scrollable: boolean
|
||||
@@ -11,7 +11,6 @@ export abstract class BaseTabComponent {
|
||||
blurred$ = new Subject<void>()
|
||||
hasFocus = false
|
||||
hostView: ViewRef
|
||||
private static lastTabID = 0
|
||||
|
||||
constructor () {
|
||||
this.id = BaseTabComponent.lastTabID++
|
||||
|
@@ -15,6 +15,7 @@ div
|
||||
.part(style='transform: rotateZ(308deg)')
|
||||
div
|
||||
h1.terminus-title Terminus
|
||||
span.text-muted α
|
||||
|
||||
button.btn.btn-primary.btn-lg.btn-block(
|
||||
*ngFor='let button of getButtons()',
|
||||
|
@@ -3,12 +3,12 @@ import { ElectronService } from '../services/electron.service'
|
||||
import { IToolbarButton, ToolbarButtonProvider } from '../api'
|
||||
|
||||
@Component({
|
||||
selector: 'start-page',
|
||||
template: require('./startPage.component.pug'),
|
||||
styles: [require('./startPage.component.scss')],
|
||||
selector: 'start-page',
|
||||
template: require('./startPage.component.pug'),
|
||||
styles: [require('./startPage.component.scss')],
|
||||
})
|
||||
export class StartPageComponent {
|
||||
constructor(
|
||||
constructor (
|
||||
private electron: ElectronService,
|
||||
@Inject(ToolbarButtonProvider) private toolbarButtonProviders: ToolbarButtonProvider[],
|
||||
) { }
|
||||
|
@@ -1,3 +1,3 @@
|
||||
.index {{index + 1}}
|
||||
.name {{(tab.title$ || "Terminal") | async}}
|
||||
.name {{tab.title$ | async}}
|
||||
button((click)='closeClicked.emit()') ×
|
||||
|
@@ -1,4 +1,4 @@
|
||||
$tabs-height: 40px;
|
||||
$tabs-height: 36px;
|
||||
|
||||
:host {
|
||||
line-height: $tabs-height - 2px;
|
||||
@@ -13,7 +13,7 @@ $tabs-height: 40px;
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
transition: 0.25s ease-out all;
|
||||
transition: 0.125s ease-out all;
|
||||
|
||||
border-top: 1px solid transparent;
|
||||
|
||||
@@ -24,7 +24,7 @@ $tabs-height: 40px;
|
||||
margin-left: 10px;
|
||||
width: 20px;
|
||||
border-radius: 10px;
|
||||
line-height: 38px;
|
||||
line-height: 35px;
|
||||
text-align: center;
|
||||
transition: 0.25s all;
|
||||
}
|
||||
@@ -44,12 +44,12 @@ $tabs-height: 40px;
|
||||
background: transparent;
|
||||
opacity: 0;
|
||||
|
||||
$button-size: $tabs-height * 0.6;
|
||||
$button-size: 23px;
|
||||
width: $button-size;
|
||||
height: $button-size;
|
||||
border-radius: $button-size / 2;
|
||||
line-height: $button-size * 0.8;
|
||||
margin-top: ($tabs-height - $button-size) * 0.4;
|
||||
line-height: $button-size * 0.87;
|
||||
margin-top: ($tabs-height - $button-size) * 0.5;
|
||||
margin-right: 10px;
|
||||
|
||||
text-align: center;
|
||||
@@ -61,4 +61,8 @@ $tabs-height: 40px;
|
||||
display: block;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&.drag-region {
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
}
|
||||
|
@@ -2,9 +2,9 @@ import { Component, Input, Output, EventEmitter, HostBinding } from '@angular/co
|
||||
import { BaseTabComponent } from '../components/baseTab.component'
|
||||
|
||||
@Component({
|
||||
selector: 'tab-header',
|
||||
template: require('./tabHeader.component.pug'),
|
||||
styles: [require('./tabHeader.component.scss')],
|
||||
selector: 'tab-header',
|
||||
template: require('./tabHeader.component.pug'),
|
||||
styles: [require('./tabHeader.component.scss')],
|
||||
})
|
||||
export class TabHeaderComponent {
|
||||
@Input() index: number
|
||||
|
@@ -1,7 +1,2 @@
|
||||
.title((dblclick)='hostApp.toggleMaximize()') Terminus
|
||||
button.btn.btn-secondary.btn-minimize((click)='hostApp.minimize()')
|
||||
i.fa.fa-window-minimize
|
||||
button.btn.btn-secondary.btn-maximize((click)='hostApp.toggleMaximize()')
|
||||
i.fa.fa-window-maximize
|
||||
button.btn.btn-secondary.btn-close((click)='hostApp.quit()')
|
||||
i.fa.fa-close
|
||||
window-controls
|
||||
|
@@ -11,27 +11,7 @@ $titlebar-height: 30px;
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
|
||||
button {
|
||||
flex: none;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
border-radius: 0;
|
||||
font-size: 8px;
|
||||
width: 40px;
|
||||
padding: 0;
|
||||
line-height: $titlebar-height;
|
||||
text-align: center;
|
||||
|
||||
&:not(:hover):not(:active) {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-close {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
&.inset-titlebar {
|
||||
&.inset {
|
||||
flex-basis: 36px;
|
||||
|
||||
.title {
|
||||
@@ -39,7 +19,7 @@ $titlebar-height: 30px;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
button {
|
||||
window-controls {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
@@ -1,15 +1,8 @@
|
||||
import { Component, HostBinding } from '@angular/core'
|
||||
import { HostAppService, Platform } from '../services/hostApp.service'
|
||||
import { Component } from '@angular/core'
|
||||
|
||||
@Component({
|
||||
selector: 'title-bar',
|
||||
template: require('./titleBar.component.pug'),
|
||||
styles: [require('./titleBar.component.scss')],
|
||||
selector: 'title-bar',
|
||||
template: require('./titleBar.component.pug'),
|
||||
styles: [require('./titleBar.component.scss')],
|
||||
})
|
||||
export class TitleBarComponent {
|
||||
@HostBinding('class.inset-titlebar') insetTitlebar = false
|
||||
|
||||
constructor (public hostApp: HostAppService) {
|
||||
this.insetTitlebar = hostApp.platform == Platform.macOS
|
||||
}
|
||||
}
|
||||
export class TitleBarComponent { }
|
||||
|
15
terminus-core/src/components/windowControls.component.pug
Normal file
@@ -0,0 +1,15 @@
|
||||
button.btn.btn-secondary.btn-minimize(
|
||||
(click)='hostApp.minimize()',
|
||||
)
|
||||
svg(version='1.1', width='10', height='10')
|
||||
path(d='M 0,5 10,5 10,6 0,6 Z')
|
||||
button.btn.btn-secondary.btn-maximize(
|
||||
(click)='hostApp.toggleMaximize()',
|
||||
)
|
||||
svg(version='1.1', width='10', height='10')
|
||||
path(d='M 0,0 0,10 10,10 10,0 Z M 1,1 9,1 9,9 1,9 Z')
|
||||
button.btn.btn-secondary.btn-close(
|
||||
(click)='hostApp.quit()',
|
||||
)
|
||||
svg(version='1.1', width='10', height='10')
|
||||
path(d='M 0,0 0,0.7 4.3,5 0,9.3 0,10 0.7,10 5,5.7 9.3,10 10,10 10,9.3 5.7,5 10,0.7 10,0 9.3,0 5,4.3 0.7,0 Z')
|
23
terminus-core/src/components/windowControls.component.scss
Normal file
@@ -0,0 +1,23 @@
|
||||
:host {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
button {
|
||||
flex: none;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
border-radius: 0;
|
||||
font-size: 8px;
|
||||
width: 40px;
|
||||
padding: 0;
|
||||
line-height: 0;
|
||||
text-align: center;
|
||||
|
||||
&:not(:hover):not(:active) {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
11
terminus-core/src/components/windowControls.component.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Component } from '@angular/core'
|
||||
import { HostAppService } from '../services/hostApp.service'
|
||||
|
||||
@Component({
|
||||
selector: 'window-controls',
|
||||
template: require('./windowControls.component.pug'),
|
||||
styles: [require('./windowControls.component.scss')],
|
||||
})
|
||||
export class WindowControlsComponent {
|
||||
constructor (public hostApp: HostAppService) { }
|
||||
}
|
@@ -1,7 +1,6 @@
|
||||
import { ConfigProvider } from './api/configProvider'
|
||||
import { Platform } from './services/hostApp.service'
|
||||
|
||||
|
||||
export class CoreConfigProvider extends ConfigProvider {
|
||||
platformDefaults = {
|
||||
[Platform.macOS]: require('./configDefaults.macos.yaml'),
|
||||
|
@@ -1,7 +1,8 @@
|
||||
appearance:
|
||||
dock: 'off'
|
||||
dockScreen: 'current'
|
||||
dock: off
|
||||
dockScreen: current
|
||||
dockFill: 50
|
||||
tabsOnTop: true
|
||||
theme: 'Standard'
|
||||
frame: 'thin'
|
||||
tabsLocation: top
|
||||
theme: Standard
|
||||
frame: thin
|
||||
css: '/* * { color: blue !important; } */'
|
||||
|
@@ -2,7 +2,6 @@ import { NgModule, ModuleWithProviders } from '@angular/core'
|
||||
import { BrowserModule } from '@angular/platform-browser'
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
|
||||
import { FormsModule } from '@angular/forms'
|
||||
import { ToasterModule } from 'angular2-toaster'
|
||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap'
|
||||
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar'
|
||||
|
||||
@@ -12,8 +11,6 @@ import { ElectronService } from './services/electron.service'
|
||||
import { HostAppService } from './services/hostApp.service'
|
||||
import { LogService } from './services/log.service'
|
||||
import { HotkeysService, AppHotkeyProvider } from './services/hotkeys.service'
|
||||
import { NotifyService } from './services/notify.service'
|
||||
import { PluginsService } from './services/plugins.service'
|
||||
import { QuitterService } from './services/quitter.service'
|
||||
import { DockingService } from './services/docking.service'
|
||||
import { TabRecoveryService } from './services/tabRecovery.service'
|
||||
@@ -24,6 +21,7 @@ import { TabBodyComponent } from './components/tabBody.component'
|
||||
import { StartPageComponent } from './components/startPage.component'
|
||||
import { TabHeaderComponent } from './components/tabHeader.component'
|
||||
import { TitleBarComponent } from './components/titleBar.component'
|
||||
import { WindowControlsComponent } from './components/windowControls.component'
|
||||
|
||||
import { HotkeyProvider } from './api/hotkeyProvider'
|
||||
import { ConfigProvider } from './api/configProvider'
|
||||
@@ -42,8 +40,6 @@ const PROVIDERS = [
|
||||
HostAppService,
|
||||
HotkeysService,
|
||||
LogService,
|
||||
NotifyService,
|
||||
PluginsService,
|
||||
TabRecoveryService,
|
||||
ThemesService,
|
||||
QuitterService,
|
||||
@@ -52,13 +48,11 @@ const PROVIDERS = [
|
||||
{ provide: ConfigProvider, useClass: CoreConfigProvider, multi: true },
|
||||
]
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
BrowserModule,
|
||||
BrowserAnimationsModule,
|
||||
FormsModule,
|
||||
ToasterModule,
|
||||
NgbModule,
|
||||
PerfectScrollbarModule.forRoot({
|
||||
suppressScrollX: true,
|
||||
@@ -70,10 +64,11 @@ const PROVIDERS = [
|
||||
TabBodyComponent,
|
||||
TabHeaderComponent,
|
||||
TitleBarComponent,
|
||||
WindowControlsComponent,
|
||||
],
|
||||
})
|
||||
export default class AppModule {
|
||||
static forRoot(): ModuleWithProviders {
|
||||
static forRoot (): ModuleWithProviders {
|
||||
return {
|
||||
ngModule: AppModule,
|
||||
providers: PROVIDERS,
|
||||
|
@@ -6,7 +6,6 @@ import { Logger, LogService } from '../services/log.service'
|
||||
|
||||
export declare type TabComponentType = new (...args: any[]) => BaseTabComponent
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class AppService {
|
||||
tabs: BaseTabComponent[] = []
|
||||
@@ -44,7 +43,7 @@ export class AppService {
|
||||
}
|
||||
|
||||
selectTab (tab: BaseTabComponent) {
|
||||
if (this.activeTab == tab) {
|
||||
if (this.activeTab === tab) {
|
||||
return
|
||||
}
|
||||
if (this.tabs.includes(this.activeTab)) {
|
||||
@@ -85,12 +84,9 @@ export class AppService {
|
||||
|
||||
closeTab (tab: BaseTabComponent) {
|
||||
tab.destroy()
|
||||
/* if (tab.session) {
|
||||
this.sessions.destroySession(tab.session)
|
||||
} */
|
||||
let newIndex = Math.max(0, this.tabs.indexOf(tab) - 1)
|
||||
this.tabs = this.tabs.filter((x) => x != tab)
|
||||
if (tab == this.activeTab) {
|
||||
this.tabs = this.tabs.filter((x) => x !== tab)
|
||||
if (tab === this.activeTab) {
|
||||
this.selectTab(this.tabs[newIndex])
|
||||
}
|
||||
this.tabsChanged$.next()
|
||||
|
@@ -1,11 +1,13 @@
|
||||
import { Subject } from 'rxjs'
|
||||
import * as yaml from 'js-yaml'
|
||||
import * as path from 'path'
|
||||
import * as fs from 'fs'
|
||||
import { EventEmitter, Injectable, Inject } from '@angular/core'
|
||||
import { Injectable, Inject } from '@angular/core'
|
||||
import { ConfigProvider } from '../api/configProvider'
|
||||
import { ElectronService } from './electron.service'
|
||||
import { HostAppService } from './hostApp.service'
|
||||
|
||||
const configMerge = (a, b) => require('deepmerge')(a, b, { arrayMerge: (_d, s) => s })
|
||||
|
||||
export class ConfigProxy {
|
||||
constructor (real: any, defaults: any) {
|
||||
@@ -47,14 +49,10 @@ export class ConfigProxy {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const configMerge = (a, b) => require('deepmerge')(a, b, { arrayMerge: (_d, s) => s })
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class ConfigService {
|
||||
store: any
|
||||
change = new EventEmitter()
|
||||
changed$ = new Subject<void>()
|
||||
restartRequested: boolean
|
||||
private _store: any
|
||||
private path: string
|
||||
@@ -94,7 +92,7 @@ export class ConfigService {
|
||||
}
|
||||
|
||||
emitChange (): void {
|
||||
this.change.emit()
|
||||
this.changed$.next()
|
||||
}
|
||||
|
||||
requestRestart (): void {
|
||||
|
@@ -1,8 +1,7 @@
|
||||
import { Injectable } from '@angular/core'
|
||||
import { ConfigService } from '../services/config.service'
|
||||
import { ElectronService } from '../services/electron.service'
|
||||
import { HostAppService } from '../services/hostApp.service'
|
||||
|
||||
import { HostAppService, Bounds } from '../services/hostApp.service'
|
||||
|
||||
export interface IScreen {
|
||||
id: string
|
||||
@@ -11,7 +10,7 @@ export interface IScreen {
|
||||
|
||||
@Injectable()
|
||||
export class DockingService {
|
||||
constructor(
|
||||
constructor (
|
||||
private electron: ElectronService,
|
||||
private config: ConfigService,
|
||||
private hostApp: HostAppService,
|
||||
@@ -19,40 +18,39 @@ export class DockingService {
|
||||
|
||||
dock () {
|
||||
let display = this.electron.screen.getAllDisplays()
|
||||
.filter((x) => x.id == this.config.store.appearance.dockScreen)[0]
|
||||
.filter((x) => x.id === this.config.store.appearance.dockScreen)[0]
|
||||
if (!display) {
|
||||
display = this.getCurrentScreen()
|
||||
}
|
||||
|
||||
let dockSide = this.config.store.appearance.dock
|
||||
let newBounds: Electron.Rectangle = { x: 0, y: 0, width: 0, height: 0 }
|
||||
let newBounds: Bounds = { x: 0, y: 0, width: 0, height: 0 }
|
||||
let fill = this.config.store.appearance.dockFill
|
||||
|
||||
if (dockSide == 'off') {
|
||||
if (dockSide === 'off') {
|
||||
this.hostApp.setAlwaysOnTop(false)
|
||||
return
|
||||
}
|
||||
if (dockSide == 'left' || dockSide == 'right') {
|
||||
if (dockSide === 'left' || dockSide === 'right') {
|
||||
newBounds.width = Math.round(fill * display.bounds.width)
|
||||
newBounds.height = display.bounds.height
|
||||
}
|
||||
if (dockSide == 'top' || dockSide == 'bottom') {
|
||||
if (dockSide === 'top' || dockSide === 'bottom') {
|
||||
newBounds.width = display.bounds.width
|
||||
newBounds.height = Math.round(fill * display.bounds.height)
|
||||
}
|
||||
if (dockSide == 'right') {
|
||||
if (dockSide === 'right') {
|
||||
newBounds.x = display.bounds.x + display.bounds.width * (1.0 - fill)
|
||||
} else {
|
||||
newBounds.x = display.bounds.x
|
||||
}
|
||||
if (dockSide == 'bottom') {
|
||||
if (dockSide === 'bottom') {
|
||||
newBounds.y = display.bounds.y + display.bounds.height * (1.0 - fill)
|
||||
} else {
|
||||
newBounds.y = display.bounds.y
|
||||
}
|
||||
|
||||
this.hostApp.setAlwaysOnTop(true)
|
||||
//this.hostApp.unmaximize()
|
||||
setImmediate(() => {
|
||||
this.hostApp.setBounds(newBounds)
|
||||
})
|
||||
|
@@ -2,34 +2,6 @@ import { Injectable } from '@angular/core'
|
||||
|
||||
@Injectable()
|
||||
export class ElectronService {
|
||||
constructor() {
|
||||
if (process.env.TEST_ENV) {
|
||||
this.initTest()
|
||||
} else {
|
||||
this.init()
|
||||
}
|
||||
}
|
||||
|
||||
init() {
|
||||
this.electron = require('electron')
|
||||
this.remoteElectron = this.remoteRequire('electron')
|
||||
this.app = this.remoteElectron.app
|
||||
this.screen = this.remoteElectron.screen
|
||||
this.dialog = this.remoteElectron.dialog
|
||||
this.shell = this.electron.shell
|
||||
this.clipboard = this.electron.clipboard
|
||||
this.ipcRenderer = this.electron.ipcRenderer
|
||||
this.globalShortcut = this.remoteElectron.globalShortcut
|
||||
}
|
||||
|
||||
initTest() {
|
||||
;
|
||||
}
|
||||
|
||||
remoteRequire(name: string): any {
|
||||
return this.electron.remote.require(name)
|
||||
}
|
||||
|
||||
app: any
|
||||
ipcRenderer: any
|
||||
shell: any
|
||||
@@ -39,4 +11,20 @@ export class ElectronService {
|
||||
screen: any
|
||||
private electron: any
|
||||
private remoteElectron: any
|
||||
|
||||
constructor () {
|
||||
this.electron = require('electron')
|
||||
this.remoteElectron = this.remoteRequire('electron')
|
||||
this.app = this.electron.remote.app
|
||||
this.screen = this.electron.remote.screen
|
||||
this.dialog = this.electron.remote.dialog
|
||||
this.shell = this.electron.shell
|
||||
this.clipboard = this.electron.clipboard
|
||||
this.ipcRenderer = this.electron.ipcRenderer
|
||||
this.globalShortcut = this.electron.remote.globalShortcut
|
||||
}
|
||||
|
||||
remoteRequire (name: string): any {
|
||||
return this.electron.remote.require(name)
|
||||
}
|
||||
}
|
||||
|