Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Commit

Permalink
chore(release): bterm2
Browse files Browse the repository at this point in the history
  • Loading branch information
jkuri committed May 2, 2018
1 parent 7493ada commit c610c86
Show file tree
Hide file tree
Showing 105 changed files with 1,959 additions and 19,280 deletions.
7 changes: 1 addition & 6 deletions .abstruse.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
image: abstruse

matrix:
- env: SCRIPT=lint NODE_VERSION=8
- env: SCRIPT=test:e2e NODE_VERSION=8
- env: SCRIPT=test NODE_VERSION=9

before_install:
- nvm install $NODE_VERSION
Expand All @@ -11,10 +10,6 @@ before_install:

install:
- npm install
- npm run linux-deps

before_script:
- npm run build:prod

script:
- if [[ "$SCRIPT" ]]; then npm run-script $SCRIPT; fi
Expand Down
60 changes: 60 additions & 0 deletions .angular-cli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "angular-electron",
"ejected": true
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles/app.sass"
],
"scripts": [
],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"project": "src/tsconfig.app.json"
},
{
"project": "src/tsconfig.spec.json"
},
{
"project": "e2e/tsconfig.e2e.json"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "sass",
"component": {
}
}
}
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
52 changes: 43 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,45 @@
node_modules/
dist/
.DS_Store
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc
/app-builds
/e2e/out

# dependencies
/node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
build/
lib/
src/ngfactory
.vscode
e2e/out/
.idea
testem.log
/typings
package-lock.json

