Skip to content

Seamless Hyper integration

David Refoua edited this page Oct 26, 2023 · 21 revisions

Introduction

Hyper is a terminal emulator built with web-technologies such as xterm.js and Electron.

Hyper has a range of awesome plugins and can be used as an alternative to ConEmu as the terminal emulator.

Here's a demo of Hyper with Cmder:

Cmder on Hyper

 

✅ You can call this installation Hyper Cmder (read Hyper Commander).

Instructions

To run Cmder with Hyper instead of ConEmu, follow these steps:

  1. Download and install the latest version of Hyper for Windows: download page

  2. Follow the instructions in this page to set-up the %CMDER_ROOT% environmental variable
    ✍ Tip: If you already have a working environment variable, skip this step

  3. Open Hyper terminal, then press Ctrl + , (Control-Comma) to open the Preferences settings file.

    ✍ Tip: You can also open the file directly from %userprofile%\.hyper.js.

    The settings file will be opened for edit with your default text editor program.

  4. Navigate to the near end of the configuration file,
    look for and modify the variables according to the values provided below:

    shell: 'cmd.exe',
    shellArgs: ['/k', '[cmder_root]\\vendor\\init.bat'],
    env: { 'TERM':'cygwin' }, // required for git-for-windows

👉 Note: Substitute [cmder_root] with your Cmder installation directory, e.g. C:\apps\cmder or %CMDER_ROOT%.

✍ Tip: Make sure to define the environment variable before using %CMDER_ROOT% as the [cmder_root] portion.

  1. In the plugins array, add the following plugins to use the Monokai color scheme and get a more Cmder-like user interface:
    'hyperterm-monokai',
    'hyper-tab-icons',
    'hyper-statusline',
  1. Additional configuration

    • You can set the tab name as follows:

      shellArgs: ['/k', 'title Cmder & %CMDER_ROOT%\\vendor\\init.bat'],
    • To start Hyper in a custom default directory, you can use the following configuration

      shellArgs: ['/k', 'cd /d D:\\Custom^ Folder & %CMDER_ROOT%\\vendor\\init.bat'],

      ⚠ Note: You must prepend a ^ symbol before all space characters in path, such that C:\Test folder\foo bar\baz becomes C:\\Test^ folder\\foo^ bar\\baz.

      ✍ Tip: Please read this solution for the Powershell profile.

Combining both options

    shellArgs: ['/k', 'cd /d D:\\Custom^ Folder & title Cmder & %CMDER_ROOT%\\vendor\\init.bat'],

Optional shells

Bash shell

You may use a bash shell (available with Cmder full, and/or Cmder mini with Git, Cygwin or WSL:

👉 Note: The bash.exe executable must be present in the %PATH% environment variable.

    shell: '[CMDER_ROOT]\\vendor\\git-for-windows\\bin\\bash.exe', // ... or path to Cygwin/WSL's bash
    shellArgs: ['--login', '-i'],
    env: { 'TERM':'cygwin' },

✍ Tip: If the environment variable doesn't work, replace [CMDER_ROOT] with the actual path (e.g. C:\apps\cmder) to specify the path to Cmder!

Powershell

You can use Powershell instead of Cmder's default cmd/clink shell:

    shell: 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe',
    shellArgs: ['-ExecutionPolicy', 'Bypass', '-NoLogo', '-NoProfile', '-NoExit', '-Command', 'Invoke-Expression [CMDER_ROOT]\\vendor\\profile.ps1'],
    env: { 'TERM':'cygwin' },

✍ Tip: If the environment variable doesn't work, replace [CMDER_ROOT] with the actual path (e.g. C:\apps\cmder) to specify the path to Cmder!

Need more help?

  • Post a comment on the issue here and mention @DRSDavidSoft for help

Guide courtesy of @DRSDavidSoft (David Refoua)