mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-20 15:51:32 +02:00
feat(config): allow multiple asc files
This commit allows either the single canonical applications.json file, or multiple files which adhere to the asc scheme to be given to the app_specific_configuration_path config option. I thought I had already implemented this earlier, but evidently I hadn't. This will be useful for people who want to maintain their own independent set of asc rules, as they can be kept in a dedicated file which won't be overwritten by the fetch-asc command. resolve #736
This commit is contained in:
@@ -25,6 +25,7 @@ use fs_tail::TailedFile;
|
||||
use komorebi_client::resolve_home_path;
|
||||
use komorebi_client::send_message;
|
||||
use komorebi_client::send_query;
|
||||
use komorebi_client::AppSpecificConfigurationPath;
|
||||
use komorebi_client::ApplicationSpecificConfiguration;
|
||||
use lazy_static::lazy_static;
|
||||
use miette::NamedSource;
|
||||
@@ -1660,11 +1661,12 @@ fn main() -> Result<()> {
|
||||
None => {
|
||||
println!("Application specific configuration file path has not been set. Try running 'komorebic fetch-asc'\n");
|
||||
}
|
||||
Some(path) => {
|
||||
Some(AppSpecificConfigurationPath::Single(path)) => {
|
||||
if !Path::exists(Path::new(&path)) {
|
||||
println!("Application specific configuration file path '{}' does not exist. Try running 'komorebic fetch-asc'\n", path.display());
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user