Skip to content
Chawye Hsu edited this page Apr 26, 2019 · 5 revisions

Pshazz is designed around the idea of themes. Themes customise the prompt and select plugins to extend your shell's functionality.

Pshazz comes with a few default themes. To see the available themes, type

pshazz list

There aren't many default themes (hint, hint: pull requests welcome!) so if you want something different, read on to find out how to create a custom theme.

Creating a custom theme

To create a new theme, type:

pshazz new mytheme

Of course, you can call your theme whatever you like, but we'll use "mytheme" for this example.

This command creates a new theme in your ~/.config/pshazz/themes directory, based on the default Pshazz theme. Then it opens the theme in a text editor. If you don't like the editor that Pshazz auto-detects, you can change the editor by typing, for example:

pshazz config editor notepad

... replacing "notepad" with whatever command you use to start your favourite editor. (*Note: the editor program needs to be in your path for pshazz to find it).

At this point you might like to take a look at the Theme format page to see what sort of things you can do.

When you're happy with your changes, you can try out your theme:

pshazz use mytheme

Maybe it's not quite right—in that case, type:

pshazz edit mytheme

... to make further changes.

Overriding default themes

If you want to override a default theme, you can use pshazz edit <default-theme-name>. This creates a copy of the default theme.

Deleting a custom theme

If things didn't work out with your custom theme, you can delete it like this:

pshazz rm mytheme

Where's that theme?

If you want to know the path to the theme that will be used when you type pshazz use <name>, you can use pshazz which, e.g.:

pshazz which mytheme
pshazz which default

Downloading themes

If you come up with a cool theme, I hope you'll consider submitting a pull request so that I can include it a default theme with Pshazz.

However, if you don't feel like including your theme in Pshazz, you can also put it on the web (e.g. in a Github Gist) and download it onto other computers.

This example uses the 'msys' theme which is already included with Pshazz, just to show you how this works:

pshazz get https://raw.github.com/lukesampson/pshazz/master/themes/msys.json
pshazz use msys