GithubHelp home page GithubHelp logo

kkpan11 / pokemon-terminal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lazocoder/pokemon-terminal

0.0 2.0 0.0 70.47 MB

Pokemon terminal themes.

License: GNU General Public License v3.0

Python 100.00%
pokemon terminal terminal-theme

pokemon-terminal's Introduction

Pokemon-Terminal

Build Status

Features

  • 719 unique Pokemon
  • Select Pokemon by name or by index number
  • Ability to change the Desktop Wallpaper & the Terminal background
  • Internal search system for finding Pokemon
  • Supports iTerm2, ConEmu, Terminology, Windows Terminal and Tilix terminal emulators
  • Supports Windows, MacOS, GNOME, Openbox (with feh), i3wm (with feh) and sway for desktops

Installation

Install Python 3.7 or higher:

Get a compatible terminal emulator:

You can then proceed with one of the following methods for installation:

pip

Linux users: Your distro might include pip in a different package than Python, make sure to have that installed.

Run pip3 install git+https://github.com/kkpan11/Pokemon-Terminal.git.

Or you can install locally when you add some modifications with pip3 install . at the root of the repo.

If you want a system-wide install, run the command as superuser or administrator.

If you want a per-user install, append the --user flag.

You might want to add the following directories to your PATH on a per-user install, to be able to call pokemon and ichooseyou everywhere:

  • Linux and macOS: ~/.local/bin
  • Windows: (replace X by your Python minor version, for example, 8 for Python 3.8)
    • %AppData%\Python\Python3X\Scripts for a desktop installation of Python;
    • %LocalAppData%\Packages\PythonSoftwareFoundation.Python.3.X_qbz5n2kfra8p0\LocalCache\local-packages\Python3X\Scripts for a Microsoft Store installation of Python (note that there's two X here).

When the command completes, it's installed and ready to go!

poetry

After I migrated the setup.py to pyproject.toml mechanism with poetry settings.

So you also have the way to install/build with it.

Obviously requires to have Poetry installed.

Then just run poetry install or poetry build at the root of the repo to develop or test.

npm

Obviously requires to have Node.js installed.

You can install in any (npm-supported) OS using npm install --global pokemon-terminal. That's it, you're done!

Make sure you also have Python installed, npm won't automagically do that for you.

Distutils

This doesn't works on Microsoft Store installations of Python.

You can clone or download this repo, and run python3 setup.py install at the root of the repo.

If you want a system-wide install, run the command as superuser or administrator.

If you want a per-user install, append the --user flag. Look at the pip directives to add a per-user install to your PATH.

Usage

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.
  -sc, --show-current   show the name of the current pokemon

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
  -fp, --filepath       Identical to --dry-run, but prints only the filepath
                        of the chosen image. Useful for scripting

Not setting any filters will get a completely random pokemon

Example:

Tips, tricks and common issues

iTerm2 settings

You can choose one of two ways:

1. Fixed Profile Setting (Manually)

I highly suggest making the font colors black and the terminal window transparent. Some of the images have both light and dark colours and so it can be difficult to see the text sometimes. Transparency resolves this issue. Since Pokemon-Terminal only changes the background, the transparency must be done manually:

  1. Navigate to iTerm2 > Preferences > Profiles > Window
  2. Set the transparency to about half way.
  3. Hit the "blur" checkbox.
  4. Set the blur to maximum.
  5. Optionally you can set the blending to maximum to adjust the colors to look like the samples provided.

The result should look like this:

2. Generated Dynamic Profile (Dynamically)

Because the pokemon command will choose an image randomly, so the fixed configuration method would not be work on all situations.

Fortunately, iTerm2 provide a Dynamic Profile function that can let us to load different generated profiles.

Use the iterm-theme-generator tool to generate iTerm2 colors based on an image can achive our purpose.

Configurations:

  1. run install command in iTerm2: $ pip install --upgrade iterm-theme-generator
  2. run pokemon command in iTerm2 $ pokemon. This will trigger generating dynamic profile after the background image change. This color theme profile will inherit the default profile from your iTerm2 settings.
  3. Go to the profiles tab and select this new profile as default and restart iTerm. Now, when you update background image with command $ pokemon, iTerm will load it dynamically, so no need to restart again.

ConEmu settings

  1. From the menu under the symbol at left of title bar, navigate to Settings > Main > Background
  2. Set Darkening to maximum (255).
  3. Set Placement to Stretch.
  4. Click Save Settings.
  5. Optionally you apply transparency under Features > Transparency.

Windows Terminal settings

You can, like in iTerm2, enable transparency. Simply press the down arrow in the tab bar and click settings. Once the JSON file opens, add the following settings under the defaults section:

"backgroundImageOpacity": 0.5,
"useAcrylic": true,
"acrylicOpacity": 0.0

The result should look like this:

Adding Custom Images

The folder pokemonterminal/Images/Extra is for adding custom images. You can manually add backgrounds to this folder and they will be visible to the program. Only JPG format is supported. To see a list of all the custom backgrounds type:

$ pokemon -e -dr

Alternatively, you can delete images from this folder and it will not break the program. These are some custom backgrounds:

Solutions for Common Issues

  • If you experience a line at the top of the terminal after changing the Pokemon, you can remove it by typing in the clear command or opening a new terminal.

  • If you are using Tilix and the terminal background is not changing, try adjusting the transparency in your profile settings.

  • If you are experiencing issues with Terminology and are running on Ubuntu, make sure that you have installed the latest version:

    $ sudo add-apt-repository ppa:niko2040/e19
    $ sudo apt-get update
    $ sudo apt install terminology

Saving

iTerm2

To save a background you will need to setup a startup command in the profile:

  1. Navigate to iTerm2 > Preferences > General
  2. Locate the field where it says Send text at start under Command.
  3. In that field type pokemon -n [pokemon name]. You can see an example in the image down below.
    • Alternatively you can also type pokemon for a random theme each time you open up a new terminal.
  4. You can leave out ; clear if you don't care about the line showing up at the top of the terminal.

ConEmu

After setting your desired pokemon, from the menu under the symbol at left of title bar, navigate to Settings > Main > Background and click Save Settings.

Terminology

Terminology already saves it automatically, just untick "temporary" in the settings after setting your desired Pokemon:

To show a random Pokemon each session:

  1. Open ~/.bashrc in your favorite text editor.
  2. Add the following lines to it:
    if [[ "$TERMINOLOGY" -eq "1" ]]; then
        pokemon
    fi

That will simply pick a completely random Pokemon each session, but the pokemon line is simply calling the app, so you can still filter with regions, darkness, and etc. like you normally would, or you can also reset to a preset Pokemon every time you start.

Notes & Credits

  • Nearly all of the Pokemon backgrounds were created by Teej.
  • Originally the images were about 100mb in total but ImageOptim was used to compress them down to about 17mb.
  • Since the images are compressed, some of them may have some mild (but negligible) compression artifacts.
  • Platforms:
    • Thanks to @samosaara for the Linux (GNOME and Terminology) port.
    • Thanks to @jimmyorourke for the Windows (ConEMU and wallpaper) port.
    • Thanks to @sylveon for the Windows slideshow functionality and maintaining the AUR package.
  • Terminal & wallpaper support:
  • Thanks to @DrMartinLutherXing for some bug fixes.
  • Thanks to @joanbono for the easy installation script in the readme.
  • Thanks to @BnMcG for the region specific randomize function.
  • Thanks to @therealklanni for adding the project to npm.
  • Thanks to @connordinho for enhancing the slideshow functionality.
  • Thanks to @cclauss for simplifying the code in the database class and the main class, as well as general code quality fixes.
  • Thanks to @Fiskie for implementing the adapter design pattern, piping commands and more.
  • Thanks to @marcobiedermann for better image compression.
  • Thanks to @kamil157 and @dosman711 for the randomized slideshow function.
  • Thanks to @Squirrels for adding Pokemon from the Unova and Kalos regions.
  • Thanks to @caedus75 for pip and reorganizing the files & folders.

pokemon-terminal's People

Contributors

bnmcg avatar caedumil avatar cclauss avatar connordinho avatar hotelcalifornia avatar iamcarbonman avatar jimmyorourke avatar joanbono avatar kkpan11 avatar kyle-seongwoo-jun avatar ls4154 avatar regenbogencode avatar samuelhnrq avatar squirrels avatar sylveon avatar therealklanni avatar

Watchers

 avatar  avatar

pokemon-terminal's Issues

Check the image links of the README.md

Due to the Imgur Terms of Service Update [April 19, 2023]:
https://help.imgur.com/hc/en-us/articles/14415587638029/

"What are we doing?"

Our new Terms of Service will go into effect on May 15, 2023. We will be focused on removing old, unused, and inactive content that is not tied to a user account from our platform as well as nudity, pornography, & sexually explicit content. You will need to download/save any images that you wish to save if they no longer adhere to these Terms. Most notably, this would include explicit/pornographic content.


I find out that all the images in the README.md file are from Imgur hosting service.
Need to check the images accessibility before they may be deleted.

  • Backup all the images from Imgur
  • Move all the images to GitHub or other safe places

Finally move to GitHub on assets branch, like GitHub pages(gh-pages branch) mechanism.

Generation VI - Kalos Supplement

These are 6 main generations images included in this project, but theGeneration VI - Kalos is lacking the following two pokemons:

  1. 720 - Hoopa
  2. 721 - Volcanion

`pip install .` return a deprecation warning

pip install .
Installing collected packages: pokemon-terminal
  Attempting uninstall: pokemon-terminal
    Found existing installation: pokemon-terminal 1.3.0
    Uninstalling pokemon-terminal-1.3.0:
      Successfully uninstalled pokemon-terminal-1.3.0
  DEPRECATION: pokemon-terminal is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for pokemon-terminal ... done
Successfully installed pokemon-terminal-1.3.0

Deprecate call to setup.py install when wheel is absent for source distributions without pyproject.toml
pypa/pip#8559

Drop setup.py install support
pypa/pip#11874

  • Migrate to pyproject.toml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.