~hristoast/mousikofidi

ref: c16e456484d74380b44fe5bf2124bf5fce6fb919 mousikofidi/site/config.html -rw-r--r-- 6.6 KiB
c16e4564Hristos N. Triantafillou A word a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
<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>
        <pre><code>[other]
secret_key = "FB36Kb4PUVVi6Pw1t9ERunkWNGwHgNexYEnbc6SjYHI7CVRNrJ"</code></pre>
      </li>
    </ul>
  </li>
</ul>