Quine's fork of "Hyper" by Vercel, A terminal built on web technologies
Find a file
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
.circleci CircleCI: Prevent repetitive build job when releasing (#2787) 2018-03-27 00:43:25 +02:00
.github PR template typo: fulfil/fulfill (#3710) 2019-05-31 17:30:30 -04:00
.vscode CLI: use .hyper.js from repo root dir when running in dev mode (#2792) 2018-04-20 17:02:30 +02:00
app Return of the Bell (#2938) 2019-10-03 02:08:40 +02:00
assets Windows titlebar improvements (#1307) 2017-01-10 21:45:49 -08:00
bin Update electron to v1.7.10 and other dependencies (#2583) 2018-01-21 10:21:41 +01:00
build Improve Hyper 3 Canary and Stable icons (#3466) 2019-02-09 14:40:39 +01:00
cli Revert "switch to open (#3788)" 2019-09-11 05:22:19 +02:00
lib Return of the Bell (#2938) 2019-10-03 02:08:40 +02:00
test CLI : Fix package existence check for scoped packages (#3044) 2018-05-23 23:32:38 +02:00
.editorconfig Fix for markdown files (#618) 2016-08-14 21:10:41 +02:00
.eslintignore Ignore dist dir in eslint (#2280) 2017-09-25 12:41:50 +02:00
.gitattributes git: always set js endline to lf (#2795) 2018-04-20 17:04:40 +02:00
.gitignore url are now interpreted by xterm (#3507) 2019-03-03 13:13:50 -05:00
.travis.yml Downgrade electron to v3 (#3420) 2019-01-18 19:03:09 +01:00
.yarnrc Fix pining dependencies with .yarnrc (#2430) 2017-11-05 17:14:10 +00:00
appveyor.yml Downgrade electron to v3 (#3420) 2019-01-18 19:03:09 +01:00
jsconfig.json Disable VSCode type chekcing (#2767) 2018-03-17 18:52:18 +01:00
LICENSE Point Spectrum badge to correct location (#3166) 2018-08-09 13:15:48 +02:00
package.json Setup TypeScript 2019-09-23 17:55:53 +02:00
PLUGINS.md Syntax issue on paragraph #44 (#3578) 2019-06-14 01:28:27 +02:00
README.md Add a way to fix macos compiler error to README.md (#3680) 2019-07-31 00:07:12 +02:00
release.js Fix lint 2017-10-05 21:04:14 +02:00
tsconfig.json Setup TypeScript 2019-09-23 17:55:53 +02:00
webpack.config.js Setup TypeScript 2019-09-23 17:55:53 +02:00
yarn.lock Setup TypeScript 2019-09-23 17:55:53 +02:00

macOS CI Status Windows CI status Linux CI status Changelog #213 Join the community on Spectrum

For more details, head to: https://hyper.is

Usage

Download the latest release!

Linux

Arch and derivatives

Hyper is available in the AUR. Use an AUR package manager like aurman

aurman -S hyper

macOS

Use Homebrew Cask to download the app by running these commands:

brew update
brew cask install hyper

Windows

Use chocolatey to install the app by running the following command (package information can be found here):

choco install hyper

Note: The version available on Homebrew Cask, Chocolatey, Snapcraft or the AUR may not be the latest. Please consider downloading it from here if that's the case.

Contribute

Regardless of the platform you are working on, you will need to have Yarn installed. If you have never installed Yarn before, you can find out how at: https://yarnpkg.com/en/docs/install.

  1. Install necessary packages:
  • Windows
    • Be sure to run yarn global add windows-build-tools from an elevated prompt (as an administrator) to install windows-build-tools.
  • macOS
    • Once you have installed Yarn, you can skip this section!
  • Linux (You can see here what your Linux is based on.)
    • RPM-based
      • GraphicsMagick
      • libicns-utils
      • xz (Installed by default on some distributions.)
    • Debian-based
      • graphicsmagick
      • icnsutils
      • xz-utils
  1. Fork this repository to your own GitHub account and then clone it to your local device
  2. Install the dependencies: yarn
  3. Build the code and watch for changes: yarn run dev
  4. To run hyper
  • yarn run app from another terminal tab/window/pane
  • If you are using Visual Studio Code, select Launch Hyper in debugger configuration to launch a new Hyper instance with debugger attached.
  • If you interrupt yarn run dev, you'll need to relaunch it each time you want to test something. Webpack will watch changes and will rebuild renderer code when needed (and only what have changed). You'll just have to relaunch electron by using yarn run app or VSCode launch task.

To make sure that your code works in the finished application, you can generate the binaries like this:

yarn run dist

After that, you will see the binary in the ./dist folder!

Known issues that can happen during development

Error building node-pty

If after building during development you get an alert dialog related to node-pty issues, make sure its build process is working correctly by running yarn run rebuild-node-pty.

If you are on macOS, this typically is related to Xcode issues (like not having agreed to the Terms of Service by running sudo xcodebuild after a fresh Xcode installation).

Error with c++ on macOS when running yarn

If you are getting compiler errors when running yarn add the environment variable export CXX=clang++

Error with codesign on macOS when running yarn run dist

If you have issues in the codesign step when running yarn run dist on macOS, you can temporarily disable code signing locally by setting export CSC_IDENTITY_AUTO_DISCOVERY=false for the current terminal session.