docs/src/config/main.md

180 lines · 5032 bytes

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