Compare commits

...

21 Commits

Author SHA1 Message Date
Eugene Pankov
7e7d537868 allow null values in config (fixes #165) 2017-08-11 19:47:52 +03:00
Eugene Pankov
1afb1e718b change default tmux hotkey (fixes #171) 2017-08-11 19:26:24 +03:00
Eugene Pankov
f71f518058 store Screen configuration in Terminus user directory (fixes #177) 2017-08-11 19:21:32 +03:00
Eugene Pankov
7a005132cc Merge branch 'master' of github.com:Eugeny/terminus 2017-08-11 19:17:54 +03:00
Eugene Pankov
34ef809aee handle null results from winreg (fixes #174) 2017-08-11 19:16:58 +03:00
Eugene Pankov
6352f22c48 Merge pull request #167 from koraktor/patch-1
Start an interactive logon shell for Git Bash
2017-08-07 13:52:54 +02:00
Sebastian Staudt
d0f378764f Start an interactive logon shell for Git Bash
Provide additional arguments to `bash.exe` to get an interactive login shell.
This ensures e.g. `.profile` and `.bash_profile` are sourced. As there’s no way
to have an existing session under Windows, `--login` is mandatory. Each bash
session must be started from scratch.

Fixes #105
2017-08-07 10:07:07 +02:00
Eugene Pankov
7885badbfd make line padding adjustable (fixes #141) 2017-08-05 16:57:00 +02:00
Eugene Pankov
5999d169bc mac & windows icons 2017-08-05 16:27:25 +02:00
Eugene Pankov
40b0f8cb69 added tmux dependency 2017-08-05 10:15:07 +02:00
Eugene Pankov
f428be5ae7 ignore unavaiable persistence providers in SessionsService (fixes #159) 2017-08-05 09:25:25 +02:00
Eugene Pankov
39183b1205 Merge branch 'master' of github.com:Eugeny/terminus 2017-08-04 14:42:06 +02:00
Eugene Pankov
36f82545ae fixed #155 2017-08-04 14:41:36 +02:00
Eugene Pankov
1ef8343ea9 default to tmux if available on Linux 2017-08-04 14:40:49 +02:00
fossabot
c9e24819ae Add license scan report and status 2017-08-04 13:39:41 +02:00
Eugene Pankov
e2f0ceef19 README 2017-08-04 13:26:08 +02:00
Eugene Pankov
acd6995bcc README 2017-08-04 13:25:14 +02:00
Eugene Pankov
ca5e6079bc README 2017-08-04 13:22:38 +02:00
Eugene Pankov
48ad16946b README 2017-08-04 13:20:44 +02:00
Eugene Pankov
0a8af12a93 branding 2017-08-04 13:17:50 +02:00
Eugene Pankov
7e602a3612 bump 2017-08-02 15:22:32 +02:00
34 changed files with 293 additions and 116 deletions

View File

@@ -1,7 +1,16 @@
# Terminus α <div align="center">
*A terminal for a more modern age* <img src="https://raw.githubusercontent.com/Eugeny/terminus/master/build/icons/128x128.png">
[![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) <h1>Terminus α</h1>
<p>
<i>A terminal for a more modern age</i>
</p>
<br/>
<br/>
<br/>
</div>
[![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)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2FEugeny%2Fterminus.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2FEugeny%2Fterminus?ref=badge_shield)
---- ----
@@ -37,3 +46,7 @@ Plugins can be installed directly from the Settings view inside Terminus.
Pull requests and plugins are welcome! Publish your plugin on NPM with a `terminus-plugin` keyword to make them appear in the Plugin Manager. 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! See [HACKING.md](https://github.com/Eugeny/terminus/blob/master/HACKING.md) for a very brief plugin development tutorial!
## License
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2FEugeny%2Fterminus.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2FEugeny%2Fterminus?ref=badge_large)

View File

@@ -13,22 +13,9 @@ html
app-root app-root
.preload-logo .preload-logo
div div
.terminus-logo.animated .terminus-logo
.part(style='transform: rotateZ(0deg)')
div
.part(style='transform: rotateZ(51deg)')
div
.part(style='transform: rotateZ(102deg)')
div
.part(style='transform: rotateZ(154deg)')
div
.part(style='transform: rotateZ(205deg)')
div
.part(style='transform: rotateZ(257deg)')
div
.part(style='transform: rotateZ(308deg)')
div
h1.terminus-title Terminus h1.terminus-title Terminus
sup α
.progress .progress
.bar(style='width: 0%') .bar(style='width: 0%')

View File

@@ -192,7 +192,6 @@ start = () => {
let options = { let options = {
width: 800, width: 800,
height: 600, height: 600,
//icon: `${app.getAppPath()}/assets/img/icon.png`,
title: 'Terminus', title: 'Terminus',
minWidth: 400, minWidth: 400,
minHeight: 300, minHeight: 300,

89
app/src/logo.svg Normal file
View File

@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="150mm"
height="150mm"
viewBox="0 0 150 150"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="logo.svg"
inkscape:export-filename="/home/eugene/Work/term/build/icons/16x16.png"
inkscape:export-xdpi="2.7093334"
inkscape:export-ydpi="2.7093334">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.49497475"
inkscape:cx="134.39743"
inkscape:cy="340.43068"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:snap-bbox="true"
inkscape:window-width="1366"
inkscape:window-height="692"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-10.356544,-82.309525)">
<path
inkscape:connector-curvature="0"
id="path138"
style="opacity:0.9;fill:#ccccff;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
d="m 39.305965,108.47713 60.922105,35.13225 0.0945,21.68327 -61.016595,-37.11662 z"
sodipodi:nodetypes="ccccc" />
<path
inkscape:connector-curvature="0"
id="path116"
style="opacity:0.9;fill:#6666cc;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
d="m 136.19445,144.4429 0.0455,20.67266 -78.028381,44.11611 -0.0031,-19.78119 z"
sodipodi:nodetypes="ccccc" />
<path
inkscape:connector-curvature="0"
id="path118"
style="opacity:0.9;fill:#ccccff;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
d="m 39.471179,178.6501 18.737341,10.818 0.0031,19.78099 -18.740409,-10.88245 z"
sodipodi:nodetypes="ccccc" />
<path
style="opacity:0.9;fill:#b4e2ff;fill-rule:evenodd;stroke:none;stroke-width:1.00546169px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
d="m 56.43263,98.242186 -17.391087,10.041014 61.186527,35.32618 -61.020778,35.23005 18.839694,10.87703 61.020784,-35.23005 17.39108,-10.04102 z"
id="path134"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -1,6 +1,3 @@
$color: rgba(66, 142, 173, 0.75);
.preload-logo { .preload-logo {
-webkit-app-region: drag; -webkit-app-region: drag;
position: fixed; position: fixed;
@@ -24,7 +21,7 @@ $color: rgba(66, 142, 173, 0.75);
.bar { .bar {
transition: 1s ease-out width; transition: 1s ease-out width;
background: $color; background: #a1c5e4;
height: 3px; height: 3px;
} }
} }
@@ -42,63 +39,22 @@ $color: rgba(66, 142, 173, 0.75);
.terminus-logo { .terminus-logo {
width: 160px; width: 160px;
height: 160px; height: 160px;
background: url('./logo.svg');
background-repeat: none;
background-size: contain;
margin: auto; margin: auto;
position: relative;
transform: rotateZ(-14.5deg);
.part {
position: absolute;
width: 160px;
height: 160px;
div {
position: absolute;
top: 33px;
left: 24px;
width: 44px;
height: 44px;
background: $color;
transform: rotateX(52deg) rotateY(-42deg);
animation: terminusLogoPartOnce ease-out 1s;
}
}
&.animated .part div {
animation: terminusLogoPart infinite ease-out 2s;
}
} }
.terminus-title { .terminus-title {
color: $color; color: #a1c5e4;
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
text-align: center; text-align: center;
font-weight: normal; font-weight: normal;
font-size: 42px; font-size: 42px;
margin: 0; margin: 0;
}
sup {
@keyframes terminusLogoPart { color: #842fe0;
0% {
transform: rotateX(90deg) rotateY(-90deg);
}
25% {
transform: rotateX(52deg) rotateY(-42deg);
}
75% {
transform: rotateX(52deg) rotateY(-42deg);
}
100% {
transform: rotateX(-90deg) rotateY(-90deg);
}
}
@keyframes terminusLogoPartOnce {
0% {
transform: rotateX(90deg) rotateY(-90deg);
}
100% {
transform: rotateX(52deg) rotateY(-42deg);
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

118
build/icons/icon.svg Normal file
View File

@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="150mm"
height="150mm"
viewBox="0 0 150 150"
version="1.1"
id="svg8"
inkscape:version="0.92.1 r15371"
sodipodi:docname="icon.svg">
<defs
id="defs2">
<linearGradient
inkscape:collect="always"
id="linearGradient4649">
<stop
style="stop-color:#000916;stop-opacity:1"
offset="0"
id="stop4645" />
<stop
style="stop-color:#004565;stop-opacity:1"
offset="1"
id="stop4647" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4649"
id="linearGradient4651"
x1="89.26284"
y1="85.146751"
x2="89.26284"
y2="229.47229"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.49497475"
inkscape:cx="134.39743"
inkscape:cy="340.43068"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:snap-bbox="true"
inkscape:window-width="1366"
inkscape:window-height="692"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-10.356544,-82.309525)">
<rect
id="rect168"
width="150"
height="150"
x="10.356544"
y="82.309525"
style="fill:url(#linearGradient4651);fill-opacity:1;stroke-width:0.26458332"
rx="10"
ry="10" />
<path
inkscape:connector-curvature="0"
id="path138"
style="opacity:0.9;fill:#ccccff;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
d="m 39.305965,108.47713 60.922105,35.13225 0.0945,21.68327 -61.016595,-37.11662 z"
sodipodi:nodetypes="ccccc" />
<path
inkscape:connector-curvature="0"
id="path116"
style="opacity:0.9;fill:#6666cc;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
d="m 136.19445,144.4429 0.0455,20.67266 -78.028381,44.11611 -0.0031,-19.78119 z"
sodipodi:nodetypes="ccccc" />
<path
inkscape:connector-curvature="0"
id="path118"
style="opacity:0.9;fill:#ccccff;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
d="m 39.471179,178.6501 18.737341,10.818 0.0031,19.78099 -18.740409,-10.88245 z"
sodipodi:nodetypes="ccccc" />
<path
style="opacity:0.9;fill:#b4e2ff;fill-rule:evenodd;stroke:none;stroke-width:1.00546169px;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1"
d="m 56.43263,98.242186 -17.391087,10.041014 61.186527,35.32618 -61.020778,35.23005 18.839694,10.87703 61.020784,-35.23005 17.39108,-10.04102 z"
id="path134"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 361 KiB

View File

@@ -74,7 +74,8 @@
"libnotify4", "libnotify4",
"libappindicator1", "libappindicator1",
"libxtst6", "libxtst6",
"libnss3" "libnss3",
"tmux"
] ]
}, },
"rpm": { "rpm": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "terminus-community-color-schemes", "name": "terminus-community-color-schemes",
"version": "1.0.0-alpha.23-8-gcdc7daf", "version": "1.0.0-alpha.24",
"description": "Community color schemes for Terminus", "description": "Community color schemes for Terminus",
"keywords": [ "keywords": [
"terminus-plugin" "terminus-plugin"

View File

@@ -1,6 +1,6 @@
{ {
"name": "terminus-core", "name": "terminus-core",
"version": "1.0.0-alpha.23-8-gcdc7daf", "version": "1.0.0-alpha.24",
"description": "Terminus core", "description": "Terminus core",
"keywords": [ "keywords": [
"terminus-plugin" "terminus-plugin"

View File

@@ -1,28 +1,15 @@
div div
.terminus-logo .terminus-logo
.part(style='transform: rotateZ(0deg)')
div
.part(style='transform: rotateZ(51deg)')
div
.part(style='transform: rotateZ(102deg)')
div
.part(style='transform: rotateZ(154deg)')
div
.part(style='transform: rotateZ(205deg)')
div
.part(style='transform: rotateZ(257deg)')
div
.part(style='transform: rotateZ(308deg)')
div
h1.terminus-title Terminus h1.terminus-title Terminus
span.text-muted α sup α
button.btn.btn-primary.btn-lg.btn-block( .list-group
*ngFor='let button of getButtons()', a.list-group-item.list-group-item-action(
(click)='button.click()', *ngFor='let button of getButtons()',
) (click)='button.click()',
i.fa([class]='"fa fa-" + button.icon') )
span {{button.title}} i([class]='"fa fa-fw fa-" + button.icon')
span {{button.title}}
footer footer
.pull-right .pull-right

View File

@@ -24,6 +24,6 @@ footer {
background: rgba(0,0,0,.5); background: rgba(0,0,0,.5);
} }
button { a, button {
-webkit-app-region: no-drag; -webkit-app-region: no-drag;
} }

View File

@@ -38,7 +38,7 @@ export class ConfigProxy {
{ {
enumerable: true, enumerable: true,
configurable: false, configurable: false,
get: () => real[key] || defaults[key], get: () => (real[key] !== undefined) ? real[key] : defaults[key],
set: (value) => { set: (value) => {
real[key] = value real[key] = value
} }

View File

@@ -71,7 +71,11 @@ $dropdown-link-disabled-color: #333;
$dropdown-header-color: #333; $dropdown-header-color: #333;
$list-group-color: $body-color; $list-group-color: $body-color;
$list-group-bg: $body-bg2; $list-group-bg: rgba(255,255,255,.05);
$list-group-border-color: rgba(255,255,255,.1);
$list-group-hover-bg: rgba(255,255,255,.1);
$list-group-link-active-bg: rgba(255,255,255,.2);
@import '~bootstrap/scss/bootstrap.scss'; @import '~bootstrap/scss/bootstrap.scss';
@@ -271,12 +275,6 @@ hotkey-input-modal {
} }
} }
start-page {
.terminus-title {
color: $blue;
}
}
.form-group label { .form-group label {
margin-bottom: 2px; margin-bottom: 2px;
} }
@@ -314,3 +312,11 @@ ngb-tabset .tab-content {
.input-group > select.form-control { .input-group > select.form-control {
flex-direction: row; flex-direction: row;
} }
.list-group-item {
transition: 0.25s background;
i + * {
margin-left: 10px;
}
}

View File

@@ -1,6 +1,6 @@
{ {
"name": "terminus-plugin-manager", "name": "terminus-plugin-manager",
"version": "1.0.0-alpha.23-8-gcdc7daf", "version": "1.0.0-alpha.24",
"description": "Terminus' plugin manager", "description": "Terminus' plugin manager",
"keywords": [ "keywords": [
"terminus-plugin" "terminus-plugin"

View File

@@ -1,6 +1,6 @@
{ {
"name": "terminus-settings", "name": "terminus-settings",
"version": "1.0.0-alpha.23-8-gcdc7daf", "version": "1.0.0-alpha.24",
"description": "Terminus terminal settings page", "description": "Terminus terminal settings page",
"keywords": [ "keywords": [
"terminus-plugin" "terminus-plugin"

View File

@@ -1,6 +1,6 @@
{ {
"name": "terminus-terminal", "name": "terminus-terminal",
"version": "1.0.0-alpha.23-8-gcdc7daf", "version": "1.0.0-alpha.24",
"description": "Terminus' terminal emulation core", "description": "Terminus' terminal emulation core",
"keywords": [ "keywords": [
"terminus-plugin" "terminus-plugin"

View File

@@ -230,7 +230,7 @@
) )
option( option(
*ngFor='let shell of shells', *ngFor='let shell of shells',
[ngValue]='shell.command' [ngValue]='shell.id'
) {{shell.name}} ) {{shell.name}}
.form-group .form-group

View File

@@ -214,6 +214,13 @@ export class TerminalTabComponent extends BaseTabComponent {
return ret return ret
} }
} }
const _measureCharacterSize = hterm.scrollPort_.measureCharacterSize.bind(hterm.scrollPort_)
hterm.scrollPort_.measureCharacterSize = () => {
let size = _measureCharacterSize()
size.height += this.config.store.terminal.linePadding
return size
}
} }
attachIOHandlers (io: any) { attachIOHandlers (io: any) {

View File

@@ -4,6 +4,7 @@ export class TerminalConfigProvider extends ConfigProvider {
defaults = { defaults = {
terminal: { terminal: {
fontSize: 14, fontSize: 14,
linePadding: 0,
bell: 'off', bell: 'off',
bracketedPaste: false, bracketedPaste: false,
background: 'theme', background: 'theme',
@@ -42,7 +43,7 @@ export class TerminalConfigProvider extends ConfigProvider {
[Platform.macOS]: { [Platform.macOS]: {
terminal: { terminal: {
font: 'Menlo', font: 'Menlo',
shell: '~default-shell~', shell: 'default',
persistence: 'screen', persistence: 'screen',
}, },
hotkeys: { hotkeys: {
@@ -74,7 +75,7 @@ export class TerminalConfigProvider extends ConfigProvider {
[Platform.Windows]: { [Platform.Windows]: {
terminal: { terminal: {
font: 'Consolas', font: 'Consolas',
shell: '~clink~', shell: 'clink',
persistence: null, persistence: null,
}, },
hotkeys: { hotkeys: {
@@ -105,8 +106,8 @@ export class TerminalConfigProvider extends ConfigProvider {
[Platform.Linux]: { [Platform.Linux]: {
terminal: { terminal: {
font: 'Liberation Mono', font: 'Liberation Mono',
shell: '~default-shell~', shell: 'default',
persistence: 'screen', persistence: 'tmux',
}, },
hotkeys: { hotkeys: {
'copy': [ 'copy': [

View File

@@ -10,6 +10,11 @@ x-screen {
transition: 0.125s ease background; transition: 0.125s ease background;
} }
x-row > span {
display: inline-block;
height: inherit;
}
@font-face { @font-face {
font-family: "monospace-fallback"; font-family: "monospace-fallback";
src: url(fonts/Meslo.otf) format("opentype"); src: url(fonts/Meslo.otf) format("opentype");

View File

@@ -1,10 +1,11 @@
import * as fs from 'mz/fs' import * as fs from 'mz/fs'
import * as path from 'path'
import { exec, spawn } from 'mz/child_process' import { exec, spawn } from 'mz/child_process'
import { exec as execAsync, execFileSync } from 'child_process' import { exec as execAsync, execFileSync } from 'child_process'
import { AsyncSubject } from 'rxjs' import { AsyncSubject } from 'rxjs'
import { Injectable } from '@angular/core' import { Injectable } from '@angular/core'
import { Logger, LogService } from 'terminus-core' import { Logger, LogService, ElectronService } from 'terminus-core'
import { SessionOptions, SessionPersistenceProvider } from '../api' import { SessionOptions, SessionPersistenceProvider } from '../api'
declare function delay (ms: number): Promise<void> declare function delay (ms: number): Promise<void>
@@ -35,6 +36,7 @@ export class ScreenPersistenceProvider extends SessionPersistenceProvider {
constructor ( constructor (
log: LogService, log: LogService,
private electron: ElectronService,
) { ) {
super() super()
this.logger = log.create('main') this.logger = log.create('main')
@@ -115,7 +117,7 @@ export class ScreenPersistenceProvider extends SessionPersistenceProvider {
} }
private async prepareConfig (): Promise<string> { private async prepareConfig (): Promise<string> {
let configPath = '/tmp/.termScreenConfig' let configPath = path.join(this.electron.app.getPath('userData'), 'screen-config.tmp')
await fs.writeFile(configPath, ` await fs.writeFile(configPath, `
escape ^^^ escape ^^^
vbell off vbell off

View File

@@ -15,6 +15,7 @@ const TMUX_CONFIG = `
set -g set-titles-string "#W" set -g set-titles-string "#W"
set -g window-status-format '#I:#(pwd="#{pane_current_path}"; echo \${pwd####*/})#F' set -g window-status-format '#I:#(pwd="#{pane_current_path}"; echo \${pwd####*/})#F'
set -g window-status-current-format '#I:#(pwd="#{pane_current_path}"; echo \${pwd####*/})#F' set -g window-status-current-format '#I:#(pwd="#{pane_current_path}"; echo \${pwd####*/})#F'
set-option -g prefix C-^
set-option -g status-interval 1 set-option -g status-interval 1
` `

View File

@@ -185,6 +185,7 @@ export class SessionsService {
) { ) {
nodePTY = electron.remoteRequirePluginModule('terminus-terminal', 'node-pty', global as any) nodePTY = electron.remoteRequirePluginModule('terminus-terminal', 'node-pty', global as any)
this.logger = log.create('sessions') this.logger = log.create('sessions')
this.persistenceProviders = this.persistenceProviders.filter(x => x.isAvailable())
} }
async prepareNewSession (options: SessionOptions): Promise<SessionOptions> { async prepareNewSession (options: SessionOptions): Promise<SessionOptions> {
@@ -220,6 +221,9 @@ export class SessionsService {
} }
private getPersistence (): SessionPersistenceProvider { private getPersistence (): SessionPersistenceProvider {
if (!this.config.store.terminal.persistence) {
return null
}
return this.persistenceProviders.find(x => x.id === this.config.store.terminal.persistence) || null return this.persistenceProviders.find(x => x.id === this.config.store.terminal.persistence) || null
} }
} }

View File

@@ -25,7 +25,7 @@ export class Cygwin32ShellProvider extends ShellProvider {
let cygwinPath = await new Promise<string>(resolve => { let cygwinPath = await new Promise<string>(resolve => {
let reg = new Registry({ hive: Registry.HKLM, key: '\\Software\\Cygwin\\setup', arch: 'x86' }) let reg = new Registry({ hive: Registry.HKLM, key: '\\Software\\Cygwin\\setup', arch: 'x86' })
reg.get('rootdir', (err, item) => { reg.get('rootdir', (err, item) => {
if (err) { if (err || !item) {
return resolve(null) return resolve(null)
} }
resolve(item.value) resolve(item.value)

View File

@@ -25,7 +25,7 @@ export class Cygwin64ShellProvider extends ShellProvider {
let cygwinPath = await new Promise<string>(resolve => { let cygwinPath = await new Promise<string>(resolve => {
let reg = new Registry({ hive: Registry.HKLM, key: '\\Software\\Cygwin\\setup', arch: 'x64' }) let reg = new Registry({ hive: Registry.HKLM, key: '\\Software\\Cygwin\\setup', arch: 'x64' })
reg.get('rootdir', (err, item) => { reg.get('rootdir', (err, item) => {
if (err) { if (err || !item) {
return resolve(null) return resolve(null)
} }
resolve(item.value) resolve(item.value)

View File

@@ -25,7 +25,7 @@ export class GitBashShellProvider extends ShellProvider {
let gitBashPath = await new Promise<string>(resolve => { let gitBashPath = await new Promise<string>(resolve => {
let reg = new Registry({ hive: Registry.HKLM, key: '\\Software\\GitForWindows' }) let reg = new Registry({ hive: Registry.HKLM, key: '\\Software\\GitForWindows' })
reg.get('InstallPath', (err, item) => { reg.get('InstallPath', (err, item) => {
if (err) { if (err || !item) {
resolve(null) resolve(null)
return return
} }
@@ -41,6 +41,7 @@ export class GitBashShellProvider extends ShellProvider {
id: 'git-bash', id: 'git-bash',
name: 'Git-Bash', name: 'Git-Bash',
command: path.join(gitBashPath, 'bin', 'bash.exe'), command: path.join(gitBashPath, 'bin', 'bash.exe'),
args: [ '--login', '-i' ],
env: { env: {
TERM: 'cygwin', TERM: 'cygwin',
} }