docs/src/config/main.md

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