Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
Merge pull request #12 from QuiiBz/canary
Browse files Browse the repository at this point in the history
Canary
  • Loading branch information
QuiiBz committed Mar 18, 2020
2 parents d4f558c + 1d7e3cb commit 779771b
Show file tree
Hide file tree
Showing 18 changed files with 915 additions and 326 deletions.
19 changes: 7 additions & 12 deletions .travis.yml
@@ -1,24 +1,20 @@
osx_image: xcode10.3 # define OS X image which will be mounted
osx_image: xcode10.3

dist: xenial # use Ubuntu Xenial for Linux operation system
dist: xenial

# Note: if you switch to sudo: false, you'll need to launch chrome with --no-sandbox.
# See https://github.com/travis-ci/travis-ci/issues/8836
sudo: required

# Define Node.js as the programming language as we have a web application
language: node_js
node_js: '11'

addons:
chrome: stable # Install chrome stable on operating systems
chrome: stable
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
- g++

# A list of operating systems which are used for tests
os:
- linux
- osx
Expand All @@ -28,7 +24,7 @@ env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- YARN-GPG=no
- CXX=g++-5
- CXX=g++

cache:
yarn: true
Expand All @@ -40,16 +36,15 @@ cache:
before_install:
- npm install -g node-gyp
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install python; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install libsecret-1-dev; fi

# These commands are executed before the scripts are executed
install:
# Install all dependencies listed in your package.json file
- npm install
- node_modules/.bin/electron-rebuild

script:
- tsc
- echo "Deploy linux release to GitHub"
- if [[ "$TRAVIS_BRANCH" == "canary" ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm run publish:linux; fi

- echo "Deploy mac release to GitHub"
- if [[ "$TRAVIS_BRANCH" == "canary" ]] && [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm run publish:mac; fi
53 changes: 50 additions & 3 deletions README.md
@@ -1,5 +1,6 @@
![](https://i.imgur.com/gcAGPt1.png)

[![Build Status](https://travis-ci.org/QuiiBz/squid.svg?branch=canary)](https://travis-ci.org/QuiiBz/squid)
[![Known Vulnerabilities](https://snyk.io/test/github/QuiiBz/squid/badge.svg?targetFile=package.json)](https://snyk.io/test/github/QuiiBz/squid?targetFile=package.json)
[![Quality score](https://www.code-inspector.com/project/4175/score/svg)](https://www.code-inspector.com/project/4175/score/svg)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/QuiiBz/squid/issues)
Expand All @@ -8,7 +9,7 @@
**Squid** is a terminal emulator, build with new technologies.

## Download
A **canary** version of Squid is available for download in [releases](https://github.com/QuiiBz/squid/releases)
**Canary** versions of Squid are availables for download in [releases](https://github.com/QuiiBz/squid/releases)

## Contribute
First of all, make sure you have NPM installed on your system. Then :
Expand All @@ -18,7 +19,15 @@ First of all, make sure you have NPM installed on your system. Then :
4) In another terminal tab, run `npm start` to launch the app

## Screenshots
![](https://i.imgur.com/ya1IA7J.png)

### Home page
![](https://i.imgur.com/XrNMD9k.png)

### Terminals
![](https://i.imgur.com/NWbRhjR.png)

### Add/edit host
![](https://i.imgur.com/EIUqjmk.png)

## Themes and settings
You can create and set a theme very easily. Themes are basic JSON files, located in `userData` :
Expand Down Expand Up @@ -53,4 +62,42 @@ To create a theme, create a new file in `userData` folder, named `<themeName>.th
}
```

Then, to apply your theme, locate the key `currentTheme` in the settings file (`userData/settings.squid.json`), and change it to the name of the theme you created or downloaded. Restart the app to see the changes.
Then, to apply your theme, locate the key `currentTheme` in the settings file (`userData/settings.squid.json`), and change it to the name of the theme you created or downloaded. You dont't need to restart, the app watch for changes in the settings file and automatically process the changes.

Where is the settings file, more options are coming :
```
{
"theme": {
...
},
"cursor": {
"style": "block",
"blink": true
},
"font": {
"size": 13,
"family": "\"Fira Code\", \"Consolas\", monospace"
},
"backgroundImage": {
"path": "",
"opacity": 1
},
"bash": "",
"currentTheme": "default",
"fastScrollModifier": "shift",
"shortcuts": [
{
"keys": "CommandOrControl+Shift+T",
"action": "pane:open"
},
{
"keys": "CommandOrControl+Shift+W",
"action": "pane:close"
},
{
"keys": "CommandOrControl+Tab",
"action": "pane:switch"
}
]
}
```
28 changes: 26 additions & 2 deletions app/components/Pane.ts
@@ -1,14 +1,38 @@
import Settings, { ISettings } from '../settings/Settings';

export default class Pane {
export default abstract class Pane {

protected settings: Settings;
protected id: number;
protected opened: boolean;

constructor(settings: Settings, id: number) {
protected constructor(settings: Settings, id: number) {

this.settings = settings;
this.id = id;
this.opened = false;
}

abstract adapt();
abstract onData(data: string);
abstract applySettings(settings: ISettings);
abstract fit();

/**
* Return if the pane is opened or in the index
* @return If the pane is opened
*/
isOpened(): boolean {

return this.opened;
}

/**
* Set the pane to opened
*/
setOpened() {

this.opened = true;
}

/**
Expand Down

0 comments on commit 779771b

Please sign in to comment.