docs/src/config/main.md
173 lines · 4850 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://invidious.fdn.fr
10write_config: Try
11allow_unicode: true
12message_bar_default: All good :)
13images: Sixels
14refresh_after_modifying_search_filters: true
15syncing:
16 download_images: true
17 sync_channel_info: true
18 sync_channel_cooldown_secs: 86400
19 sync_videos_cooldown_secs: 600
20limits:
21 watch_history: 50
22 search_history: 75
23 commands_history: 75
24image_index: 4
25provider: YouTube
26search_provider: RustyPipe
27shell: sh
28legacy_input_handling: false
29env:
30 video-player: mpv
31 download-path: ~/Downloads/%(title)s-%(id)s.%(ext)s
32 terminal-emulator: konsole -e
33 youtube-downloader: yt-dlp
34 save-path: ~/.local/share/youtube-tui/saved/
35 browser: firefox
36```
37
38<hr>
39
40Below are the description of each of the fields:
41
42### mouse_support
43
44Whether mouse click events are supports, if `false` then mouse will not do anything to the program.
45
46*Accept: `true`/`false`*
47
48### invidious_instance
49
50The 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>.
51
52*Accept: string of a valid url to an Invidious instance*
53
54### write_config
55
56Whether 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.
57
58|write_config|Description|
59|---|---|
60|`Must`|Always write to config, panics if failed.|
61|`Try`|Tries to write to config, continues if failed.|
62|`Dont`|Don't write to config at all|
63
64> `main.yml` is a loaded with `Try` no matter what.
65
66*Accept: `Must`/`Try`/`Dont`*
67
68
69### allow_unicode
70
71Enable unicode in video and playlist names, doing so may cause unwanted behaviors like video name continuing into the info field to the right.
72
73*Accept: `true`/`false`*
74
75### message_bar_default
76
77The default message displayed in the message bar.
78
79*Accept: any string*
80
81### images
82
83How to display thumbnails, if `None` is selected video thumbnails will not be downloaded in the first place.
84
85*Accept: `Sixels`/`HalfBlocks`/`None`*
86
87### refresh_after_modifying_search_filters
88
89Whether to refresh the current search page after search filters are modified
90
91*Accept: `true`/`false`*
92
93### download_images
94
95Whether to download images for all subscription videos
96
97*Accept: `true`/`false`*
98
99### sync_channel_info
100
101Whether to also request an updated version of the channel info when syncing feeds. Disabling this halves the number of requests sent to Invidious, but channel info will not be updated (the videos will).
102
103*Accept: `true`/`false`*
104
105### sync_channel_cooldown_secs
106
107Sync all do not sync channel info if it has been synced in the past *n* seconds.
108
109*Accept: integer value seconds*
110
111### sync_videos_cooldown_secs
112
113Sync all do not sync videos from channel if it has been synced in the past *n* seconds.
114
115*Accept: integer value seconds*
116
117### limits
118
119The maximum length that the watch/search/command history can hold, a value higher will record more items, but will also result in a larger file size in storage.
120
121*Accept: positive integer below 2<sup>*your CPU architecture*</sup> - 1*
122
123### image_index
124
125The index in the array of thumbnail qualities you want to download
126
127Typically these are the avaliable qualities:
128
129|Index|Label|Resolution|
130|---|---|---|
131|0|maxres|1280 x 720|
132|1|maxresdefault|1280 x 720|
133|2|sddefault|640 x 480|
134|3|high|480 x 360|
135|4|medium|320 x 180|
136|5|default|120 x 90|
137|6|start|120 x 90|
138|7|middle|120 x 90|
139|8|end|120 x 90|
140
141Usually 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
142
143*Accept: integer that is a valid index*
144
145### provider
146
147This changes the `${url}` and `${embed-url}` of videos, allowing you to watch videos from Invidious if it is restricted on YouTube.
148
149(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)
150
151*Accept: `YouTube`/`Invidious`*
152
153### search_provider
154
155What method to fetch video info: from an Invidious instance or using RustyPipe - a local webscraper.
156
157*Accept: `RustyPipe`/`Invidious`
158
159### shell
160
161Shell used to run commands, such as `sh` (default), `bash` or even `zsh`.
162
163*Accept: any valid path to a shell binary*
164
165### legacy_input_handling
166
167Switch back the old key input handling where the selected item captures all input (except escape).
168
169### env
170
171Env 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.
172
173*Accept: `string_key: string_value` pairs*