docs/src/config/main.md

119 lines · 3423 bytes

  1# The main config
  2
  3The main config file is located in `~/.config/youtube-tui/main.yml`.
  4
  5## Example main.yml
  6
  7```yaml
  8mouse_support: true
  9invidious_instance: https://y.com.sb
 10write_config: Try
 11max_watch_history: 50
 12allow_unicode: false
 13message_bar_default: All good :)
 14images: Sixels
 15refresh_after_modifying_search_filters: true
 16image_index: 4
 17provider: YouTube
 18env:
 19  browser: firefox
 20  terminal-emulator: konsole -e
 21  youtube-downloader: yt-dlp
 22  video-player: mpv
 23```
 24
 25<hr>
 26
 27Below are the description of each of the fields:
 28
 29### mouse_support
 30
 31Whether mouse click events are supports, if `false` then mouse will not do anything to the program.
 32
 33*Accept: `true`/`false`*
 34
 35### invidious_instance
 36
 37The Invidious instance you want to use, a full list of Invidious instances can be found here <a href="https://api.invidious.io" target=_blank>*here*</a>.
 38
 39*Accept: string of a valid url to an Invidious instance*
 40
 41### write_config
 42
 43Whether to write to config after every read, this allows for auto-formatting the config files, as well as removing any error/deprecated options and adding new options.
 44
 45|write_config|Description|
 46|---|---|
 47|`Must`|Always write to config, panics if failed.|
 48|`Try`|Tries to write to config, continues if failed.|
 49|`Dont`|Don't write to config at all|
 50
 51> `main.yml` is a loaded with `Try` no matter what.
 52
 53*Accept: `Must`/`Try`/`Dont`*
 54
 55### max_watch_history
 56
 57The maximum length that the watch history can hold, a value higher will record more items, but will also result in a larger file size in storage.
 58
 59*Accept: positive integer below 2<sup>*your CPU architecture*</sup> - 1*
 60 
 61### allow_unicode
 62
 63Enable unicode in video and playlist names, doing so may cause unwanted behaviors like video name continuing into the info field to the right.
 64
 65*Accept: `true`/`false`*
 66 
 67### message_bar_default
 68
 69The default message displayed in the message bar.
 70
 71*Accept: any string*
 72 
 73### images
 74
 75How to display thumbnails, if `None` is selected video thumbnails will not be downloaded in the first place.
 76
 77*Accept: `Sixels`/`HalfBlocks`/`None`*
 78
 79### refresh_after_modifying_search_filters
 80
 81Whether to refresh the current search page after search filters are modified
 82
 83*Accept: `true`/`false`*
 84
 85### image_index
 86
 87The index in the array of thumbnail qualities you want to download
 88
 89Typically these are the avaliable qualities:
 90
 91|Index|Label|Resolution|
 92|---|---|---|
 93|0|maxres|1280 x 720|
 94|1|maxresdefault|1280 x 720|
 95|2|sddefault|640 x 480|
 96|3|high|480 x 360|
 97|4|medium|320 x 180|
 98|5|default|120 x 90|
 99|6|start|120 x 90|
100|7|middle|120 x 90|
101|8|end|120 x 90|
102
103Usually you don't want to use the max resolution as it will create a large gap between the page being loaded and before the thumbnails are started to get displayed
104
105*Accept: integer that is a valid index*
106
107### Provider
108
109This changes the `${url}` and `${embed-url}` of videos, allowing you to watch videos from Invidious if it is restricted on YouTube.
110
111(Don't always use Invidious if YouTube is working, because first of all the load time if gonna be much slower, and secondly you will be DDoSing Invidious)
112
113*Accept: `YouTube`/`Invidious`*
114
115### env
116
117Env are variables that can be used in `commands.yml`, this allows you to change multiple commands by modifying just one env variable. And not to be confused with system/terminal environment variables, these are just *"a thing"* that you can use in the TUI.
118
119*Accept: `string_key: string_value` pairs*