Better default path

This commit is contained in:
Benjamyn Love 2024-03-12 09:58:01 +11:00
parent ba5a48dae1
commit 77824176f6

View File

@ -6,10 +6,12 @@ use enums::WallpaperHandler;
use files::*; use files::*;
mod handlers; mod handlers;
use untildify::untildify;
fn main() { fn main() {
// Load the config file from the default path // Load the config file from the default path
// TODO: Have this load from the users home directory let path = untildify("~/.config/wallpaperctl/wallpaperctl.ini");
let config = Config::from_config("/home/ben/.config/wallpaperctl/wallpaperctl.ini".to_owned()); let config = Config::from_config(path);
// Initialise the `Wallpapers` struct with a clone of the config // Initialise the `Wallpapers` struct with a clone of the config
let mut wallpapers = Wallpapers::new(config.clone()); let mut wallpapers = Wallpapers::new(config.clone());