Skip to content

Commit b26fbf7

Browse files
committed
allow people to customise search directories even more
1 parent 120e0f7 commit b26fbf7

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/commands.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ pub fn search_for_file(name: &str, dirs: Vec<&str>) -> Vec<App> {
144144

145145
dirs.iter().fold(Vec::with_capacity(400), move |vec, dir| {
146146
let mut apps = vec.clone();
147-
apps.extend(search(format!("{}/{}", home, dir), name));
147+
apps.extend(search(dir.replace("~", &home), name));
148148
apps
149149
})
150150
}

src/config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ impl Default for Config {
4545
haptic_feedback: false,
4646
show_trayicon: true,
4747
search_dirs: vec![
48-
"Documents".to_string(),
49-
"Desktop".to_string(),
50-
"Downloads".to_string(),
48+
"~/Documents".to_string(),
49+
"~/Desktop".to_string(),
50+
"~/Downloads".to_string(),
5151
],
5252
log_path: "/tmp/rustcast.log".to_string(),
5353
modes: HashMap::new(),

0 commit comments

Comments
 (0)