Pokemon-Terminal

正值精灵宝可梦大热时期,在逛 GitHub 时发现了一个特别强的东西 —— Pokemon-Terminal

这是一款美化终端的神器,将口袋妖怪与终端完美结合,先上几张图让大家感受一下:

image-20220806214746854

它拥有 719 款 Pokemon 皮肤,可以根据编号或口袋妖怪名字(例如 pikachu)改变,支持 iTerm2、ConEmu、Terminology、Tilix 等终端,同时支持 Windows、MacOS、GNOME、Openbox 和 i3wm。

如果你也是个口袋迷,那么快来给你的终端安上这款皮肤吧!

安装

本项目的 README 上有各种安装方法,这里以 macOS 为例。

首先确保你的电脑已经安装 3.6 及以上版本的 python(最好是 3.6),下面是下载地址

确保有以下终端模拟器中的一种(我用的是 iTerm2)

可以使用以下几种方式安装

这里我使用 npm 安装(确保有 node.js),因为比较简单。

在 iTerm 2 中输入以下命令

npm install --global pokemon-terminal

好了,这就安装成功了,是不是非常简单!

$ pokemon pikachu

皮卡丘,就决定是你了!

深度使用

下面是原项目给出的使用方法:

usage: pokemon [-h] [-n NAME]
               [-r [{kanto,johto,hoenn,sinnoh,unova,kalos} [{kanto,johto,hoenn,sinnoh,unova,kalos} ...]]]
               [-l [0.xx]] [-d [0.xx]]
               [-t [{normal,fire,fighting,water,flying,grass,poison,electric,ground,psychic,rock,ice,bug,dragon,ghost,dark,steel,fairy} [{normal,fire,fighting,water,flying,grass,poison,electric,ground,psychic,rock,ice,bug,dragon,ghost,dark,steel,fairy} ...]]]
               [-ne] [-e] [-ss [X]] [-w] [-v] [-dr] [-c]
               [id]

Set a pokemon to the current terminal background or wallpaper

positional arguments:
  id                    Specify the wanted pokemon ID or the exact (case
                        insensitive) name

optional arguments:
  -h, --help            show this help message and exit
  -c, --clear           Clears the current pokemon from terminal background
                        and quits.

Filters:
  Arguments used to filter the list of pokemons with various conditions that
  then will be picked

  -n NAME, --name NAME  Filter by pokemon which name contains NAME
  -r [{kanto,johto,hoenn,sinnoh,unova,kalos} [{kanto,johto,hoenn,sinnoh,unova,kalos} ...]], --region [{kanto,johto,hoenn,sinnoh,unova,kalos} [{kanto,johto,hoenn,sinnoh,unova,kalos} ...]]
                        Filter the pokemons by region
  -l [0.xx], --light [0.xx]
                        Filter out the pokemons darker (lightness threshold
                        lower) then 0.xx (default is 0.7)
  -d [0.xx], --dark [0.xx]
                        Filter out the pokemons lighter (lightness threshold
                        higher) then 0.xx (default is 0.42)
  -t [{normal,fire,fighting,water,flying,grass,poison,electric,ground,psychic,rock,ice,bug,dragon,ghost,dark,steel,fairy} [{normal,fire,fighting,water,flying,grass,poison,electric,ground,psychic,rock,ice,bug,dragon,ghost,dark,steel,fairy} ...]], --type [{normal,fire,fighting,water,flying,grass,poison,electric,ground,psychic,rock,ice,bug,dragon,ghost,dark,steel,fairy} [{normal,fire,fighting,water,flying,grass,poison,electric,ground,psychic,rock,ice,bug,dragon,ghost,dark,steel,fairy} ...]]
                        Filter the pokemons by type.
  -ne, --no-extras      Excludes extra pokemons (from the extras folder)
  -e, --extras          Excludes all non-extra pokemons

Misc:
  -ss [X], --slideshow [X]
                        Instead of simply choosing a random pokemon from the
                        filtered list, starts a slideshow (with X minutes of
                        delay between pokemon) in the background with the
                        pokemon that matched the filters
  -w, --wallpaper       Changes the desktop wallpaper instead of the terminal
                        background
  -v, --verbose         Enables verbose output
  -dr, --dry-run        Implies -v and doesn't actually changes either
                        wallpaper or background after the pokemon has been
                        chosen

Not setting any filters will get a completely random pokemon

举几个例子,可以根据口袋妖怪的名字改变皮肤

img

同一款皮肤(部分)还可以改变不同的形态

img

还可以自定义图片之类的,自己摸索吧。

终端美化

作者建议更改终端默认的透明度的模糊程度,以达到更好的效果,可以像这样设置:

img

设置之后就会变成这个样子:

img

iTerm 2 的默认功能还是不够强大,可以配置 oh-my-zsh,安装字体库、插件等,如果有需要可以参考这篇文章 iTerm2 + Oh My Zsh 打造舒适终端体验

Have fun !