Use Pywal To Generate Colorschemes From Your Wallpaper For Vim And Your Terminal
Linux is, right now, the most customizable operating system on the market. It has hundreds of window managers, compositors, GTK themes, QT themes, Terminal emulators, and desktop environments. Yet, customization can be a little hard. It can often take hours, or even days to get everything set up how you like it. That doesn’t have to be the case. Pywal is a super easy tool that allows you to customize terminal color schemes, Vim, and various window managers. I am going to walk you through installing, getting, and applying a Pywal theme for your vim and your terminal emulator.
Out of Ubuntu, Fedora, and Arch, Pywal is only available on Arch based distros through the community repository. So, if you are on an Arch based distro, use this command if you have the community repository enabled.
sudo pacman -S python-pywal
But, if you are on Ubuntu, Debian, or Fedora, you can install it using these two commands.
sudo apt install python3-pip
sudo dnf install python3-pip
Ubuntu/Debian and Fedora
sudo pip3 install pywal
Getting your theme
To get your Pywal theme, it is as simple as using this command, making sure to supply the path to the image.
wal -i /PATH/TO/IMAGE
You should see that your terminal colorscheme change. But you will still need to apply it for it to work on your other terminals.
Terminals that use Xresources (xst, urxvt) should work out of the box, but other terminals will not work after the first time. If you use Konsole, Kitty, st, PuTTY, or Alacritty, you can go to THIS link and learn how to apply them manually. But, if not, you can simply put this line in your .bashrc, .zshrc, or other startup file.
(cat ~/.cache/wal/sequences &)
Assuming that you have Vim Plug installed, you can add this line to your .vimrc, with the rest of your plugins.
Then, you just add this to the bottom of your .vimrc
Keeping the changes persistent
Unless you want the changes to only be temporary, you should add this line to your .xinitrc.
If you would like to take a lot of the work out of having a stunning Linux desktop, Pywal is a great tool. It always seems to generate the best, most usable colorschemes from the most basic of wallpapers. It allows you to have a desktop on par with those Linux “Ricers”, without having to look for a bunch of nieche themes from sketchy websites. And best of all, you don’t have to use a wallpaper that matches your theme, even if it looks like crap.