- Terminal is a handy tool for giving your Mac commands although many may be intimidated by it. After all, it’s not as easy as just typing in a sentence and your Mac responding. We have some articles listed below that can help you with common commands if you’re interested in learning to use Terminal or if you just want to enter a command or two.
- Download Citrix Workspace app for Mac Download Citrix Workspace app for Mac (237 MB -.dmg) Version: 20.10.0.16 (2010) Checksums SHA256.
- Download Iterm For Mac Os X
- Download Iterm For Windows
- Download Iterm For Mac
- Mac Pro Iterm Dracula
- Macos Iterm
Which is part of my di - download & install repo, which will do this for 300+ Mac apps. Di-iterm.sh uses the official Sparkle / XML feed to check for the latest version, and there are ways to use the beta or nightly builds if you prefer one of those options.
Outline
I try to write how to configure the development environment from very first time on Mac. this blog is a series. if you want to know other development environment, see other blog posts.
in here, I’ll introduce how to configure iTerm and zsh on Mac.
iTerm Installation
click the link below to go to
iTerm
download page.- iTerm download: Download
you can see the screen like below, click
Stable Releases
to download.unzip
zip
file you downloaded and install it.if iTerm asks you
Full Disk Access
permission, click Open System Preferences
on the right bottom.you can see the nice explanation and
Security & Privacy
is activated. click the lock shape on the left bottom, and insert your password to make editable.select
Privacy
on the top tab, and click Full Disk Accesss
on the left list.click
+
button on the right side. go to Applications
, and select iTerm
and click Open
.if Mac asks you that you want to quit
iTerm
, click Quit Now
to quit iTerm
.after it, check iTerm is executed.
zsh
zsh makes Terminal easier to use. if you want to know more details, click the link below.
![Download Iterm For Mac Download Iterm For Mac](/uploads/1/3/4/4/134414991/126302641.png)
- zsh official site: zsh
you can find the installation on zsh official site like below.
open iTerm or Terminal and execute the command below.
after installing, you can see the screen like below.
Configure zsh to iTerm Default Terminal
iTerm’s default is to use the basic shell. let’s set iTerm uses basically zsh.
execute iTerm and click
iTerms2
> Preferences...
on the left top.you can see the screen like above. click
Profiles
tab on the top. insert /bin/zsh
in Command
on Command
section on the right middle.after it, restart iTerm. you can see
zsh
is executed by default.Configure iTerm Theme.
there are many themes for iTerm. you can configure the theme what you want. in here, I’ll introduce how to set
iterm2-solarized
theme.click the link below to download the theme.
when you click the link above, you can see the theme file contents. push
command + s
to save it.before you download it, change to
All Files
on Format
on the bottom. and check the end of the file is .itermcolors
.open Preferences of iTerm again.
click
Profiles
> Colors
like above, and click Color Preset...
> import...
on the right bottom.select
Solarized Dark - Patched.itermcolors
file you downloaded above.select
Color Preset...
again, you can see Solarized Dark
. click it to change the theme.Configure Powerlevel9k
to show more information on zsh, let’s configure
Powerlevel9k
. you can see the screen like below, when you execute current iTerm.execute the command below to download
Powerlevel9k
.zsh’s configuration file is
~/.zshrc
. open it and set Powerlevel9k.find the theme configuration.
change the theme from
ZSH_THEME='robbyrussell'
to ZSH_THEME='powerlevel9k/powerlevel9k'
and save it.to restart iTerm, you can see the screen like below.
you can see user information and
?
. the question mark is shown up when the font is not set. click the link below to go to the font download site.when you click the link above, you can see the screen lik below. click
View Raw
to download the font.after downloading it, click the font file to execute it.
click
Install Font
on the right bottom to install it. after installing, open Preference on iTerm again and click Profiles
> Text
> Change Font
.select
Meslo LG M Regular for Powerline
what we downloaded above.when you execute iTerm, you can see the screen like above.
I don’t like to show my long username, so I configured it not showing up. execute the command below if you want to hide it.
add the content below to the bottom.
or you can customize it like below.
you can see the details about the option on the official site.
- official site: https://github.com/bhilburn/powerlevel9k
restart iTerm. you can see the user name not displayed.
Connect vscode and zsh
in here, we’ll set
code
command of vscode on zsh, and zsh to vscode’s default terminal on vscode.Configure vscode command to zsh
execute the command below to open zsh configuration file.
add the content below to the bottom of the settings file.
restart iTerm and execute the command below to check vscode activated.
Configure zsh to vscode
click
Code
> Preferences
> Settings
on the left top of the vscode.search
shell
and change /bin/bash
to /bin/zsh
on Terminal > Integrated > Shell: Osx
.if you see
Edit in settings.json
instead of the screen above, click the link and add the content below.also, search
fontfamily
and set Meslo LG M for Powerline
on it like below.after it, to execute Terminal on vscode, you can see zsh executed.
Github Sponsor
Was my blog helpful? Please leave a comment at the bottom. it will be a great help to me!
Installation
latest version: 3.0.264-bit | |
macOS (.app) | 3.0.2 |
Windows (.exe) | 3.0.2 |
Debian (.deb) | 3.0.2 |
Fedora (.rpm) | 3.0.2 |
Other Linux distros (.AppImage) | 3.0.2 |
Project Goals
The goal of the project is to create a beautiful and extensible experience for command-line interface users, built on open web standards. In the beginning, our focus will be primarily around speed, stability and the development of the correct API for extension authors.
In the future, we anticipate the community will come up with innovative additions to enhance what could be the simplest, most powerful and well-tested interface for productivity.
Extensions
Extensions are available on npm. We encourage everyone to include
hyper
in the keywords
field in package.json
.Then edit
.hyper.js
and add it to plugins
Hyper
will show a notification when your modules are installed to .hyper_plugins
.Keymaps
All command keys can be changed. In order to change them, edit
.hyper.js
and add your desired change to keymaps
. Then Hyper will change the default with your custom change.
Example:
'window:devtools': 'Cmd+Alt+O'
Default keymaps:
Configuration
Config location
macOS | ~/Library/Application Support/Hyper/.hyper.js |
Windows | $Env:AppData/Hyper/.hyper.js |
Linux | ~/.config/Hyper/.hyper.js |
Note: config at
~/.hyper.js
still supported, but will be ignored, if config in application directory present. Otherwise it will be moved to the application directory at first run.The
config
object seen above in.hyper.js
admits the followingProperty | Default | Description |
updateChannel | 'stable' | The update channel to receive updates from |
fontSize | 12 | The default size in pixels for the terminal |
fontFamily | 'Menlo, DejaVu Sans Mono, Lucida Console, monospace' | The font family to use with optional fallbacks |
uiFontFamily | '-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, ...' | The font family to use for the UI with optional fallbacks |
fontWeight | 'normal' | The default font weight: 'normal' or 'bold' |
fontWeightBold | 'bold' | The font weight for bold characters: 'normal' or 'bold' |
cursorColor | 'rgba(248,28,229,0.8)' | The color of the caret in the terminal |
cursorAccentColor | '#000' | The text color under BLOCK cursor |
cursorShape | 'BLOCK' | The shape of the caret in the terminal. Available options are: 'BEAM', 'UNDERLINE', 'BLOCK' |
cursorBlink | 'false' | If true, cursor will blink |
foregroundColor | '#fff' | The color of the main text of the terminal |
backgroundColor | '#000' | The color and opacity of the window and main terminal background |
selectionColor | 'rgba(248,28,229,0.3)' | The background color/opacity of the text selection in terminal |
borderColor | '#333' | The color of the main window border and tab bar |
css | ' | Custom CSS to include in the main window |
padding | '12px 14px' | CSS padding values for the space around each term |
colors | { black: '#000000', red: '#ff0000', ... } | A list of overrides for the color palette. The names of the keys represent the 'ANSI 16', which can all be seenin the default config. |
shell | ' | A path to a custom shell to run when Hyper starts a new session |
shellArgs | '['--login']' | An array of shell arguments |
env | {} | An object of environment variables to set before launching shell |
windowSize | [540, 380] | The default width/height in pixels of a new window |
scrollback | 1000 | The number of rows to be persisted in terminal buffer for scrolling |
copyOnSelect | false | If true, selected text will automatically be copied to the clipboard |
quickEdit | false | If true, on right click selected text will be copied or pasted if no selection is present (true by default on Windows) |
defaultSSHApp | true | If true, Hyper will be set as the default protocol client for SSH |
modifierKeys | {altIsMeta: false} | Change the behaviour of modifier keys to act as meta key |
showHamburgerMenu | true on Linux/Windows, false on macOS | Change the visibility of the hamburger menu. Available options are: true, false |
showWindowControls | ' | Change the position/visibility of the window controls. Available options are: true, false, 'left' |
Extensions API
Extensions are universal Node.js modules loaded by both Electron and the renderer process.
The extension system is designed around composition of the APIs we use to build the terminal:
React
components andRedux
actions.Instead of exposing a custom API method or parameter for every possible customization point, we allow you to intercept and compose every bit of functionality!
The only knowledge that is therefore required to successfully extend
Hyper
is that of its underlying open source libraries.You can find additional details about plugin developmentin the Hyper repository.
Your module has to expose at least one of these methods:
Method | Invoked from | Description | ||||||
onApp | Electron | Invoked when the app first loads. If a plugin reloads, it's invoked again with the existing app. Parameters:
| ||||||
onWindow | Electron | Invoked when each window is created. If a plugin reloads, it's invoked again with the existing windows. Parameters:
| ||||||
onUnload | Electron | Invoked when a plugin is removed by the user. Parameters:
| ||||||
decorateConfig | Electron / Renderer | v0.5.0+. Allows you to decorate the user's configuration. Useful for themeing or custom parameters for your plugin. Parameters:
| ||||||
decorateEnv | Electron | v0.7.0+. Allows you to decorate the user's environment by returning a modified environment object. Parameters:
| ||||||
decorateMenu | Electron | Invoked with the Electron's Menu template. If a plugin reloads, it's called again and the menu is refreshed.Parameters:
| ||||||
decorateBrowserOptions | Electron | Allows you to decorate Electron's BrowserWindow options when a new window is created.Parameters:
| ||||||
onRendererWindow | Renderer | Invoked when a plugin is first loaded or subsequently reloaded in each window. Parameters:
| ||||||
middleware | Renderer | A custom Redux middleware that can intercept any action. Subsequently we invoke the thunk middleware, which means your middleware cannext thunks. | ||||||
reduceUI reduceSessions reduceTermGroups | Renderer | A custom reducer for the ui ,sessions or termgroups state shape.
| ||||||
getTabsProps | Renderer | Passes down props from <Tabs> to the <Header> component. Must return the composed props object.
| ||||||
getTabProps | Renderer | Passes down props from <Tab> to the <Tabs> component. Must return the composed props object.
| ||||||
getTermGroupProps | Renderer | Passes down props from <Terms> to the <TermGroup> component. Must return the composed props object.
| ||||||
getTermProps | Renderer | Passes down props from <TermGroup> to the <Term> component. Must return the composed props object.
| ||||||
mapHyperState mapTermsState mapHeaderState mapNotificationsState | Renderer | A custom mapper for the state properties thatcontainer componentsreceive. Note that for children components to get these properties, you have to pass them down using the corresponding methods (like getTermProps ).Must return an extended object of the map passed.
| ||||||
mapHyperDispatch mapTermsDispatch mapHeaderDispatch mapNotificationsDispatch | Renderer | A custom mapper for the dispatch properties. Must return an extended object of the map passed.
| ||||||
decorateHyper decorateNotifications decorateNotification decorateHeader decorateTabs decorateTab decorateTerms decorateTermGroup decorateSplitPane decorateTerm | Renderer | Invoked with the React Component to decorate. Must return a Higher Order Component.Parameters:
|
Module loading
The user can hot-load and hot-reload plugins by pressing Command + R (refresh). Please strive to make plugins that don't require a complete restart of the application to work.
Notice
Plugins affecting the `BrowserWindow` will the effect on new windows after hot-reload.
In the future we might do this automatically.
When developing, you can add your plugin to
.hyper_plugins/local
and then specify it under the localPlugins
array in.hyper.js
. We load new plugins:- Periodically (every few hours)
- When changes are made to the configuration file (
plugins
orlocalPlugins
) - When the user clicks Plugins > Update all now
The process of reloading involves
- Running
npm prune
andnpm install
in.hyper_plugins
. - Pruning the
require.cache
in both electron and the renderer process - Invoking
on*
methods on the existing instances and re-rendering components with the fresh decorations in place.
Plugins location
macOS | ~/Library/Application Support/Hyper/.hyper_plugins |
Windows | $Env:AppData/Hyper/.hyper_plugins |
Linux | ~/.config/Hyper/.hyper_plugins |
Note: plugins at
~/.hyper_plugins
still supported, but will be ignored, if plugins in application directory present. Otherwise they will be moved to the application directory at first run.Note: on the main process, plugins are registered as soon as possible (we fire
onLoad
). On the browser, it's up to the user to trigger their load by pressing command+R. We put the user in control of the loading in this way to prevent them from losing critical work by extensions that reset state or don't preserve it correctly.Decorating components
We give you the ability to provide a higher order component for every piece of the
Its structure is as follows:
Hyper
UI.Its structure is as follows:
All the
decorate*
methods receive the following references in an object passed as the second parameter:React | The entire React namespace. |
notify | A helper function that shows a desktop notification. The first parameter is the title, the second is the optional body of the notification, and the third is another optional parameter which can be used to log details to the development console. To pass these details, simply provide and object with an error property containing the information to log. |
Notification | The Notification component in case you want to re-use it. |
All the components accept the following two properties to extend their markup:
customChildren | An array of Element or a singleElement to insert at the bottom of the component. |
customChildrenBefore | The same as the above property, but inserted as the first child element(s) of the component. |
![Download Download](/uploads/1/3/4/4/134414991/747602240.jpg)
Your higher order component can supply a
onDecorated
property to the decorated component to get a reference to its instance.Your Term higher order component can supply an
onCursorMove
handler property that be called when cursor has moved with an object parameter representing its relative position to Term origin:x | Horizontal position in pixels |
y | Vertical position in pixels |
width | Cursor width in pixels |
height | Cursor height in pixels |
col | Horizontal position in columns |
row | Vertical position in rows |
We encourage you to maintain compatibility with other decorators. Since many can be set, don't assume that yours is the only one.
For example, if you're passing children, compose potential existing values:
Or if you use
onDecorated
propertyActions and Effects
Download Iterm For Mac Os X
All theRedux actionsare available for you to handle through your middleware and reducers. For an example, refer to the Hyperpowerreference plugin.
Side effects occur in two fundamental forms:
- Some actions dispatch other actions based on state.
- Some actions do async work by communicating over the RPC channel to the main process
In all cases, the side effect is passed as the
effect
key in the action and later handled by our middleware.Download Iterm For Windows
This means that you can override, compose or completely eliminate effects! In other words, this is how you can change the default functionality or behavior of the app.
As an example, consider the action we use to increase the font size when you press
Command+=
:The underlying terminal
Hyper
achieves a lot of its speed and functionality thanks to the power ofxterm.jsAdditional APIs
The Electron
app
objects are extended with the following properties:config | An Object with the config block from.hyper.js . |
plugins | An Object with helpers for plugins. |
getWindows | A Function that returns an Set of all the open windows. |
createWindow | A Function that will create a new window. Accepts an optional callback that will be passed as the new window's init callback. |
Electron
BrowserWindow
objects are extended with the following parameters:rpc | An EventEmitter that allows for communication with the window process. |
sessions | A Map of Session objects which hold the communication with each term's pty.. |
Renderer windows are similarly extended with:
rpc | An EventEmitter that allows for communication with the window process. |
store | The Redux Store object. This allows access todispatch actions or read the global state withgetState . |
The
rpc
object is symmetrical between browser and renderer process. The API is the same as Node.js, with the exception that it only admits a single object as its parameters only:Example theme: Hyperyellow
The following extension simply alters the config to add CSS and yellow colors! Here's thecode.
Themes are simply plugins! Only one hook,
decorateConfig
is needed:I grabbed the class names by inspecting the term with Devtools, which you can trigger from
View -> Toggle Developer Tools
. When you do so, notice that some classes are automatically generated and followed by a random nonce (e.g.: term_13hv8io
). Ignore those: they change with every new window!Download Iterm For Mac
Notice the emphasis on playing nice with other extensions. Specifically, we create a new object, extend only the keys we are interested in, and we compose the CSS to preserve the user's setting and that of other authors':
Example extension: Hyperpower
The following extension renders particles as the caret moves:
Mac Pro Iterm Dracula
Let's walk throughits code.
First, we intercept the Redux action
First, we intercept the Redux action
SESSION_ADD_DATA
. You can find the full list of actionsin the repository.Macos Iterm
Notice that we don't re-dispatch the action, which means we never render the output of the command to the terminal. Instead, we dispatch an action of our own, which we grab in the
uiReducer
and later map:We then want to decorate the
<Term>
component so that we can access the underlying caret.However,
<Term>
is not a container that we can map props to. So we use getTermProps
to pass the property further down:The extension thenreturnsa higher order component to wrap
<Term>
. Notice we pass the onDecorated
property to access the base Term component and its DOM ref, and theonCursorMove
property to use Hyper cursor API: