From 77824176f669d718b3a20f2e135d19521956aae6 Mon Sep 17 00:00:00 2001 From: Benjamyn Love Date: Tue, 12 Mar 2024 09:58:01 +1100 Subject: [PATCH] Better default path --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9479586..75e8ce5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,10 +6,12 @@ use enums::WallpaperHandler; use files::*; mod handlers; +use untildify::untildify; + fn main() { // Load the config file from the default path - // TODO: Have this load from the users home directory - let config = Config::from_config("/home/ben/.config/wallpaperctl/wallpaperctl.ini".to_owned()); + let path = untildify("~/.config/wallpaperctl/wallpaperctl.ini"); + let config = Config::from_config(path); // Initialise the `Wallpapers` struct with a clone of the config let mut wallpapers = Wallpapers::new(config.clone());