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
pub use crate::{
index::Index,
song::Song,
sqlite::Database,
toml::{Bind, Colors, GlobalHotkey, Hotkey, Key, Modifier, Toml},
};
use static_init::dynamic;
use std::path::PathBuf;
mod index;
mod song;
mod sqlite;
mod toml;
#[dynamic]
pub static GONK_DIR: PathBuf = {
let gonk = dirs::config_dir().unwrap().join("gonk");
if !gonk.exists() {
std::fs::create_dir_all(GONK_DIR.as_path()).unwrap();
}
gonk
};
#[dynamic]
pub static DB_DIR: PathBuf = GONK_DIR.join("gonk.db");
#[dynamic]
pub static TOML_DIR: PathBuf = GONK_DIR.join("gonk.toml");