An Interactive Terminal-Agnostic Theme Selection Script

I don’t know about you, but I think that the default look of the terminal is not always the best. And that’s valid if you’re running Linux or macOS.
Sure, some Linux distros apply themes out of the box to the terminal and might switch the shell from bash to zsh, but you always look to rice it up and make it your own.

Now, that might be time consuming if you don’t know exactly what you’re looking for. But there are workarounds that allow you to easily search and apply themes to your terminal.

For example, if you’re using Alacritty you can easily search and apply themes with alacritty-themes. But what if you’re using st, or gnome-terminal, or on macOS? There’s a script for that:

The script comes with more than 400 themes, an interactive theme picker, and it’s terminal agnostic.

NOTE: just like it’s not advised to blindly copy-paste terminal commands you find on the internet, the same way it’s not advised to run a random script. Click on the link above to go to the GitHub page and check the script before using it.

Supported Terminals

  • kitty (not KiTTY)
  • gnome-terminal
  • terminator
  • st
  • (osx)
  • iTerm2
  • alacritty
  • urxvt (non interactively unless the truecolor patch is applied)
  • any libvte based terminal


  • If you’re using Arch ( or an Arch based distro ) you can find and in the AUR
  • If you’re using any other distro use:
    sudo curl -Lo /usr/bin/ '' && sudo chmod +x /usr/bin/
  • If you’re using macOS use: sudo curl -Lo /usr/local/bin/ '' && sudo chmod +x /usr/local/bin/


Once is installed you have a few options through which you can search and apply a theme to your terminal:

  • if you know the exact theme you want to apply you can do that with theme. Example: dracula
  • you can display a list of available dark or light themes with --dark --list or --lght --list. You can also search for a specific theme. Example --dark --list | grep dracula
  • use the interactive theme selection by running -i. NOTE: this requires fzf to be installed.


If you use the script as is, you will apply the theme only to the current session or tab/window. If you restart your Terminal or open a new tab/window your Terminal will use the previous theme.

To apply the last selected theme to all new seassions you’ll have to edit your shell config file. To do that, edit ~/.bashrc or ~/.zshrc ( depending on what shell you’re using ) and add the following code to the end of the file:

if command -v > /dev/null; then
	[ -e ~/.theme_history ] && "$( -l|tail -n1)"

	# Optional

	# Bind C-o to the last theme.
	last_theme() { "$( -l|tail -n2|head -n1)"

	zle -N last_theme
	bindkey '^O' last_theme

	alias th=' -i'

	# Interactively load a light theme
	alias thl=' --light -i'

	# Interactively load a dark theme
	alias thd=' --dark -i'

If you’re using Fish, add the following code to the end of ~/.config/fish/

if type -q
	if test -e ~/.theme_history ( -l|tail -n1)

	# Optional
	# Bind C-o to the last theme.
	function last_theme ( -l|tail -n2|head -n1)

	bind \co last_theme

	alias th=' -i'

	# Interactively load a light theme
	alias thl=' --light -i'

	# Interactively load a dark theme
	alias thd=' --dark -i'

For more info and troubleshooting, check out the project’s page on GitHub.



We don't think that using an adblocker = piracy. That's simply not true. We use and recommend uBlock Origin.

However, as a small non-corporate website, we would appreciate it if you'd consider whitelisting FSM in your adblock of choice.

Alternatively, consider donating using the options below....

Monero (XMR) 43GnqUNJrTi9QyL7kEH8vM8pgWGCE6bjv1FSRipeNMM4TTeNnUVsRBb6MfMpQYxtLE7ReonxVVSXz2rFCEdW5H11LC3x73b
Bitcoin (BTC) 1Hfuq77gKKFJeNcq4EP4dQK3yDRWrFEwJR
Bitcoin Cash (BCH) qzmdm6e6q5wf2p6sxz2mst7cenz60newwc5m4e9js8
Ether (ETH) 0x5f02869278C24A6579d3820f52AD15936D6F9d69
More content?  
Ads Blocker Image Powered by Code Help Pro

Congrats on using an adblocker. We mean it.

Please support us by disabling your AdBlocker or whitelist us.

Thank you! ❤️