Compare commits

..

26 Commits

Author SHA1 Message Date
Eugene Pankov
0e9282e079 docs 2017-07-01 14:13:07 +02:00
Eugene Pankov
5511f4d7cb docs fix 2017-07-01 14:03:14 +02:00
Eugene Pankov
3ae76e66ed Merge branch 'master' of github.com:Eugeny/terminus 2017-07-01 12:48:48 +02:00
Eugene Pankov
42059e3bc6 Create CODE_OF_CONDUCT.md 2017-07-01 10:54:04 +02:00
Eugene Pankov
c093b204d7 override plugin module resolution 2017-07-01 01:22:01 +02:00
Eugene Pankov
8a8f89b386 wip 2017-07-01 00:55:21 +02:00
Eugene Pankov
b109fb8766 plugin versions 2017-07-01 00:54:55 +02:00
Eugene Pankov
f58cf469ed Linux default shell fix 2017-06-30 21:20:03 +02:00
Eugene Pankov
57227ae6ce Merge branch 'master' of github.com:Eugeny/terminus 2017-06-30 21:08:19 +02:00
Eugene Pankov
b670fa843a don't force electron-debug 2017-06-30 21:08:12 +02:00
Eugene Pankov
c41e551c58 README update 2017-06-30 20:59:23 +02:00
Eugene Pankov
60b02b17e4 Start shell as login shell (fixes #2) 2017-06-30 20:52:22 +02:00
Eugene Pankov
bf8bb7ee80 use user's default shell (#2) 2017-06-30 20:44:17 +02:00
Eugene Pankov
1e1d48a5f8 rollback 2017-06-30 20:01:41 +02:00
Eugene Pankov
77b55a003c Git-bash support (fixes #12) 2017-06-30 19:54:17 +02:00
Eugene Pankov
165ab1cfbf version mgmt 2017-06-30 19:40:18 +02:00
Eugene Pankov
d4840bafaf Some docking fixes (fixed #13) 2017-06-30 19:39:01 +02:00
Eugene Pankov
9badd88c80 force GNU screen dependency on Linux (fixes #1) 2017-06-30 10:44:43 +02:00
Eugene Pankov
7a24c9aa3a don't auto enable devtools 2017-06-29 14:26:39 +02:00
Eugene Pankov
8a7e7c4eb5 fixes 2017-06-28 16:55:09 +02:00
Eugene Pankov
d0c10278fb build fixes 2017-06-27 23:35:19 +02:00
Eugene Pankov
2ae004db53 alpha 2017-06-27 23:19:18 +02:00
Eugene Pankov
7b34b668c1 readme 2017-06-27 23:13:05 +02:00
Eugene Pankov
7c09fc4a38 docs 2017-06-27 23:12:23 +02:00
Eugene Pankov
89ff9d0ea2 . 2017-06-26 22:01:08 +02:00
Eugene Pankov
b4e503b26c . 2017-06-26 21:54:36 +02:00
32 changed files with 431 additions and 118 deletions

46
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at e@ajenti.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

View File

@@ -67,7 +67,11 @@ terminus-pluginname
# 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`).
The app will load all plugins from the source checkout in the dev mode, from the user's plugins directory at all times (click `Open Plugins Directory` under `Settings` > `Plugins`) and from the directory specified by the `TERMINUS_PLUGINS` environment var.
Only modules whose `package.json` file contains a `terminus-plugin` keyword will be loaded.
If you're currently in your plugin's directory, start Terminus as `TERMINUS_PLUGINS=$(pwd) terminus --debug`
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.

View File

@@ -1,2 +1,37 @@
[![Build Status](https://travis-ci.org/Eugeny/terminus.svg?branch=master)](https://travis-ci.org/Eugeny/terminus)
[![Build status](https://ci.appveyor.com/api/projects/status/wnnq4hm5mbd9rgoy?svg=true)](https://ci.appveyor.com/project/Eugeny/terminus)
# Terminus α
*A terminal for a more modern age*
[![Build Status](https://travis-ci.org/Eugeny/terminus.svg?branch=master)](https://travis-ci.org/Eugeny/terminus) [![Build status](https://ci.appveyor.com/api/projects/status/wnnq4hm5mbd9rgoy?svg=true)](https://ci.appveyor.com/project/Eugeny/terminus) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/Eugeny/terminus/master/LICENSE) [![Downloads](https://img.shields.io/badge/downloads-latest_release-brightgreen.svg)](https://github.com/Eugeny/terminus/releases/latest)
----
![](https://github.com/Eugeny/terminus/raw/master/docs/linux.png)
**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, Cygwin, Git-Bash and Bash on Windows support
---
# Plugins
Plugins can be installed directly from the Settings view inside Terminus.
* [clickable-links](https://github.com/Eugeny/terminus-clickable-links) - makes paths and URLs in the terminal clickable
* [theme-hype](https://github.com/Eugeny/terminus-theme-hype) - a Hyper inspired theme
---
# 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 brief plugin development tutorial!

View File

@@ -1,7 +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
@@ -20,7 +22,6 @@ const yaml = require('js-yaml')
const path = require('path')
const fs = require('fs')
const Config = require('electron-config')
require('electron-debug')({enabled: true, showDevTools: process.argv.indexOf('--debug') != -1})
let windowConfig = new Config({name: 'window'})
@@ -146,7 +147,7 @@ start = () => {
let options = {
width: 800,
height: 400,
height: 600,
//icon: `${app.getAppPath()}/assets/img/icon.png`,
title: 'Terminus',
minWidth: 400,

View File

@@ -25,10 +25,13 @@
"electron-debug": "^1.0.1",
"electron-is-dev": "0.1.2",
"electron-squirrel-startup": "^1.0.0",
"fs-promise": "^2.0.2",
"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"
}
}

View File

@@ -1,4 +1,4 @@
import 'zone.js/dist/zone.js'
import 'zone.js'
import 'core-js/es7/reflect'
import 'core-js/core/delay'
import 'rxjs'

View File

@@ -1,4 +1,4 @@
import * as fs from 'fs-promise'
import * as fs from 'mz/fs'
import * as path from 'path'
const nodeModule = require('module')
const nodeRequire = (global as any).require
@@ -20,11 +20,7 @@ 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 builtinPluginsPath = path.join((process as any).resourcesPath, 'builtin-plugins')
const userPluginsPath = path.join(
require('electron').remote.app.getPath('appData'),
@@ -35,9 +31,9 @@ const userPluginsPath = path.join(
Object.assign(window, { builtinPluginsPath, userPluginsPath })
nodeModule.globalPaths.unshift(builtinPluginsPath)
nodeModule.globalPaths.unshift(path.join(userPluginsPath, 'node_modules'))
// nodeModule.globalPaths.unshift(path.join((process as any).resourcesPath, 'app.asar', 'node_modules'))
if (process.env.TERMINUS_PLUGINS) {
process.env.TERMINUS_PLUGINS.split(':').map(x => nodeModule.globalPaths.unshift(normalizePath(x)))
process.env.TERMINUS_PLUGINS.split(':').map(x => nodeModule.globalPaths.push(normalizePath(x)))
}
export declare type ProgressCallback = (current, total) => void
@@ -53,9 +49,39 @@ export interface IPluginInfo {
info?: any
}
const builtinModules = [
'@angular/animations',
'@angular/common',
'@angular/compiler',
'@angular/core',
'@angular/forms',
'@angular/platform-browser',
'@angular/platform-browser-dynamic',
'@ng-bootstrap/ng-bootstrap',
'rxjs',
'terminus-core',
'terminus-settings',
'terminus-terminal',
'zone.js/dist/zone.js',
]
const cachedBuiltinModules = {}
builtinModules.forEach(m => {
cachedBuiltinModules[m] = nodeRequire(m)
})
const originalRequire = nodeRequire('module').prototype.require
nodeRequire('module').prototype.require = function (query) {
if (cachedBuiltinModules[query]) {
return cachedBuiltinModules[query]
}
return originalRequire.apply(this, arguments)
}
export async function findPlugins (): Promise<IPluginInfo[]> {
let paths = nodeModule.globalPaths
let foundPlugins: IPluginInfo[] = []
let candidateLocations: { pluginDir: string, pluginName: string }[] = []
for (let pluginDir of paths) {
pluginDir = normalizePath(pluginDir)
@@ -63,32 +89,44 @@ export async function findPlugins (): Promise<IPluginInfo[]> {
continue
}
let pluginNames = await fs.readdir(pluginDir)
for (let pluginName of pluginNames.filter(x => /^terminus-/.exec(x))) {
let pluginPath = path.join(pluginDir, pluginName)
let infoPath = path.join(pluginPath, 'package.json')
if (!await fs.exists(infoPath)) {
if (await fs.exists(path.join(pluginDir, 'package.json'))) {
candidateLocations.push({
pluginDir: path.dirname(pluginDir),
pluginName: path.basename(pluginDir)
})
}
for (let pluginName of pluginNames) {
candidateLocations.push({ pluginDir, pluginName })
}
}
for (let { pluginDir, pluginName } of candidateLocations) {
let pluginPath = path.join(pluginDir, pluginName)
let infoPath = path.join(pluginPath, 'package.json')
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'}))
if (!info.keywords || info.keywords.indexOf('terminus-plugin') === -1) {
continue
}
if (foundPlugins.some(x => x.name === pluginName)) {
console.info(`Plugin ${pluginName} already exists`)
}
try {
let info = await fs.readJson(infoPath)
console.log(pluginDir, builtinPluginsPath)
foundPlugins.push({
name: pluginName.substring('terminus-'.length),
packageName: pluginName,
isBuiltin: pluginDir === builtinPluginsPath,
version: info.version,
description: info.description,
path: pluginPath,
info,
})
} catch (error) {
console.error('Cannot load package info for', pluginName)
}
foundPlugins.push({
name: pluginName.substring('terminus-'.length),
packageName: pluginName,
isBuiltin: pluginDir === builtinPluginsPath,
version: info.version,
description: info.description,
path: pluginPath,
info,
})
} catch (error) {
console.error('Cannot load package info for', pluginName)
}
}

View File

@@ -55,13 +55,13 @@ 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',
'zone.js': 'commonjs zone.js/dist/zone.js',
},
plugins: [
new webpack.optimize.ModuleConcatenationPlugin(),

View File

@@ -1,22 +1,53 @@
<!DOCTYPE html><html><head><link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet"><link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"><link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400" rel="stylesheet"><style>body {
<!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, h3, h5 {
h1, h2, h3, h5 {
font-weight: 300;
color: white;
}
.btn i + span {
.btn i + span,
.nav-link i + span {
margin-left: 10px;
}
.btn-outline-primary {
color: #b6e7ff !important;
}</style></head><body><div class="container mt-5 mb-3"><div class="text-center"><h1>Terminus</h1><h5>A terminal for a more modern age</h5><div class="btn-group mt-3 mb-3"><a class="btn btn-outline-primary"><i class="fa fa-windows"></i><span>Windows</span></a><a class="btn btn-outline-primary"><i class="fa fa-apple"></i><span>macOS</span></a><a class="btn btn-outline-primary"><i class="fa fa-archive"></i><span>DEB</span></a><a class="btn btn-outline-primary"><i class="fa fa-archive"></i><span>RPM</span></a><a class="btn btn-outline-primary"><i class="fa fa-archive"></i><span>TGZ</span></a></div></div><div class="row mt-5"><div class="col-6"><h3>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 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><div class="row mt-5"><div class="col-6"><h3>Customizable</h3><p>Multiple app themes and a myriad of community color schemes for the terminal. Color scheme editor included.</p></div><div class="col-6"><h3>Infinitely extensible</h3><p>Install plugins from the NPM repository, or create your own with Typescript and Angular framework.</p></div></div></div></body></html>
}
.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>

View File

@@ -1,71 +1,136 @@
doctype html
html
head
link(href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css", rel="stylesheet")
link(href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css", rel="stylesheet")
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, h3, h5 {
h1, h2, h3, h5 {
font-weight: 300;
color: white;
}
.btn i + span {
.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-3
.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
.btn-group.mt-3.mb-3
a.btn.btn-outline-primary
i.fa.fa-windows
span Windows
a.btn.btn-outline-primary
i.fa.fa-apple
span macOS
.text-center
.mt-3.mb-3
h2
a.btn.btn-outline-primary
i.fa.fa-archive
span DEB
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
a.btn.btn-outline-primary
i.fa.fa-archive
span RPM
a.btn.btn-outline-primary
i.fa.fa-archive
span TGZ
.row.mt-5
.col-6
h3 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
.col-6
h3 User experience
ul
@@ -76,13 +141,20 @@ html
li Click paths and URLs to open in browser/file manager
li Keeps the current directory in new tabs
.row.mt-5
.col-6
h3 Customizable
p Multiple app themes and a myriad of community color schemes for the terminal. Color scheme editor included.
.col-6
h3 Infinitely extensible
p Install plugins from the NPM repository, or create your own with Typescript and Angular framework.
.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

BIN
docs/videos/windows.mp4 Normal file

Binary file not shown.

View File

@@ -21,7 +21,7 @@
"less-loader": "2.2.3",
"node-abi": "2.0.3",
"node-gyp": "3.4.0",
"node-sass": "4.5.3",
"node-sass": "^4.5.3",
"npmlog": "4.1.0",
"pug": "2.0.0-beta11",
"pug-html-loader": "1.0.9",
@@ -65,6 +65,12 @@
"linux": {
"category": "Utilities",
"icon": "./build/icons"
},
"deb": {
"depends": ["screen", "gconf2", "gconf-service", "libnotify4", "libappindicator1", "libxtst6", "libnss3"]
},
"rpm": {
"depends": ["screen"]
}
},
"scripts": {
@@ -74,5 +80,5 @@
"lint": "tslint -c tslint.json -t stylish terminus-*/src/**/*.ts terminus-*/src/*.ts app/src/*.ts",
"postinstall": "install-app-deps"
},
"false": {}
"repository": "eugeny/terminus"
}

View File

@@ -22,3 +22,4 @@ vars.builtinPlugins.forEach(plugin => {
}
sh.cd('..')
})
fs.unlinkSync(path.join(target, 'package.json'), '{}')

11
scripts/set-plugin-versions.js Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env node
const sh = require('shelljs')
const vars = require('./vars')
const log = require('npmlog')
vars.builtinPlugins.forEach(plugin => {
log.info('bump', plugin)
sh.cd(plugin)
sh.exec('npm --no-git-tag-version version ' + vars.version)
sh.cd('..')
})

View File

@@ -1,9 +1,13 @@
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',
@@ -12,5 +16,4 @@ exports.builtinPlugins = [
'terminus-plugin-manager',
]
exports.nativeModules = ['node-pty', 'font-manager']
exports.version = appInfo.version
exports.electronVersion = pkgInfo.devDependencies.electron

View File

@@ -1,7 +1,8 @@
{
"name": "terminus-community-color-schemes",
"version": "0.0.1",
"version": "1.0.0-alpha.14",
"description": "Community color schemes for Terminus",
"keywords": ["terminus-plugin"],
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"scripts": {

View File

@@ -1,7 +1,8 @@
{
"name": "terminus-core",
"version": "0.0.1",
"version": "1.0.0-alpha.14",
"description": "Terminus core",
"keywords": ["terminus-plugin"],
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"scripts": {

View File

@@ -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()',

View File

@@ -40,12 +40,12 @@ export class DockingService {
newBounds.height = Math.round(fill * display.bounds.height)
}
if (dockSide === 'right') {
newBounds.x = display.bounds.x + display.bounds.width * (1.0 - fill)
newBounds.x = display.bounds.x + Math.round(display.bounds.width * (1.0 - fill))
} else {
newBounds.x = display.bounds.x
}
if (dockSide === 'bottom') {
newBounds.y = display.bounds.y + display.bounds.height * (1.0 - fill)
newBounds.y = display.bounds.y + Math.round(display.bounds.height * (1.0 - fill))
} else {
newBounds.y = display.bounds.y
}

View File

@@ -1,7 +1,8 @@
{
"name": "terminus-plugin-manager",
"version": "0.0.1",
"version": "1.0.0-alpha.14",
"description": "Terminus' plugin manager",
"keywords": ["terminus-plugin"],
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"scripts": {

View File

@@ -1,7 +1,8 @@
{
"name": "terminus-settings",
"version": "0.0.1",
"version": "1.0.0-alpha.14",
"description": "Terminus terminal settings page",
"keywords": ["terminus-plugin"],
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"scripts": {

View File

@@ -109,17 +109,17 @@ ngb-tabset.vertical(type='tabs')
label Display on
br
div(
'[(ngModel)]'='config.store.appearance.dockScreen'
'(ngModelChange)'='config.save(); docking.dock()'
[(ngModel)]='config.store.appearance.dockScreen',
(ngModelChange)='config.save(); docking.dock()',
ngbRadioGroup
)
label.btn.btn-secondary
input(
type='radio',
[value]='"current"'
value='current'
)
| Current
label.btn.btn-secondary(*ngFor='let screen of docking.getScreens()')
label.btn.btn-secondary(*ngFor='let screen of screens')
input(
type='radio',
[value]='screen.id'

View File

@@ -14,6 +14,7 @@ import { SettingsTabProvider } from '../api'
export class SettingsTabComponent extends BaseTabComponent {
hotkeyFilter = ''
private hotkeyDescriptions: IHotkeyDescription[]
private screens
constructor (
public config: ConfigService,
@@ -28,6 +29,7 @@ export class SettingsTabComponent extends BaseTabComponent {
this.hotkeyDescriptions = hotkeyProviders.map(x => x.hotkeys).reduce((a, b) => a.concat(b))
this.title$.next('Settings')
this.scrollable = true
this.screens = this.docking.getScreens()
}
getRecoveryToken (): any {

View File

@@ -1,7 +1,8 @@
{
"name": "terminus-terminal",
"version": "0.0.1",
"version": "1.0.0-alpha.14",
"description": "Terminus' terminal emulation core",
"keywords": ["terminus-plugin"],
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"scripts": {

View File

@@ -1,6 +1,8 @@
import * as path from 'path'
import { exec } from 'mz/child_process'
import * as fs from 'mz/fs'
import { Injectable } from '@angular/core'
import { HotkeysService, ToolbarButtonProvider, IToolbarButton, AppService, ConfigService, ElectronService } from 'terminus-core'
import { HotkeysService, ToolbarButtonProvider, IToolbarButton, AppService, ConfigService, ElectronService, HostAppService, Platform } from 'terminus-core'
import { SessionsService } from './services/sessions.service'
import { TerminalTabComponent } from './components/terminalTab.component'
@@ -12,6 +14,7 @@ export class ButtonProvider extends ToolbarButtonProvider {
private sessions: SessionsService,
private config: ConfigService,
private electron: ElectronService,
private hostApp: HostAppService,
hotkeys: HotkeysService,
) {
super()
@@ -43,6 +46,22 @@ export class ButtonProvider extends ToolbarButtonProvider {
'inject',
]
}
if (command === '~default-shell~') {
if (this.hostApp.platform === Platform.Linux) {
let line = (await fs.readFile('/etc/passwd', { encoding: 'utf-8' }))
.split('\n').find(x => x.startsWith(process.env.LOGNAME + ':'))
if (!line) {
console.warn('Could not detect user shell')
command = '/bin/sh'
} else {
command = line.split(':')[6]
}
}
if (this.hostApp.platform === Platform.macOS) {
let shellEntry = (await exec(`dscl . -read /Users/${process.env.LOGNAME} UserShell`))[0].toString()
command = shellEntry.split(':')[1].trim()
}
}
let sessionOptions = await this.sessions.prepareNewSession({ command, args, cwd })
this.app.openNewTab(
TerminalTabComponent,

View File

@@ -6,7 +6,7 @@ import { TerminalColorSchemeProvider, ITerminalColorScheme } from './api'
@Injectable()
export class HyperColorSchemes extends TerminalColorSchemeProvider {
async getSchemes (): Promise<ITerminalColorScheme[]> {
let pluginsPath = path.join(process.env.HOME, '.hyper_plugins', 'node_modules')
let pluginsPath = path.join(process.env.HOME || (process.env.HOMEDRIVE + process.env.HOMEPATH), '.hyper_plugins', 'node_modules')
if (!(await fs.exists(pluginsPath))) return []
let plugins = await fs.readdir(pluginsPath)

View File

@@ -1,5 +1,5 @@
import { Observable } from 'rxjs'
import * as fs from 'fs-promise'
import * as fs from 'mz/fs'
import * as path from 'path'
import { exec } from 'mz/child_process'
const equal = require('deep-equal')
@@ -59,16 +59,20 @@ export class TerminalSettingsTabComponent {
{ name: 'CMD (stock)', command: 'cmd.exe' },
{ name: 'PowerShell', command: 'powershell.exe' },
]
// Detect whether BoW is installed
const wslPath = `${process.env.windir}\\system32\\bash.exe`
if (await fs.exists(wslPath)) {
this.shells.push({ name: 'Bash on Windows', command: wslPath })
}
// Detect Cygwin
let cygwinPath = await new Promise<string>(resolve => {
let reg = new Registry({ hive: Registry.HKLM, key: '\\Software\\Cygwin\\setup' })
reg.get('rootdir', (err, item) => {
if (err) {
resolve(null)
return
}
resolve(item.value)
})
@@ -76,13 +80,29 @@ export class TerminalSettingsTabComponent {
if (cygwinPath) {
this.shells.push({ name: 'Cygwin', command: path.join(cygwinPath, 'bin', 'bash.exe') })
}
// Detect Git-Bash
let gitBashPath = await new Promise<string>(resolve => {
let reg = new Registry({ hive: Registry.HKLM, key: '\\Software\\GitForWindows' })
reg.get('InstallPath', (err, item) => {
if (err) {
resolve(null)
return
}
resolve(item.value)
})
})
if (gitBashPath) {
this.shells.push({ name: 'Git-Bash', command: path.join(gitBashPath, 'bin', 'bash.exe') })
}
}
if (this.hostApp.platform === Platform.Linux || this.hostApp.platform === Platform.macOS) {
this.shells = (await fs.readFile('/etc/shells', 'utf-8'))
this.shells = [{ name: 'Default shell', command: '~default-shell~' }]
this.shells = this.shells.concat((await fs.readFile('/etc/shells', { encoding: 'utf-8' }))
.split('\n')
.map(x => x.trim())
.filter(x => x && !x.startsWith('#'))
.map(x => ({ name: x, command: x }))
.map(x => ({ name: x, command: x })))
}
this.colorSchemes = (await Promise.all(this.colorSchemeProviders.map(x => x.getSchemes()))).reduce((a, b) => a.concat(b))
}

View File

@@ -9,10 +9,28 @@ export class TerminalConfigProvider extends ConfigProvider {
background: 'theme',
colorScheme: {
__nonStructural: true,
foreground: null,
background: null,
cursor: null,
colors: [],
name: 'Material',
foreground: '#eceff1',
background: 'rgba(38, 50, 56, 1)',
cursor: '#FFCC00',
colors: [
'#000000',
'#D62341',
'#9ECE58',
'#FAED70',
'#396FE2',
'#BB80B3',
'#2DDAFD',
'#d0d0d0',
'rgba(255, 255, 255, 0.2)',
'#FF5370',
'#C3E88D',
'#FFCB6B',
'#82AAFF',
'#C792EA',
'#89DDFF',
'#ffffff',
]
},
customColorSchemes: []
},
@@ -22,7 +40,7 @@ export class TerminalConfigProvider extends ConfigProvider {
[Platform.macOS]: {
terminal: {
font: 'Menlo',
shell: '/bin/zsh',
shell: '~default-shell~',
},
hotkeys: {
'new-tab': [
@@ -49,7 +67,7 @@ export class TerminalConfigProvider extends ConfigProvider {
[Platform.Linux]: {
terminal: {
font: 'Liberation Mono',
shell: '/bin/bash',
shell: '~default-shell~',
},
hotkeys: {
'new-tab': [

View File

@@ -12,4 +12,5 @@ a:hover {
x-screen {
transition: 0.125s ease background;
padding-right: 15px;
}

View File

@@ -100,7 +100,7 @@ export class ScreenPersistenceProvider extends SessionPersistenceProvider {
altscreen on
`, 'utf-8')
let recoveryId = `term-tab-${Date.now()}`
let args = ['-d', '-m', '-c', configPath, '-U', '-S', recoveryId, '-T', 'xterm-256color', '--', options.command].concat(options.args || [])
let args = ['-d', '-m', '-c', configPath, '-U', '-S', recoveryId, '-T', 'xterm-256color', '--', '-' + options.command].concat(options.args || [])
this.logger.debug('Spawning screen with', args.join(' '))
await spawn('screen', args, {
cwd: options.cwd,

View File

@@ -28,10 +28,6 @@ export class Session {
...options.env,
TERM: 'xterm-256color',
}
if (options.command.includes(' ')) {
options.args = ['-c', options.command]
options.command = 'sh'
}
this.pty = nodePTY.spawn(options.command, options.args || [], {
name: 'xterm-256color',
cols: options.width || 80,