Skip to content

paradox460/paradox-theme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paradox’s Theme

A screenshot of the theme in action

This is the latest revision of my terminal theme, for fish shell. It has evolved over the years to its current form.

Many of its features come from fish shell itself, and are lightly customized here

Features:

Visual Git Status

Current branch, tracking, current sha

Prompt Timestamp

Lets you see when the prompt was rendered

Command Separators

Big thick lines that clearly deliniate when a command started and ended

They also show exit statuses, with support for pipestatus

Full Vim Mode Support

Just add fish_vi_mode to your fish configuration, and everything will work as it should

Customizable Colors

Don’t like my color choices? Pick your own. I try to respect fish colors wherever possible, and have a few custom variables for places it needs to be extended

See Colors for details.

Automatic terminal colors

If you’re using a compatible terminal, your terminal’s colors will be set automatically
See Terminal Color Palettes for details.

Supports Base16-shell

If you use the Base16-shell project’s color schemes, you can use any color scheme they have available. See Base16-shell support for details

Supports light/dark mode

An interface is exposed to allow the theme to swap between two color schemes, depending on light/dark mode settings. See Light/Dark Mode for details

Installation

Fisher (easy)

  1. Install fisher

  2. Run fisher install paradox460/paradox-theme

Manual (not hard)

  1. Clone this repo

  2. Copy or Symlink the files in conf.d to your ~/.config/fish/conf.d directory

  3. Copy or symlink the files in functions to your ~/.config/fish/functions directory

  4. Load a new fish shell up

Colors

Default fish colors are respected, and can be overridden using any means you like; the web interface, your own configuration, or universal variables.

Color variables support the same syntax as set_color The following additional variables are used for colorizing parts of the theme:

paradox_git_prompt_color_hash

This sets the color of the hash display in the git info.

paradox_status_color_normal

The color of a separator when the previous command had a 0 exit status

paradox_status_color_error

Separator color when previous command had a non-zero exit status

You can also set variables for (light|dark)base00-base0F, to tune the color schemes used by this shell.

If you customize your colors, you probably want to set the paradox_disable_scheme_changes variable, otherwise your custom colors could be clobbered.

Base16-shell support

If you have another Base16 theme you like, you can load the shell version of the color scheme, set the BASE16_SHELL_ENABLE_VARS envar, and this theme will now use its colors.

Terminal Color Palettes

The theme will automatically set your terminal’s colors to match the internally used color palette, so that third party programs (such as those that use curses) will render with your colors. If you would like to disable this feature, set the variable paradox_disable_custom_colors to true

Efforts have been made to support a wide range of terminals.

Tmux

If you are using tmux 3.3 or newer, you need to set the allow-passthrough configuration value to on to allow color codes to pass through to the underlying terminal emulator.

Light/Dark Mode

On recent MacOS versions, the theme will automatically switch between Tomorrow and Tomorrow-Night, depending on the current system color mode. This includes automatic color switches with time of day.

The theme will only change colors when the configuration is reloaded, i.e. when launching a new shell. You can set the paradox_refresh_scheme_on_prompt variable to true to cause the theme to be set on every prompt.

Alternatively, you can call paradox_change_color_scheme at any time to check and set the theme based on current conditions.

If you want to lock your theme to one color mode, or are on a non-macos system, set the variable paradox_color_scheme to either light or dark. The theme should automatically refresh whenever this variable is changed

If you are using a custom base16 color scheme, automatic color changing is disabled. If this is something you’d really like to see, open an issue here.

All configuration options

ℹ️
This doesn’t contain color variables. Those are listed under Colors
paradox_color_scheme

light|dark Locks the color scheme, regardless of what the system reports. Changing causes color scheme reevaluation.

paradox_disable_custom_colors

boolean Disables changing terminal colors

paradox_disable_scheme_changes

boolean Disables any color source values, only uses the values currently defined in the base00-base0F variables.

This is useful if you want to use a specific base16 color scheme, but don’t want to load the whole shell script for it.

paradox_refresh_scheme_on_prompt

boolean Triggers a color scheme refresh on every paint of the prompt.

Additionally, the following third-party configuration variables impact this theme:

BASE16_SHELL_ENABLE_VARS

boolean Triggers importing of a base16-shell color scheme, disabling internal color schemes. See Base16-shell support for more information

Useful Functions

paradox_change_color_scheme

Refreshes the color scheme, setting it to the "right" one based on current configurations

paradox_set_colors

Sets the shell colors based on the values currently found in base00-base0F variables. Doesn’t change any color source vars.


Legacy theme

There is an older iteration of this theme, on the v1 branch. It is no longer maintained, and is only useful for reference purposes.

That version of the theme was a bit slower, used older fish features that are now obsolete, and had a few features that never really worked right (such as command timers).