Commit graph

153 commits

Author SHA1 Message Date
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
Labhansh Agrawal
5158417eb0 fix search addon import (#3833) 2019-09-25 09:40:50 -04: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
Sam D
88da6cd3d9 fix/remove indented empty lines 2019-09-23 19:23:41 +02:00
Sam D
af68171528 Fix middle mouse click tab close (#2230) 2019-09-23 19:23:41 +02:00
Zachary Riedlshah
970a98f60b fix: prettier fullscreen for macOS
fixes #5
2019-09-11 04:20:06 +02:00
ArtBIT
72bc73ea76 Fix cols/rows in cursorFrame returned by onCursorMove (#3547)
Fixes #3542
2019-03-27 09:41:28 +01:00
Philippe Potvin
1127e8e7ae
Remove forgoten code (#3510) 2019-03-05 20:29:27 -05:00
onecamp
8733ecc84a
Display the renderer type in the About dialog (#3441)
* Now displaying the renderer type in the About dialog

* Show the number of renderers per type in the About dialog

* Use values instead of entries (key is unused)

Co-Authored-By: onecamp <juancampa@gmail.com>
2019-01-24 18:46:39 -05:00
Igor Sadikov
0dc8fb9ed4 Restore termRef to avoid breaking change (#3437) 2019-01-24 16:02:34 -05:00
onecamp
fa2c9d6423
Verify that webgl2 is supported before using it (#3435)
* Verify that webgl2 is supported before using it

* First check if WebGLRenderingContext exists at all

* Move webgl warnings to getTermOptions
2019-01-24 14:22:53 -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
Igor Sadikov
ea3e109fbb Fix and simplify resize handling using ResizeObserver (#3411) 2019-01-21 20:34:23 +01:00
Igor Sadikov
3881703e01 Fix xterm.js resource leaks in split pane (#3409) 2019-01-18 23:58:09 +01: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
Umberto Lentini
ba93421933 Fixed file paste (#3383)
Fixes #3340
2019-01-06 15:55:16 +01:00
Jakub Chatrný
a3db3670be Add div wrappers around window controls svg elements (#3392)
Fixes #3372
2019-01-06 15:53:10 +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
CHaBou
6fc24376a2
Fix onCursorMove Term handler (#3330)
Fixes #3317
2018-12-15 22:30:58 +01:00
CHaBou
f3a2f0211d Update xterm to v3.8.0 (#3255) 2018-12-06 15:56:29 -08:00
Jarid Margolin
28f778037b Add scrollback option to config (#3038) 2018-05-29 12:11:21 +02:00
Jiahao Lu
16f163daf3 Adjust clickable region of control buttons (#3017)
On Windows, the close button (rather than the border) is expected to be hit when someone clicks the top-right corner of the screen if a window is maximized.
2018-05-23 22:59:19 +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
Timothy
b680b9e02e Improve update notification contrast (#2791) 2018-04-20 17:03:34 +02:00
CHaBou
f40e32358d
Use xterm winptyCompat addon (#2811)
See https://github.com/xtermjs/xterm.js/pull/1096
2018-04-05 23:53:21 +02:00
CHaBou
f5d48ee38a
Use xterm webLinks addon (#2810)
Fixes #2809
2018-04-05 22:45:18 +02:00
CHaBou
984922d046
Fix Term theme hot reloading (#2771) 2018-03-22 20:59:07 +01:00
CHaBou
269bb8e65f
Improve rendering performance of chars with background (#2769)
Integrate https://github.com/xtermjs/xterm.js/pull/1327 (7c3a30f239)

Fixes #2592
2018-03-18 01:19:26 +01:00
Ben Creasy
7838a10d1a Set showHamburgerMenu enabled by default on Linux (#2666) 2018-03-18 00:59:25 +01:00
CHaBou
429710328a
Integrate xterm v3.2 (#2768)
* Add xterm3.2

Fixes #2751
2018-03-18 00:24:26 +01:00
Timothy
20173f0e86 Migrate styling to styled-jsx (#2761)
Fixes #2737
2018-03-17 13:51:36 +01:00
Lescenco Andrei Bogdan
82c7afbeec Reset splits either side of a divider to an even ratio on double click of the divider #2687 (#2692)
* auto resize panes when dbl click on separator is triggered

* use const instead of let
2018-02-23 12:31:18 +00:00
CHaBou
137db6cdd9
Subpixel with opaque background color 2018-02-18 13:28:26 +01:00
CHaBou
b73a328b6b Add fontWeight and fontWeightBold settings (#2669)
Fixes #2574
2018-02-14 14:09:02 +01:00
CHaBou
887fb5ac1a
Focus term if needed when restoring (#2658)
* Focus term if needed when restoring

* Fix Tab component warnings
2018-02-03 17:00:30 +01:00
Philippe Potvin
dc3155f190
Fix update notification link (#2637)
* distinct urlTags vs notes

* lint fix
2018-01-24 13:23:06 -05:00
CHaBou
f4e32eee49
Cursor api (#2629)
* Add onCursorMove API on Term
2018-01-22 18:12:03 +01:00
CHaBou
87d4c2b37e Fix selectAll command (#2436)
* Fix selectAll command

* Fix typo
2018-01-21 12:21:16 +01:00
Saad Malik
24587b2780 Mac: altIsMeta support (#2623)
* Reimplement altIsMeta supprt with new xterm library

* Update xterm fork to use xtermjs/xterm.js@616958e

* Use node 8 in travis, needed by source-map@0.7.0
2018-01-21 10:19:27 +01:00
CHaBou
97fe79bda4
Put offscreen terms far far away (#2619) 2018-01-17 23:24:10 +01:00
CHaBou
f547f0299d Revert "Fix initial cursor blinking (#2614)" (#2617)
* Revert "Fix initial cursor blinking (#2614)"

This reverts commit 88c7b536a4.

* Use 3.0.2 xterm fork
2018-01-17 13:47:35 +01:00
CHaBou
88c7b536a4 Fix initial cursor blinking (#2614)
* Fix initial cursor blinking

This is a workaround for https://github.com/xtermjs/xterm.js/issues/1194

Fixes #2596

* Add related issue comment
2018-01-16 15:44:29 +01:00
CHaBou
f56ea10fb0 Fix offscreen term size calculation (#2612)
* Fix offscreen term size calculation

* Use positioning rather than opacity
2018-01-15 23:22:54 +01:00
Benjamin Woodruff
ac5c14adca Use xterm.js's fit addon when calling fitResize (#2594)
xterm.js doesn't use `this.term.charMeasure.width` when rendering. It
actually uses:

`Math.floor(this._terminal.charMeasure.width * window.devicePixelRatio)`

This is important, because character widths may be non-integer values,
which means that we can end up with an empty space on the right side of
the terminal window.

Instead of trying to match xterm's behavior, it's probably better if we
just use xterm's `fit` addon. This seems to behave better for me.

We might not want to land this as-is, becuase this addon forces an
annoying hard-coded 17px margin on the right side to compensate for a
scrollbar (see xtermjs/xterm.js#400), but at least for my use-cases,
this is still better than it was.
2018-01-15 18:36:02 +01:00
CHaBou
dd780e6fe7
Xterm v3 integration (#2573) 2018-01-09 17:33:24 +01:00
Daniel Imms
7be41e1e28 Use public API to remove xterm listeners (#2543) 2017-12-16 19:06:02 +01:00
Daniel Imms
421847315d Remove second open arg (#2544)
This was removed in xterm@3, see xtermjs/xterm.js#646
2017-12-11 17:17:01 -05:00
Daniel Imms
15a7e6ad9b Don't use open event on xterm (#2542) 2017-12-11 22:33:03 +01:00
CHaBou
1e6acfc109 Fix color for char under focused BLOCK cursor (#2521) 2017-12-04 22:28:40 +01:00