No description
Find a file
Samuel Henrique Oliveira da Silva c629b414d4 Minor cleanup, killing the daemon
- Now the slideshow daemon on the background may be killed with the -c
option through named pipes (fifo's)
- Minor reformatting again, typos, snake case of some variables, shape
not content
2017-08-12 21:47:40 -03:00
adapter Tilix.py accepts an image_file_path, not a pokemon 2017-07-03 16:48:09 +02:00
Data De-duplication: nidoran*2 --> nidoran-f, nidoran-f 2017-07-01 05:01:56 +02:00
filters More testing 2017-07-06 12:32:27 -03:00
Images Unifies database and adds pokemon types 2017-06-29 13:40:06 -03:00
Samples Upgraded compression 2017-06-24 15:35:15 -04:00
.gitignore Pipe wallpaper applescript directly to osascript 2017-06-21 14:22:11 +01:00
.npmignore Add package manifest for publishing to npm 2017-06-12 12:52:41 -07:00
.travis.yml Upgrades travis to 3.6 2017-07-05 22:59:41 -03:00
database.py Command engine rework 2017-07-04 15:33:23 -03:00
ichooseyou alias added: ichooseyou 2017-06-18 20:19:00 -04:00
LICENSE Initial commit 2017-04-18 14:04:54 -04:00
main.py Minor cleanup, killing the daemon 2017-08-12 21:47:40 -03:00
package.json npm version update 2017-06-18 11:10:29 -04:00
pokemon Updated some comments and added global execution support 2017-04-24 04:18:08 -04:00
README.md Updates readme 2017-07-09 11:45:13 -03:00
scripter.py Adds suggested sanity checks 2017-07-04 10:20:11 -03:00
test_broken.py from test_utils import expected_len 2017-07-04 01:47:07 +02:00
test_database.py Update test_database.py 2017-07-05 10:13:42 +02:00
test_filters.py More testing 2017-07-06 12:32:27 -03:00
test_main.py More testing 2017-07-07 16:03:00 -03:00
test_scripter.py test_adapter_methods() 2017-07-04 13:23:12 +02:00
test_utils.py Fixes testing - Adds extras filter 2017-07-05 22:39:28 -03:00
unittest.py Placate flake8: removed whitespace 2017-07-04 07:02:15 +02:00

Pokemon-Terminal

alt-tag

Sample Set #1 Sample Set #2
alt-tag alt-tag
alt-tag alt-tag
alt-tag alt-tag
alt-tag alt-tag
alt-tag alt-tag
alt-tag alt-tag
alt-tag alt-tag
alt-tag alt-tag
alt-tag alt-tag
alt-tag alt-tag
alt-tag alt-tag
alt-tag alt-tag

Features

  • 493 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, Terminology & Tilix

How to Install

Type python3 -V in your terminal to verify that you have Python 3.6 or later installed.

npm

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

If you do not use npm, or prefer a manual install, continue reading.

Mac OS

  1. Make sure you have Python 3.6 or higher.
  2. Make sure you have iTerm2.
  3. Copy and paste the following for the installation:
    # Pokemon Installation
    git clone https://github.com/LazoCoder/Pokemon-Terminal $HOME/.Pokemon-Terminal
    echo PATH="$HOME/.Pokemon-Terminal:${PATH}" >> ~/.bash_profile
    source ~/.bash_profile
    
  4. If you are using zsh, do the following instead:
    # Pokemon Installation
    git clone https://github.com/LazoCoder/Pokemon-Terminal $HOME/.Pokemon-Terminal
    echo PATH="$HOME/.Pokemon-Terminal:$"PATH"" >> ~/.zshrc
    source ~/.zshrc
    

Linux

  1. Make sure you have Python 3.5+ installed, check the instructions of your distribution.
  2. Make sure you have Terminology or Tilix, again check the package manager of your distribution.
  3. Install
    • If you are a Arch Linux User, you can install it from the AUR package pokemon-terminal-git.
    • Otherwise, copy and paste the following bash script into a terminal for the installation:
    # Pokemon Installation
    git clone https://github.com/LazoCoder/Pokemon-Terminal $HOME/.Pokemon-Terminal
    echo PATH="$HOME/.Pokemon-Terminal:$"PATH"" >> ~/.bash_profile
    source ~/.bash_profile
    

Instructions

Usage

usage: pokemon [-h] [-n NAME] [-r {kanto,johto,hoenn,sinnoh}] [-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}]
               [-ne] [-e] [-w] [-v] [-dr] [-c] [id]

Set a pokemon to the current terminal background or wallpaper

positional arguments:
  id                    Specify the desired pokemon ID

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

  -n/--name NAME        Filter by pokemon which name contains NAME
  -r/--region {kanto,johto,hoenn,sinnoh}
                        Filter the pokemons by region
  -l/--light [0.xx]     Filter out the pokemons darker then 0.xx
  -d/--dark [0.xx]
                        Filter out the pokemons lighter then 0.xx
  -t/--type {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
  -e/--extras           Excludes all non-extra pokemons

Misc:
  -w, --wallpaper       Changes the desktop wallpapper instead of the terminal
                        background
  -v, --verbose         Enables verbose output
  -dr, --dry-run        Implies -v and doesn't actually changes the wallpapper
                        or background after the pokemon has been chosen

Not setting any filters will get a completly random pokemon

Example:

alt-tag

Suggestions

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.

alt-tag

The result should look like this:

alt-tag

Adding Custom Images

The folder 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:

alt-tag

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. alt-tag

  • 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, make sure that you have installed the latest version:

    sudo add-apt-repository ppa:niko2040/e19
    sudo apt-get update
    sudo apt install terminology
    
  • If you get the error: 39:46: syntax error: Expected end of line but found identifier. (-2741). Locate the file ITerm.py in adapter/implementations and on line 7, change "iTerm" to "iTerm2". If you still experience the error, try changing it to "iTerm 2".

Saving

Mac OS

I have not yet implemented a way to save the terminal background to a profile. 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.

alt-tag

Linux

Terminology already saves it automatically, just tick and remove the "temporary" tick in the settings just in case, after setting your desired pokemon (see image below). Terminlogy temporary

However to setup a random pokemon each session do:

  1. Open ~/.bashrc in your favorite text editor.
  2. Make sure your ~/.bashrc file has a guard check for interactive terminals, so you don't try to set the background every possible time bash runs. Place this before any command that may produce any output (again, if you don't have it already, and variable setting, e.g exports don't produce output):
if [[ $- != *i* ]]; then #You might have this already
    return
fi
  1. You may also want to check if terminology is actually running before trying to set the background, so that leads us to
if [[ "$TERMINOLOGY" -eq "1" ]]; then
    pokemon
fi

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.
  • 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 @samosaara for the Linux (GNOME and Terminology) port.
  • Thanks to @charlesmilette for maintaining the AUR package.
  • Thanks to @therealklanni for adding the project to npm.
  • Thanks to @MattMattV for adding Tilix support.
  • Thanks to @connordinho for enhancing the slideshow functionality.
  • Thanks to @cclauss for simplifying the code in the database class and the main class.
  • 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.