Skip to content

Configuration

chokerman edited this page Feb 25, 2024 · 3 revisions

Contents

  1. Jerry Editor
  2. Player
  3. Provider
  4. Subtitle Language
  5. History File
  6. Rofi
  7. Image Preview
  8. Uberzug Settings
  9. Dub
  10. Player Arguments
  11. Manga
  12. JSON Output
  13. Discord RPC

Introduction

Jerry is a posix shell script that scrapes multiple anime sources and which allows you to stream anime with a close integration with anilist.

I have a bad habit of implementing new features before documenting them properly, but I will try to keep this document up to date. If you have any questions, always feel free to open an issue, start a discussion, or contact me directly. I am always happy to help. :)

Jerry Editor

  • The jerry_editor is used to edit the jerry config file
  • By default, this value is set to the $VISUAL environment variable, or $EDITOR if $VISUAL is not set. If neither are set, it defaults to vim
  • You can change this value by setting the jerry_editor variable in your jerry config file (which is located at ~/.config/jerry/jerry_config.txt by default)
  • Both a terminal and graphical editor can be used

Example (using lite-xl):

jerry_editor=lite-xl

To then use this feature, you can run the following command:

jerry -e

or

jerry --edit

Player

  • The player variable is used to set the default player for jerry to use
  • Currently, the only supported player is mpv

Provider

  • The provider variable is used to set the default website for jerry to get video links from
  • By default, this value is set to allanime
  • Here is a list of the currently supported providers:
    • allanime
    • aniwatch
    • yugenanime
    • hdrezka
    • crunchyroll (requires a premium account, refer to the section below for more information)

I am open to pull requests if you would like to add more providers yourself.

Example (using aniwatch):

provider=aniwatch

Subtitle Language

Note: This feature currently only works for aniwatch

  • The subs_language variable is used to set the default subtitle language for jerry to use
  • By default, this value is set to english
  • This variable can be set to any language that is supported by the provider you are using
  • Both the english and English syntaxes are supported

Example (using spanish):

subs_language=spanish

History File

  • The history_file variable is used to set the default history file for jerry to use
  • By default, this value is set to $HOME/.local/share/jerry/jerry_history.txt

Example:

history_file=~/.config/jerry/foo.bar

Rofi

  • The use_external_menu variable is used to tell jerry whether to use rofi or fzf as the selection menu
  • By default, this value is set to false (meaning fzf will be used)
  • The purpose of this feature is to allow you to use rofi as the selection menu, which will allow you to use the script without having to launch a terminal windows
  • Make sure you have rofi installed
  • Accepted values are false and true

Example:

use_external_menu=true

Image Preview

  • The image_preview variable is used to set the default image preview feature for jerry to use

  • By default, this value is set to false

  • The image preview feature allows you to preview the posters of movies and tv shows during the selection process

  • Accepted values are false and true

  • To use this feature:

    • Using fzf:

    • Using rofi:

      • Make sure your rofi configuration has show-icons set to true, otherwise the feature will not work
      • You can specify a specific configuration file to use by setting the image_config_path variable in your jerry config
      • If you would like the menu to look like the one in the screenshot, please checkout the TODO section of the wiki

Example using fzf:

image_preview=true

Example using rofi (with a custom theme):

use_external_menu=true
image_preview=true
image_config_path=~/.config/rofi/styles/launcher.rasi

Ueberzug settings

Here are the settings you can modify for the ueberzug window, that is used in the fzf preview

preview_window_size=50%
ueberzug_x=$(($(tput cols) - 70))
ueberzug_y=$(($(tput lines) / 10))
ueberzug_max_width=100
ueberzug_max_height=100
ueberzug_output=sixel

Dub

  • The dub variable is used to either enable or disable the dub feature
  • By default, this value is set to false, meaning that subs will be used
  • Accepted values are true and false

Example:

dub=true

Player Arguments

  • The player_arguments variable is used to set the default player arguments for mpv to use
  • By default, this value is empty
  • You can set this variable to any valid mpv arguments

Example:

player_arguments="-fs --no-border"

Manga

  • The manga_dir variable is used to set the default directory for jerry to use for manga
  • By default, this value is set to $HOME/.local/share/jerry/jerry-manga

Example:

manga_dir=~/manga
  • The manga_format variable is used to set the default format for jerry to use for manga
  • By default, this value is set to image
  • Accepted values are image and pdf

Example:

manga_format=pdf
  • The manga_opener variable is used to set the default opener for jerry to use for manga
  • By default, this value is set to feh (for images)
  • You can set this variable to any valid image viewer or pdf viewer (just make sure to either have it in your PATH or to specify the full path to the executable)

Example:

manga_opener=zathura

JSON Output

  • The json_output variable is used to set the default output format for jerry to use
  • By enabling this feature, jerry will let you search for an anime and episode, and then output the video, subs links etc. in a json format (this means that you can use jerry as a backend for other scripts)
  • By default, this value is set to 0
  • Accepted values are 0 and 1

Example:

json_output=1

Discord RPC

  • The discord_presence variable is used to either enable or disable the discord rpc feature
  • By default, this value is set to false
  • Accepted values are true and false

Example:

discord_presence=true
  • The presence_script_path variable is used to set the default path to the discord rpc script
  • By default, this value is set to jerrydiscordpresence.py
  • You can set this variable to any valid path to the script

Example:

presence_script_path=~/.config/jerry/discordpresence.py

The jerrydiscordpresence.py script can be found in the jerry repository. The script requires the pypresence and httpx packages to be installed. You can install it by running the following command:

Linux:

pip install --break-dependencies pypresence httpx
sudo curl -sL github.com/justchokingaround/jerry/raw/main/jerrydiscordpresence.py -o /usr/local/bin/jerrydiscordpresence.py &&
sudo chmod +x /usr/local/bin/jerrydiscordpresence.py

macOS:

pip install pypresence httpx
curl -sL github.com/justchokingaround/jerry/raw/main/jerrydiscordpresence.py -o /usr/local/bin/jerrydiscordpresence.py &&
chmod +x /usr/local/bin/jerrydiscordpresence.py

Windows:

py -m pip install pypresence httpx
curl -sL github.com/justchokingaround/jerry/raw/main/jerrydiscordpresence.py -o /usr/bin/jerrydiscordpresence.py
chmod +x /usr/bin/jerrydiscordpresence.py