A multipurpose ZSH theme
- An Unix like Operating system like Linux, MacOS, BSD, Android (Termux) etc or WSL (Windows Subsystem for Linux), cygwin or msys if you want to use in Windows.
- zsh should be installed. See how to install zsh in various platforms.
- oh-my-zsh should be installed. See how to install oh-my-zsh.
- You will need to install any one Nerd font and use it in your terminal for this theme to render the icons correctly.
- Download any of the fonts you like from here.
- Extract the downloaded
.zip
file and copy its contents into a folder in either\usr\share\fonts
or~\.local\share\fonts
.
-
Make sure you are using zsh and execute any one of the following commands given below to install the acenoster theme.
- using git
git clone https://github.com/HimDek/Acenoster-ZSH-Theme.git $ZSH/custom/themes/acenoster
- using wget
wget https://raw.githubusercontent.com/HimDek/Acenoster-ZSH-Theme/master/acenoster.zsh-theme -O $ZSH/custom/themes/acenoster/acenoster.zsh-theme
- using git
-
Enable acenoster theme by editing the
~/.zshrc
file. In that file, change the line containingZSH_THEME="SomeName"
toZSH_THEME="acenoster/acenoster"
.
The following tables show which information are shown in the prompt in sequential order.
- * denotes visible only when applicable.
- ** indicates disabled by default.
- The corresponding oh-my-zsh plugin needs to be enabled in order for its info to be shown.
- To disable an info, either disable its corresponding oh-my-zsh plugin, set its corresponding toggle variable to
0
or unset its corresponding format specifier variable. See how to enable or disable oh-my-zsh plugins. - The default values of toggle and format specifier variables with additional information are given further down.
Info | oh-my-zsh plugin | Toggle variable | Format specifier variable |
---|---|---|---|
Username | ZSH_THEME_ACENOSTER_ALWAYS_SHOW_USER | ZSH_THEME_ACENOSTER_USER_PROMPT_FORMAT | |
Hostname | ZSH_THEME_ACENOSTER_ALWAYS_SHOW_HOST | ZSH_THEME_ACENOSTER_HOST_PROMPT_FORMAT | |
*AWS profile name | aws | ||
Current working directory | ZSH_THEME_ACENOSTER_DIR_PROMPT_FORMAT | ||
*git branch, tracking and local status | git-prompt | ||
** *Mercurial branch, tracking and local status | ZSH_THEME_ACENOSTER_SHOW_HG_PROMPT | ||
*Virtual environment name | virtualenv |
Info | oh-my-zsh plugin | Toggle variable | Format specifier variable |
---|---|---|---|
*Battery percentage and status | ZSH_THEME_ACENOSTER_SHOW_BATTERY | ||
*Last command execution time | ZSH_THEME_ACENOSTER_SHOW_TIMER | ||
Emoji clock | emoji-clock | ||
Digital clock | ZSH_THEME_ACENOSTER_CLOCK_PROMPT_TIME_FORMAT | ||
Calendar | ZSH_THEME_ACENOSTER_CALENDAR_PROMPT_DATE_FORMAT |
Info | oh-my-zsh plugin | Toggle variable |
---|---|---|
*Number of background processes | ZSH_THEME_ACENOSTER_SHOW_BACK_JOBS | |
*Last command return value | ZSH_THEME_ACENOSTER_SHOW_LAST_RETURN | |
*Vi normal mode indicator | vi-mode | ZSH_THEME_ACENOSTER_SHOW_VI_MODE |
Below are the default values of environment variables used by this prompt. To customize any of them, unset or set a new value in the ~/.zshrc
file.
ZSH_THEME_ACENOSTER_ALWAYS_SHOW_USER=1
ZSH_THEME_ACENOSTER_ALWAYS_SHOW_HOST=1
ZSH_THEME_ACENOSTER_SHOW_HG_PROMPT=0
ZSH_THEME_ACENOSTER_SHOW_BATTERY=1
ZSH_THEME_ACENOSTER_SHOW_TIMER=1
ZSH_THEME_ACENOSTER_SHOW_BACK_JOBS=1
ZSH_THEME_ACENOSTER_SHOW_LAST_RETURN=1
ZSH_THEME_ACENOSTER_SHOW_VI_MODE=1
- See this to know which is what.
- Turning off
ZSH_THEME_ACENOSTER_ALWAYS_SHOW_USER
which is on by default will hide the user name unless it is root or in an SSH shell. - Turning off
ZSH_THEME_ACENOSTER_ALWAYS_SHOW_HOST
which is on by default will hide the host name unless it is in an SSH shell. - Turning on
ZSH_THEME_ACENOSTER_SHOW_HG_PROMPT
which is off by default will enable the mercurial info of the prompt. Mercurial is a SCM (Source Control Management) tool just like git. Although not as popular as git, it is still used in many projects. ZSH_THEME_ACENOSTER_SHOW_BATTERY
which is on by default is the toggle for the battery capacity icon and percentage in the prompt.ZSH_THEME_ACENOSTER_SHOW_TIMER
which is on by default is the toggle for the timer that shows the time taken by the previous command run in the terminal.ZSH_THEME_ACENOSTER_SHOW_VI_MODE
which is on by default is the toggle for the Vi normal mode inicatorZSH_THEME_ACENOSTER_SHOW_BACK_JOBS
which is on by default is the toggle for the indicator that shows if any background process is running in the current terminal.ZSH_THEME_ACENOSTER_SHOW_LAST_RETURN
which is on by default is the toggle for the indicator that shows if the last command exited with a non zero return value.
ZSH_THEME_ACENOSTER_USER_PROMPT_FORMAT="%n"
ZSH_THEME_ACENOSTER_HOST_PROMPT_FORMAT="%m"
ZSH_THEME_ACENOSTER_DIR_PROMPT_FORMAT="%~"
ZSH_THEME_ACENOSTER_CLOCK_PROMPT_TIME_FORMAT="%I:%M %P"
ZSH_THEME_ACENOSTER_CALENDAR_PROMPT_DATE_FORMAT="%a %b %d"
- See this to know which is what.
- If you don't want to see any of these info in the prompt, then unset the corresponding variable by inserting a line with the command
unset variableName
into the~/.zshrc
file.
ZSH_THEME_ACENOSTER_FLUENT_FLOW=1
ZSH_THEME_ACENOSTER_LESS_ICONS=0
ZSH_THEME_ACENOSTER_COMPACT=0
- Enabling
ZSH_THEME_ACENOSTER_FLUENT_FLOW
which is enabled by default shows the connecting words likeat
,in
,took
,on
etc in a dull color between different parts of the prompt to make them seem connected and unified while not being too intrusive. - Enabling
ZSH_THEME_ACENOSTER_LESS_ICONS
, which is disabled by default will show only those icons in the prompt that indicate a status. - Enabling
ZSH_THEME_ACENOSTER_COMPACT
which is disabled by default will remove the empty line before every prompt.
ZSH_THEME_ACENOSTER_BATTERY_HIGH=80
ZSH_THEME_ACENOSTER_BATTERY_LOW=40
ZSH_THEME_ACENOSTER_BATTERY_CRIT=20
COLOR_AWS="%{$FG[130]%}" # Used by the AWS icon and profile name text.
COLOR_GIT="%{$FG[203]%}" # Used by the git icon and branch name text.
COLOR_HG="%{$FG[244]%}" # Used by the mercurial icon and branch name text.
COLOR_BATTERY_FULL="%{$FG[040]%}" # Used by the battery full icon and "100%" text.
COLOR_BATTERY_NORMAL="%{$fg[cyan]%}"
COLOR_DULL="%{$fg[black]%}"
COLOR_RED="%{$fg[red]%}"
COLOR_GREEN="%{$fg[green]%}"
COLOR_BLUE="%{$fg[blue]%}"
COLOR_YELLOW="%{$fg[yellow]%}"
COLOR_RESET="%{$reset_color%}"
COLOR_BATTERY_NORMAL
is the color used by the battery icon and percentage text when it is between the values ofZSH_THEME_ACENOSTER_BATTERY_HIGH
andZSH_THEME_ACENOSTER_BATTERY_LOW
as set in Battery levels section.COLOR_DULL
is the color used by the connecting words likeat
,in
,took
,on
etc shown between different parts of the prompt whenZSH_THEME_ACENOSTER_FLUENT_FLOW
is enabled as described here.- Other colors are used by several parts of the prompt to indicate different states in general.
▲ Default prompt showing all possible information
▲ Same as above but with ZSH_THEME_ACENOSTER_LESS_ICONS
turned on: