fix(config): Perform tilde expansion on include-file #603

This commit is contained in:
Michael Carlberg
2017-06-02 18:29:55 +02:00
parent 28431be67e
commit d3b0670f30
5 changed files with 42 additions and 7 deletions

View File

@ -231,6 +231,17 @@ namespace file_util {
return ret;
}
/**
* Path expansion
*/
const string expand(const string& path) {
string p{path};
if (p[0] == '~') {
p.replace(0, 1, env_util::get("HOME"));
}
return p;
}
}
POLYBAR_NS_END