docs/src/config/main.md

153 lines · 4336 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### download_images
 86
 87Whether to download images for all subscription videos
 88
 89*Accept: `true`/`false`*
 90
 91### sync_channel_info
 92
 93Whether 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).
 94
 95*Accept: `true`/`false`*
 96
 97### sync_channel_cooldown_secs
 98
 99Sync all do not sync channel info if it has been synced in the past *n* seconds.
100
101*Accept: integer value seconds*
102
103### sync_videos_cooldown_secs
104
105Sync all do not sync videos from channel if it has been synced in the past *n* seconds.
106
107*Accept: integer value seconds*
108
109### image_index
110
111The index in the array of thumbnail qualities you want to download
112
113Typically these are the avaliable qualities:
114
115|Index|Label|Resolution|
116|---|---|---|
117|0|maxres|1280 x 720|
118|1|maxresdefault|1280 x 720|
119|2|sddefault|640 x 480|
120|3|high|480 x 360|
121|4|medium|320 x 180|
122|5|default|120 x 90|
123|6|start|120 x 90|
124|7|middle|120 x 90|
125|8|end|120 x 90|
126
127Usually 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
128
129*Accept: integer that is a valid index*
130
131### provider
132
133This changes the `${url}` and `${embed-url}` of videos, allowing you to watch videos from Invidious if it is restricted on YouTube.
134
135(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)
136
137*Accept: `YouTube`/`Invidious`*
138
139### shell
140
141Shell used to run commands, such as `sh` (default), `bash` or even `zsh`.
142
143*Accept: any valid path to a shell binary*
144
145### legacy_input_handling
146
147Switch back the old key input handling where the selected item captures all input (except escape).
148
149### env
150
151Env 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.
152
153*Accept: `string_key: string_value` pairs*