Home

Awesome

dangerroom

dangerroom is an oh-my-zsh theme that's informative, minimal, and, above all, X-Men themed. It follows design principles meant to focus the user's eye on the terminal's line-by-line command/response cycle.

Like the original Danger Room in the X-Men universe, the dangerroom theme helps you hone and improve your skills.

Design Principles

The information in the terminal can be broken up into 3 main categories:

  1. The command/response cycle, wherein the user enters a command and the system responds.
  2. Extra information the user needs occasionally, such as working directory information or the basic version control state.
  3. Extra extra information, such as the time, the weather, the current logged-in user, the full path to the working directory, or a deeper dive into version control state.

The most important design decision a terminal layout designer can make is how prevalent and visible those 3 categories of data should be for the user.

According to our prioritization, users should always be able to:

  1. easily see the command/response cycle history, keeping it right at their eyeline and simply parseable.
  2. check extra info they occasionally need by simply glancing away from their main eyeline.
  3. get rarely-needed additional information by entering commands only, not by adding further noise to the signal/noise ratio by including this usually-extraneous info within sight in a terminal theme.

The below feature list is how we have gone about implementing this design philosophy.

Features

We implement the design philosophy above using:

Here's more on each.

Minimal Left-Side Prompt

Someone used to the command line can do a reasonable job skimming over the unimportant information to quickly eye the input/output info in a terminal. But it's easier, for new command-line users and experts alike, to keep the following separate:

This is why the left side of the dangerroom theme is for commands and their output only.

Furthermore, vertical information is far easier for the human mind to parse quickly than having to scan both horizontally and vertically.

This is why dangerroom's left-hand prompt is a small symbol that stays affixed to the left-hand side no matter what else changes (e.g., the current working directory's character length). This keeps it stable in the eyeline—see any theme with the working directory on the left side for an example of how much more effortful history parsing becomes when commands are in different vertical columns.

The result of this minimal and consistent left-side prompt is a terminal experience that prioritizes the command/response cycle.

Demonstration of easy-to-parse input/output.

Vital Info Only

When the user does want more information than the input/output from their commands, they can look to the right, where they can see directory and version control information.

Extra info beyond that is always easily obtainable through explicit commands. The user can obtain the current time using the date command, for example, or the full path to the working directory using pwd. Since this information is easily obtainable and rarely used, having it in the user's view provides visual "noise", making the relevant information harder to find, no matter how used to skimming it the user becomes.

On the other side of the spectrum, a bare-minimal theme often fails to provide enough information, making a command-line user have to ask for further information.

This theme strikes a balance between the bare minimum some themes provide and the overwhelming data/noise that many others foist upon their users.

Here are the decisions that strike that balance:

Demonstration that directory and version control changes don't affect the ease of parsing.

Vim Mode Indicator

For those few who use Vim keybindings on the command line, the left-hand symbol changes color when in Normal Mode to help the user track their current Mode. This is useful visual feedback for some users, but it takes up no further space (keeping the history easily parsed), and it doesn't complicate the situation for those who use the default keybindings of their shell and terminal emulator.

Demonstration of Vim Indicator.

Installation

Prerequisites

How To Install

ZSH_THEME="dangerroom"

A similar line should already be in the file—you can change it to look like the above line, instead.

source ~/.zshrc

Additional Setup Recommendations

Fonts and Terminals

Please note that some terminal/font combinations display this theme's symbols either cut off, or at half their normal size, or with simpler emojis than in the examples shown above. Consider experimenting with combining different fighting techniques (terminals and fonts) if you want to hone your powers and survive in a superpowered world (have good-looking emojis).

Better Vim Keybindings Experience

If you like using Vim bindings on the command line, I recommend adding this fantastic zsh plugin. It has many useful Vim-on-the-command-line enhancements, such as vim-surround keybindings and a customizable shortcut for switching to Normal Mode.

Using a non-escape shortcut is useful for those who don't like to or can't easily reach or remap the escape key, or for those who use the escape key for something else, as this author does when using Evil Mode in Emacs.

Current Issues

These are fixable issues—please respond to the Issues on the GitHub repo if you'd like to discuss working on them.

Requires Oh My Zsh

The most likely user not currently supported by this theme is one who has ZSH (the default on Mac) but has not installed Oh My Zsh (which takes a couple extra steps). It should be doable to remove Oh My Zsh code, or replace it with pure Zsh code.

Contributions are welcome.

Does Not Support Other VCSs

It would be nice to support other Version Control Systems, like SVN and Mercurial. For those who are using another VCS, it would take the place of the Git info, so would still adhere to our minimalist philosophy and feature set.

I don't currently have sufficient experience with other VCSs to judge what info users would want under those systems, but contributions from those with more experience with those tools would be quite welcome.

Requires Zsh

This theme could relatively easily be ported to other shells, such as BASH, Fish, or Eshell. The target user of this theme generally hasn't switched shells, so this isn't a high priority, but contributions are still welcome.

Prior Art

Contributing

This project is licensed under the GPL v3. If you'd like to contribute, with ideas or code, please open a GitHub Issue, or check out the open Issues.