[Python] Based on your favorite desktop image, let's automatically create a terminal / Vim / VS Code theme that suits your feelings with one command.

For example, like this

91911058-435f2500-eceb-11ea-98c3-45ee1aab066a-min.png

92177661-e34bb880-ee7b-11ea-83bc-63149f6051bb-min.png

ss2.gif

As long as you have a desktop image you like, you can immediately reflect it with one command.

These are themes that actually generate / reflect an automatic theme based on my desktop image with one command.

(I have about 10 other themes here. Https://github.com/ryuta69/dotfiles)

manner

1: Install Python3

Python is installed by default on Mac, but if not, please install Python 3 from here. https://www.python.org/downloads/

2: Install imagemagick

## MacOS
brew install imagemagick
## Windows
https://imagemagick.org/script/download.php#Download from windows
##Linux series
https://imagemagick.org/script/download.php#Download from unix

3: Install Pywal

git clone https://github.com/dylanaraps/pywal
cd pywal
pip3 install .

4: Try running Pywal

First of all, it is recommended to keep the terminal and vim open so that you can easily see if it was reflected after running. When you're ready, try running the command below.

wal -i xxxxx(Desktop image)

At the moment of execution, did the theme reflect in both terminal and vim like the gif below?

ss2.gif

5: Pywal is designed not to overwrite existing settings (safety), so always load it when the terminal starts

Pywal does not overwrite the existing iTerm settings or vim theme, but the cache is saved under ~ / .cache / wal and the color set is read from here (so it is safe).

So, if you quit iTerm and restart it after reflecting it, you can see that it has returned to the original theme.

To load the theme generated by pywal again from this state, execute the following command.

wal -R

If you add this command to .bashrc or .zshrc, the theme will be loaded automatically every time the terminal starts.

The theme created with Pywal is automatically reflected in Vim and VS Code

Vim installs wal.vim

Please add the following sentence to .vimrc

.vimrc


"" vim-If you are using a plug
Plug 'dylanaraps/wal.vim'
""If you are using dein
call dein#add('dylanaraps/wal.vim')
""If you are using neobundle
NeoBundle 'dylanaraps/wal.vim'

set notermguicolors
colorscheme wal

No other settings are required. This alone will be reflected automatically.

VS Code installs Wal Theme

Please install from here. This alone will be reflected automatically. https://marketplace.visualstudio.com/items?itemName=dlasagno.wal-theme

Evolution 1: Switch themes with one command at any time via fzf

This article is detailed about fzf. Hey, peco is fine, but you can use fzf

# ~/.Assuming that there are many self-made theme folders under theme
#Example: https://github.com/ryuta69/dotfiles/tree/master/dotfiles/.themes
alias swtm='wal -i `ls -d ~/.theme/* | fzf`'

If you type swtm, you will be in the state of selecting the theme list, and if you select it, it will change to that theme immediately. (It is also ant to put ranger in preview. imgcat does not work.)

Development 2: Create themes for Slack, Chrome and Firefox via themer

You can read more about themer in this article. Website "themer.dev" that makes it easy to create color themes such as VSCode, Vim, iTerm, Slack

Since themer has few compatible colors as it is (Accent9 is covered with cursor and text, etc.), pywal is recommended for vim and vscode. However, since the range of compatible apps is very wide, you can reflect the color set to various apps with the combo of "color generation with pywal → magic composition with themer".

The method is to check the 16 color sets from ~ / .cache / wal / colors, access https://themer.dev/, and add the pop-up colors ... This is very annoying as it is needed. So I created a simple pywal → themer conversion PR.

It hasn't been merged yet, but using pywal from this branch will generate a CUI version of themer's config file called colors-themer.js. With this

npm install -g themer @themer/slack @themer/chrome @themer/firefox-addon @themer/vim @themer/vscode

themer -c colors-themer.js \
    -t @themer/slack \
    -t @themer/chrome \
    -t @themer/firefox-addon \
    -t @themer/vim -t @themer/vscode

If so, each theme file will be generated.

Summary (what I wanted to write the most)

As an aside, this category of "creating the appearance of a development environment that makes use of it" is called "UnixPorn / VimPorn" overseas.

Just take a look at Reddit's site, where various people post their UnixPorns. https://www.reddit.com/r/unixporn/

ss.png

** ...... Isn't it the best! ?? No, I really love it too much (ry **

Also take a look at this Pinterest. https://www.pinterest.jp/pin/333196072430758602/

ss 1.png

** No, this is the best book! !! ?? ?? ** ** I was completely addicted to it, and this year I made various my own themes by trial and error, saying "I want to make it myself". But after all I didn't have a sense of design and I wasn't addicted to any of them ... At that time, I came across this pywal. Thanks to pywal, I was able to quickly create a base color scheme, and I was able to make many discoveries and design references.

And finally The first image I gave at the beginning is the hot 1st place of Unix Porn that I longed for https://www.reddit.com/r/unixporn/comments/irl7i5/rectangle_ubersicht_orange_sunset_theme/

The second image I gave at the beginning was able to win the Hot 1st place of VimPorn. https://www.reddit.com/r/vimporn/comments/imlyg6/cowboy_bebop_brown_original_theme/

I would like to conclude the article with a strong and strong feeling, "** UnixPorn is popular in Japan! Please! I want to see other people too! I want to make the development environment feel good! **".

(If you have any questions, please leave a comment. For Requirements, please refer to the official document here](https://github.com/dylanaraps/pywal/wiki/Installation#requirements).)

Recommended Posts

[Python] Based on your favorite desktop image, let's automatically create a terminal / Vim / VS Code theme that suits your feelings with one command.
Steps to create a Python virtual environment with VS Code on Windows
Let's create a customer database that automatically issues a QR code in Python
Create a Python (Django) learning environment with Docker so that you can debug with VS Code (almost your own procedure memo)
Let's create a program that automatically registers ID/PW from CSV to Bitwarden with Python + Selenium
Let's create a script that registers with Ideone.com in Python.
Create a Python environment for professionals in VS Code on Windows
Create a program that can generate your favorite images with Selenium
Create a simple Python development environment with VS Code and Docker
Prepare a Python virtual environment for your project with venv with VS Code
Create a shortcut to run a Python file in VScode on your terminal
Create a dummy image with Python + PIL.
Create a python environment on your Mac
Let's create a free group with Python
Automatically save images of your favorite characters from Google Image Search with Python