docs/src/config/main.md
97 lines · 2793 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
8invidious_instance: https://vid.puffyan.us
9max_watch_history: 50
10allow_unicode: false
11message_bar_default: All good :)
12images: Sixels
13refresh_after_modifying_search_filters: true
14image_index: 4
15provider: YouTube
16env:
17 browser: firefox
18 terminal-emulator: konsole -e
19 youtube-downloader: yt-dlp
20 video-player: mpv
21```
22
23<hr>
24
25Below are the description of each of the fields:
26
27### invidious_instance
28
29The 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>.
30
31*Accept: string of a valid url to an Invidious instance*
32
33### max_watch_history
34
35The 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.
36
37*Accept: positive integer below 2<sup>*your CPU architecture*</sup> - 1*
38
39### allow_unicode
40
41Enable unicode in video and playlist names, doing so may cause unwanted behaviors like video name continuing into the info field to the right.
42
43*Accept: `true`/`false`*
44
45### message_bar_default
46
47The default message displayed in the message bar.
48
49*Accept: any string*
50
51### images
52
53How to display thumbnails, if `None` is selected video thumbnails will not be downloaded in the first place.
54
55*Accept: `Sixels`/`HalfBlocks`/`None`*
56
57### refresh_after_modifying_search_filters
58
59Whether to refresh the current search page after search filters are modified
60
61*Accept: `true`/`false`*
62
63### image_index
64
65The index in the array of thumbnail qualities you want to download
66
67Typically these are the avaliable qualities:
68
69|Index|Label|Resolution|
70|---|---|---|
71|0|maxres|1280 x 720|
72|1|maxresdefault|1280 x 720|
73|2|sddefault|640 x 480|
74|3|high|480 x 360|
75|4|medium|320 x 180|
76|5|default|120 x 90|
77|6|start|120 x 90|
78|7|middle|120 x 90|
79|8|end|120 x 90|
80
81Usually 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
82
83*Accept: integer that is a valid index*
84
85### Provider
86
87This changes the `${url}` and `${embed_url}` of videos, allowing you to watch videos from Invidious if it is restricted on YouTube.
88
89(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)
90
91*Accept: `YouTube`/`Invidious`*
92
93### env
94
95Env 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.
96
97*Accept: `string_key: string_value` pairs*