Commit graph

58 commits

Author SHA1 Message Date
Labhansh Agrawal
f0b92cb8be Fix lint errors 2019-11-20 23:33:22 +01:00
Benjamin Staneck
03ff483bea add TODO comments for the new Electron async APIs that replace the remote module 2019-10-25 15:34:56 +02:00
Labhansh Agrawal
d232ec27c0 Typings fixes in terms and sessions 2019-10-20 22:20:05 +02:00
Labhansh Agrawal
537c746c75 porting files in lib/ actions, reducers and utils/plugins to ts (#3887)
* add type definitions

* rename files in lib/actions

* rename files from lib/reducers to ts

* renamed plugins.js to ts

* Add hyper types

* Fix ts errors in lib/reducers

* Fix ts errors in lib/actions

* Fix ts errors in plugins.ts
2019-10-19 18:59:56 +02:00
Jason Gauci
71953e0fdf Allow plugins to set the parent/predecessor of a new session (#3723) 2019-10-15 02:09:30 +02:00
ivan
97242c5d78 fix closing tab containing multiple panes 2019-10-13 03:09:23 +02:00
Gaby
ab0c8fe13f Add support for font ligatures via xterm-addon-ligatures - Clos… (#3853)
* Add support for font ligatures via xterm-addon-ligatures

* Add disableLigatures config option, defaults to false

* Fix lint issue
2019-10-09 22:23:55 +02:00
Labhansh Agrawal
b52d8152bf Upgrade eslint to v6 and add TypeScript linting (#3843)
* Upgrade eslint to v6 and add TypeScript linting

* Fix pr checks


Co-authored-by: Benjamin Staneck <Stanzilla@users.noreply.github.com>
2019-10-03 02:56:50 +02:00
Donald Green
5d7142c2df Return of the Bell (#2938)
* 1. Restored the ability to turn the "bell" sound on and off using the "bell" config parameter.
2. Restored the ability to change the bell sound by providing a URL. These changes allow for a web url or local absolute file path to an audio file.

The goal with these changes was to fix the issue causing the bell to never sound due to a difference in the underlying terminal emulators configurations from the previous one. While in the area, also decided to make sure that the sound can be changed by supplying a web url to an audio file or an absolute path to an audio file within the local machine

* Code style changes

* Code style changes

* 1. More code style changes

* 1. Spacing changes to try and abide by the linter

* 1. Applied all suggested changes by eslint

* 1. Removed functionality to specify a remote url to set a sound file for the bell sound. The amount of effort for handling when there is no internet connection, queuing and so forth wasn't worth keeping the feature. It is likely that the url could be used to download the file in which the user would be able to specify the file path tho this download file.
2. Created a new property that gets passed down from the terms container all the way to the individual term. We want to be able to evaluate if the bellSoundURL has changed to determine if we really need to read the sound file.
3. Moved logic to read the audio file into the main process. Setup a new action in the 'actions/ui' that will update the bell sound when it is finished and ready. This should prevent blocking the terminal from loading and thus increasing loading times.

* 1. Modified the file reading method to be more generic to increase reusability.
2. Updated the "arrBuf2Base64" method to utilize the node Buffer class which helped to reduce some complexity and seems to run more efficiently.
3. Removed the CONFIG_ASYNC action and reducer in favor of reusing CONFIG_RELOAD when the process is finished reading the file for the bell sound. In order to achieve this, we had to merge the config from "config.getConfig()" method with the "bellSound" property before dispatching to "reloadConfig".

* 1. Removed reference to now removed method

* 1. Removed the arrBuf2Base64 as it seemed unnecessary now that the function would be reduced to a single line. Moved the one-liner into file.js. Removed references to arrBuf2Base64 method.
2. Refactored the logic that handles reloading the config when it has been updated to fix an issue that would set the bell sound back to the default sound when the config is saved without changing the value of "bellSoundURL". Setup now to either read file and reload the config, or reuse the "bellSound" value saved in state and reload the config. This removes an inefficiency with the reloadConfig being dispatched twice when "bellSoundURL" has changed as well.

* 1. Removed a file that contained a single function, referenced in only one place that is performing a fairly simple task.
2. Updated the "getBase64FileData" method to use "Buffer.from()" instead of "Buffer()" due to messages stating that "Buffer()" is deprecated due to security and usability issues.

* Adjustments and regression issues fixed

1. Updated the default config file to better explain the supported options for the "bell" config property.
2. Rearranged the bellSoundURL default property to make it easier to find should one decide to change the bell sound.
3. Typos fixed in comments.
4. Update fetchFileData to utilize the configData provided as function argument. There appeared to be no reason to reference different sources of config data within the same method.

* 1. Removed the "BELL_STYLE" constant since it was only being used in one place.
2. Updated comment block to accurately reflect the current logic and made the comment much more concise.
2019-10-03 02:08:40 +02:00
Brandon Lee Dring
5bc8e0b1e8 Feat/text search (#3075)
* Added persistent text box search

* Toggle search box now working

* Restyled search box

* Linter and bug squashing

* Added multi OS hotkey support

* PR changes as requested

* Added ability to use escape button to close search field

* Woops forgot key mapping on non mac platforms

* fixed bug where escape would open up search window

* Removal of unused vars that died in conflict
2019-09-23 19:37:22 +02:00
Zachary Riedlshah
970a98f60b fix: prettier fullscreen for macOS
fixes #5
2019-09-11 04:20:06 +02:00
Philippe Potvin
d0f03f52e5
url are now interpreted by xterm (#3507)
* url are now interpreted by xterm

* no need

* .DS_STORE banished

* remove from reducer
2019-03-03 13:13:50 -05:00
onecamp
519ca3e651
Fix webgl config (#3407)
* Fix location of webGLRenderer flag in default-config.js

* Fix incorrect check of webGLRenderer flag

* Explain that disabling WebGL enables transparent backgrounds

Co-Authored-By: juancampa <juancampa@gmail.com>

* Only use WebGL if background is opaque

The hardcoding to white was also removed in favor of a temporary hack in
xterm.js that uses either white-over-black or black-overwhite to
maximize contrast with the background color
2019-01-21 19:09:18 -05:00
CHaBou
b709a3a971
Add macOptionSelectionMode option (#3406)
Two possible value: 
* `'vertical'` (Default): enable column selection when Option key is hold
* `'force'`: force selection regardless of whether the terminal is in mouse events mode
2019-01-11 14:31:11 +01:00
Juan Campa
7a40fd7c97 WebGL renderer (using xterm.js fork) (#3368)
* Enabling webGL renderer

* Use @zeit/xterm fork of xterm

* Adding webGLRenderer config

* Fix linting issues

* Allow for hot-reloading of webGLRenderer

* Adding link to WebGL renderer issue we're working around

* Using NPM tarball instead of resolutions (which wasn't working

* Hard-coding selection color to white because nothing else is yet supported
2018-12-28 14:42:05 -08:00
Jarid Margolin
28f778037b Add scrollback option to config (#3038) 2018-05-29 12:11:21 +02:00
Ricardo Amaral
a14c55640c Add letter spacing configuration option (#3002) 2018-05-10 12:54:00 +02:00
Brad Dougherty
bba14f6324 Add line height config (#2858)
Fixes #2858
2018-04-21 00:22:34 +02:00
CHaBou
dc33d4846b
Fix color configuration with an array (#2729)
Fixes #2728
2018-03-21 10:00:29 +01:00
CHaBou
8ebdaebdfa Change default colors (#2670) 2018-02-14 14:09:26 +01:00
CHaBou
b73a328b6b Add fontWeight and fontWeightBold settings (#2669)
Fixes #2574
2018-02-14 14:09:02 +01:00
CHaBou
dd780e6fe7
Xterm v3 integration (#2573) 2018-01-09 17:33:24 +01:00
CHaBou
1fbc85760b
Use same hazel endpoint to notify update to Linux users (#2497)
Add a pseudo auto-updater for Linux

Fixes #2476
2017-11-29 14:26:24 +01:00
CHaBou
d148c486f5
Load/Unload theme without restarting (#2458) 2017-11-29 14:22:29 +01:00
CHaBou
81709073cf
Keymaps are now updated without restarting (#2455)
* Reload keymaps without restarting

* Reattach key listeners when config have changed
2017-11-15 00:55:21 +01:00
CHaBou
9c9a307958
Merge branch 'master' into canary 2017-10-05 20:49:20 +02:00
CHaBou
d3a015466a Move Date.now() into actions to have pure reducers (#2324)
Reducers shouldn't have side effect. Date.now() is a side effect and should be done in action creators.
2017-10-04 00:18:55 +02:00
CHaBou
3e632577e5
Merge branch 'master' into xterm-linted
* master:
  Fix yarn.lock (#2194)
  Fix for keymapping bug on Linux and Windows (#2189)
  Set session CWD only if there is an active session (#2191)
  Upgrade Electron to v1.7.6 (#2193)
  Fix plugin path in dev mode (#2192)
2017-09-11 23:14:13 +02:00
Harrison Harnisch
b5f06759ee Set session CWD only if there is an active session (#2191) 2017-09-11 15:06:44 +02:00
CHaBou
1155bb54b1
Add prettier and resolve all lint errors 2017-09-10 16:04:13 +02:00
Guillermo Rauch
b302962d44 latest 2017-08-02 12:05:47 -07:00
Guillermo Rauch
dc3b90028b Add perf optimizations (#1541)
* pass `uid` to term

* term: keep track of term instance references

* sessions: remvoe `write` object overhead

* hterm: cache measurement of codepoints for single char strings

* sessions: merge less eagerly when we receive a PTY_DATA action

* store: handle the side effect of writing to the terminal from a middleware

* terms: add terms instance cache

* lint
2017-02-23 08:10:05 -03:00
Henrik
7a8591bfaf fix uifontfamily reducer (#1550) 2017-02-18 00:37:42 -03:00
Henrik
ade9ad39fd add configurable uifontfamily (#1549)
* add configurable uifontfamily

* rm uifontfamily config default

* fix uifontfamily conf default
2017-02-18 00:15:55 -03:00
Henrik
0ee48c9841 add hterm cursor blink support (#1547)
* add hterm cursor blink support

* update website with cursorblink doc
2017-02-17 21:11:23 -03:00
CHaBou
75b5eb7d3f Fix replaceParent reducer on termgroup exit (#1494) 2017-02-16 14:24:35 -03:00
Matheus Fernandes
6842e8500a
Make quickEdit true by default on Windows 2017-02-15 18:51:13 -03:00
Liudas Dzisevicius
270fe5bef9 [Windows] Add right click copy/paste (#1247)
* Add right click copy/paste

* Add quick edit config option
2017-02-15 17:22:09 -03:00
Matheus Fernandes
232295a195 Add the cwd to the redux state (#1412) 2017-01-15 14:40:47 -08:00
Paul Betts
0ff1cb9584 Windows titlebar improvements (#1307)
* Make double-clicking on the titlebar work

* We don't actually need this

* Draw a Restore icon when the window is Maximized

* Update React State when BrowserWindow changes behind our back

* Cleanup

* Don't show the border if the window is maximized

* Fight with the linter
2017-01-10 21:45:49 -08:00
Matheus Fernandes
9c90e19760 Add Windows support and first-class Linux support (#946)
* `child_pty` => `pty.js`

* Create a frameless window on Windows and Linux

* Add a brand new UI for Linux and Windows 💅

* [Windows] Fix plugin installation

* [Windows] Fix the `build` script

* [Windows] Add a bigger `icon.ico`

* [Mac] Add `WebKitAppRegion: drag` when running on macOS

* Fix code style 🤔

* Add `appveyor.yml`

* Fix code style (again)

* [Windows] Fix AppVeyor's `install` script

* [Windows] Try a new AppVeyor config

* [Windows] Set the binary path so Spectron can run the tests

* [Windows] Try to build on x64

* Try again to build on x64

* Try one more time 😩

* Throw an error to indicate that `pty.js` was built incorrectly

* [Win/Linux] Add `display: hidden` to <Tabs /> if tabs.length === 1

* [Win/Linux] Reorganize SVGs – via @CodeTheory

* [Win/Linux] Fix the hamburger menu height

* Make the SVGs look better with `shape-rendering: crispEdges;`

* [Win/Linux] Add config options for the window controls and the 🍔 menu

* Add `electron-squirrel-startup` dependency

* [Win] Handle Squirrel commands

* [Win/Linux] Fix default color for the 🍔 and window controls – via @CodeTheory

* [Win/Linux] Add some padding - via @CodeTheory

* [Win/Linux] Add hover states – via @CodeTheory

* [Win] Fix empty window/tab titles

* [Win] Fix opening Preferences (#978)

* [Win] Fix opening Preferences

* Update ui.js

* Update ui.js

* Enhance messages and default editor

* [Win] Add dependency instructions to the README.md [skip ci]

* Fix code style

* [Win/Linux] Check the number of open windows before quitting the app
2016-11-11 15:18:04 -02:00
Leo Lamprecht
630f0f4504
Comply to XO's no-warning-comments rule 2016-10-25 15:04:37 +02:00
David Gómez
8f28573fc0 Prefer default export to make XO happy (#931)
* Comply with prefer-default-export rule for findBySession function

* Remove XO's prefer-default-export rule

* Comply with prefer-default-export rule for init function

* Comply with prefer-default-export rule for getRootGroups function

* Comply with prefer-default-export rule for INIT constant

* Comply with prefer-default-export rule for isExecutable function

* Fix default export for constants

* Comply with prefer-default-export rule for last function

* Comply with prefer-default-export rule for getColorList function
2016-10-25 14:53:15 +02:00
Andrea Parodi
97432df7a4 Improve tabs title (#892)
* Set tab title when asked by the contained shell process via ANSI code

* Commented out process polling code

* Removed unused module and constant

* Remove getTitle method

* Removed props binding

* Removed polling clearTimeout

* Removed session focus & blur

* Remove listening for session `title` event

* Removed SESSION_SET_PROCESS_TITLE action

* Removed remainig blur
2016-10-22 13:05:32 -07:00
David Gómez
30a1a35937 Enforce null comparisons to make XO happy (#888)
* Remove react/no-eq-null rule from package.json

* Enforce null comparison and add type safety on checks
2016-10-16 22:13:25 +02:00
Hrvoje Šimić
7e71bf356b fix various typos and grammar errors in comments (#834) 2016-10-10 12:26:47 +02:00
Martin Ek
17a5a6b250 Make sure focused tabs don't get activity highlighted (#774) 2016-10-05 09:20:08 -07:00
Guillermo Rauch
fec4954dc1 fixes by @ekmartin 2016-10-04 13:27:27 -07:00
Guillermo Rauch
d01d3868eb simple version-based notifications system 2016-10-04 12:48:37 -07:00
Martin Ek
71ae9b7e00 Replace explicit null check with != null (#760)
Replace explicit null check with isNil

Replace isNil with != null
2016-10-04 11:16:34 -07:00