polybar-dwm/include
TheDoctor314 6d1ff41d37
Handle relative includes (#2535)
* Handle relative includes

We change to the directory of the given config file before parsing.
This allows us to handle relative includes.
TODO: Maybe improve the name of the change_dir() function.

* Fix unused result warning

* Add `relative_to` parameter to expand()

If the path is relative, we resolve it by prepending
dirname(config) to the path.

Add dirname() - Returns the parent directory of the file or an empty
string.

* Resolve relative paths

Handle paths relative to the current file being parsed.

* Remove unneeded change_dir()

* Fix expand()

`is_absolute` is calculated after we expand the path.
`relative_to` must be a directory.

Add test for expand() with relative paths

* Recalculate `is_absolute` after expanding `path`

* Add more file_util::expand tests

* Add changelog

Co-authored-by: patrick96 <p.ziegler96@gmail.com>
2021-10-20 12:31:15 +02:00
..
adapters fix(net): Use canonical interface name (#2540) 2021-10-15 17:36:32 +02:00
cairo Fixed issues with border corner radii 2021-03-29 20:17:48 +02:00
components Allow running polybar without BAR argument (#2526) 2021-10-07 14:48:47 +02:00
drawtypes feat(xkeyboard): Icon matching using variant (#2521) 2021-10-05 12:12:47 +02:00
events Integrate bar taskqueue into eventloop (#2510) 2021-09-27 17:35:45 +02:00
modules Enable module in start funcion (#2538) 2021-10-15 10:33:10 +02:00
tags fix typos (#2524) 2021-10-04 23:46:38 +02:00
utils Handle relative includes (#2535) 2021-10-20 12:31:15 +02:00
x11 Remove unused spin_lock 2021-09-21 21:43:27 +02:00
CMakeLists.txt refactor(cmake): Allow targets to be enabled individually 2020-12-24 02:20:38 +01:00
common.hpp refactor(build): Remove version number namespace 2019-05-17 16:49:47 +02:00
debug.hpp refactor: Cleanup 2017-01-11 03:07:28 +01:00
errors.hpp Add missing <stdexcept> header 2019-12-25 01:00:29 +01:00
settings.hpp.cmake Integrate bar taskqueue into eventloop (#2510) 2021-09-27 17:35:45 +02:00