Paleta changes terminal colors instantly, regardless of second-hand terminal emulators

Paletta It is a tool for instantly changing the color of the terminal, regardless of the terminal emulator used. It supports VTE terminal emulators (GNOME terminal, Xfce terminal, Mate terminal, Guake, termite, etc.), Konsole, Alacritty, Kitty, Xterm and urxvt (and possibly others).

Its developers describe how Paleta works:

Most terminal emulators support a set of escape sequences that allow modification of the terminal’s palette. Combined with the functions written in all open terminal devices, it can be themed in a truly independent way. Paleta readOn the color list, convert the input into a set of escape sequences, and send these sequences to each open terminal in the system.It also prints the sequence to.

Therefore, for terminal emulators that support color change escape sequences, Paleta can dynamically change the color of all open terminals. This is not permanent, and the terminal that is launched subsequently will use the terminal color you previously set. However, you can make it permanent by adding a simple command (cat ~/.cache/current-palette) To you ~/.bashrc or ~/.zshrc (Or any other Shell you are using) files.

In addition to the Paleta program itself, the GitHub repository also contains more than 150 terminal color palettes that can be used with this tool.

It is worth noting that in addition to the supported terminal emulators mentioned above, Paleta also supports st (simple terminal), but it can only be implemented in the following cases: repair.

You might also like: 179 color schemes for Gtk-based Linux terminals (Gnome terminal, Tilix, Xfce terminal, etc.)

This is a small GIF demo of Paleta I recorded before to show its ability to change the terminal color on the fly using the GNOME terminal:

In this demo, I use Starship (a quick shell prompt written in Rust) as the prompt.

For Arch Linux/Manjaro, there is a Paleta AUR package Can be used to easily install this tool. This will install the Paleta program, but not the palettes available in its GitHub repository.

To install the latest Paletta From Git, make sure you have git Install, then clone the repository (we will clone it as a hidden repository .paleta The folder is placed in your home directory, so in the future we can use the terminal palette in this Git repository to build and install (enter /usr/local/bin) The procedure:

git clone ~/.paleta

cd ~/.paleta


sudo make install

Now you can use Paleta to change the color of all running terminal emulators (we will use nord Terminal palette in this example):

paleta < ~/.paleta/palettes/nord > ~/.cache/current-palette

In this command, I assume that you have cloned the Paleta GitHub repository to ~/.paleta As mentioned above.If not, please adjust the above command to palettes Folder on the system (replace ~/.paleta/palettes/nord In the command).

Or, change the terminal palette to 5peter-dark Subject (from paleta/palettes folder):

paleta < ~/.paleta/palettes/5peter-dark > ~/.cache/current-palette

In the same way, change the terminal palette to Palette/palette folder.

You might also like: Use to display weather forecasts in your terminal

After determining the terminal palette, you can make it permanent by adding the following content (so every time you open the terminal, it will use this palette) cat ~/.cache/current-palette At your ~/.bashrc / ~/.zshrc (Or any other shell you are using).

Insert this line into your ~/.bashrc or ~/.zshrc File and use the following command to get the file (only run the echo cat … command once, because it will add the same line every time it runs without checking whether it already exists):

  • For Bash users:

echo 'cat ~/.cache/current-palette' >> ~/.bashrc

source ~/.bashrc
  • For Zsh users:

echo 'cat ~/.cache/current-palette' >> ~/.zshrc

source ~/.zshrc

You might also like: eDEX-UI: a fully functional sci-fi computer interface inspired by TRON Legacy


Related Posts