# e2e
/e2e/*.js
/e2e/*.map

# System Files
.DS_Store
Thumbs.db
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2017 Bleenco GmbH http://bleenco.com
Copyright (c) 2018 Bleenco GmbH https://bleenco.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -19,4 +19,3 @@ 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.

31 changes: 7 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,12 @@ Fully customisable cross-platform terminal that works and feels the same way eve
To download visit
[http://bterm.bleenco.io](http://bterm.bleenco.io) and hit the right button to get your favourite OS installer.

On the first run `~/.bterm.json` (on Linux and MacOS) or `C:\Users\user\.bterm.json` (on Windows) configuration file is created. It contains the attributes in json format that define the layout of the terminal, i.e. changing the attribute `settings > fonts` will immediately update the type of fonts.
On the first run `~/.bterm2.json` (on Linux and MacOS) or `C:\Users\user\.bterm.json` (on Windows) configuration file is created. It contains the attributes in json format that define the layout of the terminal, i.e. changing the attribute `settings > fonts` will immediately update the type of fonts.

## Settings and customization
The default theme is a combination of black and white visuals. However, **bterm** is completely customizable, here's how to do it with very few clicks:

1. Click the settings icon in bottom right corner.
2. Choose the theme of your choice from the list in a first tab.
3. Select your favourite font in a second tab.
4. Select the hot key for opening urls when clicking inside of a **bterm** in a third tab.

The selected settings will automatically appear in `.bterm.json` configuration file where you can hack your terminals' visual settings further.

## Features
In short, you can use bterm just like any other terminal. However, we augment the standard shell functionality with useful features for developers and researchers:
* **Information on current directory**
Your current directory path is being displayed at all times in a bottom bar.
* **Name of the git branch**
When working on your git repository, the name of your branch appears next to your shell input.
* **Opening links with the click**
Using hotkey + click for opening links from a console, i.e. `ctrl + click`.
* **Generate links to files on drag and drop**
Drag the file into the bterm window and link to the file will automatically be pasted to your shell input.
The default theme is a combination of black and white visuals.
Settings are stored in `.bterm2.json` configuration file where you can hack your terminals' visual settings.


## Hacking on bterm
Expand All @@ -43,19 +27,18 @@ In order to run bterm locally in a development mode please use the following com
```sh
git clone https://github.com/bleenco/bterm.git
npm install
npm start # wait for build to finish
npm run electron
npm start
```

### Production build
To generate bterm production build and installation package, run the following commands:

```sh
npm run app
npm run electron:[mac | linux | windows]
```
The executable installation package can be found in `dist` folder.

The executable installation package can be found in `app-builds` folder.

### LICENCE

MIT

Binary file removed assets/bterm.sketch
Binary file not shown.
Binary file removed assets/icon.icns
Binary file not shown.
Binary file removed assets/icon.ico
Binary file not shown.
25 changes: 0 additions & 25 deletions assets/icon.svg

This file was deleted.

Binary file removed assets/icon_1024x1024.png
Binary file not shown.
Binary file removed assets/icon_32x32.png
Binary file not shown.
Binary file removed assets/icon_512x512.png
Binary file not shown.
31 changes: 0 additions & 31 deletions config.json

This file was deleted.

106 changes: 106 additions & 0 deletions e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
import { Application } from 'spectron';
import { resolve } from 'path';

const getElectronPath = () => {
let electronPath = resolve(__dirname, '../../node_modules/.bin/electron');
if (process.platform === 'win32') {
electronPath += '.cmd';
}
return electronPath;
}

const startApplication = () => {
return new Application({
path: getElectronPath(),
args: [resolve(__dirname, '../../dist')],
env: { SPECTRON: true }
}).start();
}

describe('bterm', () => {
let app: Application;

beforeAll(() => startApplication().then(startedApp => app = startedApp));

afterAll(() => {
if (app && app.isRunning()) {
return app.stop();
}
})

it('should show an initial window', () => {
return app.client.waitUntilWindowLoaded()
.then(() => app.client.getWindowCount())
.then(count => expect(count).toEqual(1));
});

it('should be visible', () => {
return app.client.waitUntilWindowLoaded()
.then(() => app.browserWindow.isVisible())
.then(res => expect(res).toBeTruthy());
});

it('should not be minimized', () => {
return app.client.waitUntilWindowLoaded()
.then(() => app.browserWindow.isMinimized())
.then(res => expect(res).toBeFalsy());
});

it('should check if globalShortcuts are registered', () => {
return app.client.waitUntilWindowLoaded()
.then(() => app.electron.remote.globalShortcut.isRegistered('CommandOrControl+Shift+O'))
.then((result) => expect(result).toBeFalsy()) // First is not existing that shpuld be false
.then(() => app.electron.remote.globalShortcut.isRegistered('CommandOrControl+Shift+Left'))
.then((result) => expect(result).toBeTruthy())
.then(() => app.electron.remote.globalShortcut.isRegistered('CommandOrControl+Shift+Right'))
.then((result) => expect(result).toBeTruthy())
.then(() => app.electron.remote.globalShortcut.isRegistered('CommandOrControl+T'))
.then((result) => expect(result).toBeTruthy())
.then(() => app.electron.remote.globalShortcut.isRegistered('CommandOrControl+W'))
.then((result) => expect(result).toBeTruthy())
.then(() => app.electron.remote.globalShortcut.isRegistered('CommandOrControl+K'))
.then((result) => expect(result).toBeTruthy())
.then(() => app.electron.remote.globalShortcut.isRegistered('CommandOrControl+1'))
.then((result) => expect(result).toBeTruthy())
.then(() => app.electron.remote.globalShortcut.isRegistered('CommandOrControl+2'))
.then((result) => expect(result).toBeTruthy())
.then(() => app.electron.remote.globalShortcut.isRegistered('CommandOrControl+3'))
.then((result) => expect(result).toBeTruthy())
.then(() => app.electron.remote.globalShortcut.isRegistered('CommandOrControl+4'))
.then((result) => expect(result).toBeTruthy())
.then(() => app.electron.remote.globalShortcut.isRegistered('CommandOrControl+5'))
.then((result) => expect(result).toBeTruthy())
.then(() => app.electron.remote.globalShortcut.isRegistered('CommandOrControl+6'))
.then((result) => expect(result).toBeTruthy())
.then(() => app.electron.remote.globalShortcut.isRegistered('CommandOrControl+7'))
.then((result) => expect(result).toBeTruthy())
.then(() => app.electron.remote.globalShortcut.isRegistered('CommandOrControl+8'))
.then((result) => expect(result).toBeTruthy())
.then(() => app.electron.remote.globalShortcut.isRegistered('CommandOrControl+9'))
.then((result) => expect(result).toBeTruthy())
.then(() => app.electron.remote.globalShortcut.isRegistered('CommandOrControl+0'))
.then((result) => expect(result).toBeTruthy())
.then(() => app.electron.remote.globalShortcut.isRegistered('CommandOrControl+N'))
.then((result) => expect(result).toBeTruthy())
.then(() => app.electron.remote.globalShortcut.isRegistered('CommandOrControl+Shift+I'))
.then((result) => expect(result).toBeTruthy())
});

it('should have a width', () => {
return app.client.waitUntilWindowLoaded()
.then(() => app.browserWindow.getBounds())
.then(result => {
expect(result.width).toBeDefined();
expect(result.width).toBeGreaterThan(0);
expect(result.height).toBeDefined();
expect(result.height).toBeGreaterThan(0);
});
});

it('should have the app title', () => {
return app.client.waitUntilWindowLoaded()
.then(() => app.browserWindow.getTitle())
.then(title => expect(title).toEqual('bterm'));
});

});
Loading

0 comments on commit c610c86

Please sign in to comment.