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