<h1>
Configuration Guide
</h1>
<p>
By default, MousikóFídi looks for a configuration file at:
</p>
<pre><code>$HOME/.config/fidi/config.toml</code></pre>
<p>
An alternate file may be used by pointing the <code>FIDI_CFG</code> environment variable to the path of the desired alternate file.
</p>
<p>
A full example config file with comments is viewable <a href="https://git.sr.ht/~hristoast/mousikofidi/tree/master/mousikofidi/example/fidi.toml">here</a>, and a complete file can be generated by simply renaming any existing file and starting MousikóFídi.
</p>
<p>
Each configuration file option for MousikóFídi is explained below:
</p>
<div id="toc"></div>
<h2><code>library.dirs</code></h2>
<ul>
<li>
<p>
<code>library.dirs</code>: Array of strings. Each string should be a full path to a music directory. Ensure the <code>fidi</code> user can read these paths.
</p>
<pre><code>[library]
dirs = [
"/home/hristos/music/flac",
"/home/hristos/music/mp3",
"/home/hristos/music/ogg",
"/home/hristos/video/mp4",
"/home/hristos/video/webm",
]</code></pre>
</li>
</ul>
<h2><code>player.keyboard_controls</code></h2>
<ul>
<li>
<p>
<code>player.keyboard_controls</code>: Boolean. Enable or disable keyboard-driven controls for the audio and video players.
</p>
<pre><code>[player]
keyboard_controls = true</code></pre>
</li>
</ul>
<h3>Key Bindings</h3>
<p>This setting enables the following key bindings:</p>
<ul>
<li><span class="bold">Left Arrow Key</span>: Skip to the previous track, if possible.</li>
<li><span class="bold">Right Arrow Key</span>: Skip to the next track, if possible.</li>
<li><span class="bold">Up Arrow Key</span>: Raise the player volume by 1%, if possible.</li>
<li><span class="bold">Down Arrow Key</span>: Lower the player volume by 1%, if possible.</li>
<li><span class="bold">Space Bar</span>: Toggle pause or play with the current track.</li>
<li><span class="bold">Shift + Left Arrow Key</span>: Seek forward in the current track, if possible.</li>
<li><span class="bold">Shift + Right Arrow Key</span>: Seek backwards in the current track, if possible.</li>
<li><span class="bold">Shift + Up Arrow Key</span>: Raise the player volume by 10%, if possible.</li>
<li><span class="bold">Shift + Down Arrow Key</span>: Lower the player volume by 10%, if possible.</li>
</ul>
<p><span class="bold">Note:</span> If a page has both an audio and video player, the keyboard controls will default to the audio player only.</p>
<h2><code>playlists.allow_delete</code></h2>
<ul>
<li>
<p>
<code>playlists.allow_delete</code>: Boolean. Enable or disable deletion of playlist files. Default: <code>false</code>
</p>
<pre><code>[playlists]
allow_delete = false</code></pre>
</li>
</ul>
<h2><code>playlists.dir</code></h2>
<ul>
<li>
<p>
<code>playlists.dir</code>: String. A full path to a playlist directory. No default; playlist-related functionality is disabled if this isn't set.
</p>
<pre><code>[playlists]
dir = "/home/hristos/music/playlists"</code></pre>
</li>
</ul>
<h2><code>playlists.allow_save</code></h2>
<ul>
<li>
<p>
<code>playlists.allow_save</code>: Boolean. Can playlists be saved or not. Omitting this value from your config file disables it. Default: <code>true</code>
</p>
<pre><code>[playlists]
allow_save = true</code></pre>
</li>
</ul>
<h2><code>ui.favicon_path</code></h2>
<ul>
<li>
<p>
<code>ui.favicon_path</code>: String. Path or URL for a favicon. Default: <code>"/fidi.png"</code>
</p>
<pre><code>[ui]
# Just use the default
favicon_path = "/fidi.png"
# Or, some other URL
favicon_path = "https://myfavicondomain.tld/some-image.png"</code></pre>
</li>
</ul>
<h2><code>ui.holidays</code></h2>
<ul>
<li>
<p>
<code>ui.holidays</code>: Boolean. Enable or disable the usage of specially-themed logos in the user interface. Default: <code>true</code>
</p>
<pre><code>[ui]
holidays = true</code></pre>
</li>
</ul>
<h2><code>ui.icons</code></h2>
<ul>
<li>
<p>
<code>ui.icons</code>: Boolean. Enable or disable the usage of icons in the user interface. Default: <code>true</code>
</p>
<pre><code>[ui]
icons = true</code></pre>
</li>
</ul>
<h2><code>ui.logo_path</code></h2>
<ul>
<li>
<p>
<code>ui.logo_path</code>: String. Path or URL for a logo image. Default: <code>"/fidi.png"</code>
</p>
<pre><code>[ui]
# Just use the default
logo_path = "/fidi.png"
# Or, some other URL
logo_path = "https://mylogodomain.tld/logo.png"</code></pre>
</li>
</ul>
<h2><code>ui.show_cover_art</code></h2>
<ul>
<li>
<p>
<code>ui.show_cover_art</code>: Boolean. Enable or disable support for showing cover art. Default: <code>true</code>
</p>
<pre><code>[ui]
show_cover_art = true</code></pre>
</li>
</ul>
<p>If a supported file (currently only FLAC and MP3) contains an embedded cover art image, that will be used. Otherwise, the cover art will be guessed based on the presence of any images in the same directory as the given file.</p>
<h2><code>ui.site_name</code></h2>
<ul>
<li>
<p>
<code>ui.site_name</code>: String. The "site name" as shown in the header and elsewhere. Default: <code>"MousikóFídi - Your Music Cloud"</code>
</p>
<pre><code>[ui]
# Just use the default
site_name = "MousikóFídi - Your Music Cloud"
# Use a custom name
site_name = "My Cool Fidi Instance!"</code></pre>
</li>
</ul>
<h2><code>ui.theme</code></h2>
<ul>
<li>
<p>
<code>ui.theme</code>: String. Choose from <a href="https://watercss.netlify.com/"><code>dark</code></a>, <a href="https://watercss.netlify.com/"><code>light</code></a>, <a href="https://nostalgic-css.github.io/NES.css/"><code>nes</code></a>, <code>terminal</code>, <code>terminal-green</code>, <code>terminal-solarized</code> , or supply your own stylesheet URL to provide a custom theme. This sets the default theme. Terminal themes by ogenfald.
</p>
<pre><code>[ui]
# Default to the dark theme...
theme = "dark"
# Or the light theme...
theme = "light"
# Or the "NES" theme...
theme = "nes"
# Or the "Terminal" theme...
theme = "terminal"
# Or, supply your own stylesheet:
theme = "https://mycssdomain.tld/my-style.css"</code></pre>
</li>
</ul>
<h2><code>other.secret_key</code></h2>
<ul>
<li>
<code>other.secret_key</code>: String. This should be a long, secure string to be used for generating secure cookies (used by the "Settings" feature).
<ul>
<li>
<p>
This is automatically generated with your config file.
</p>
</li>
</ul>
</li>
</ul>
<pre><code>[other]
secret_key = "FB36Kb4PUVVi6Pw1t9ERunkWNGwHgNexYEnbc6SjYHI7CVRNrJ"</code></pre>