From 83a118e42186f80e78d0692c5e0d1288afb19947 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 5 Jan 2017 01:04:35 +0100 Subject: [PATCH] awful.util.{get_themes_dir,get_awesome_icon_dir}: support env Look at environment variables AWESOME_THEMES_PATH and AWESOME_ICON_PATH, which allows to override this in the integration test runner. --- lib/awful/util.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/awful/util.lua b/lib/awful/util.lua index 28749bca3..0b754360f 100644 --- a/lib/awful/util.lua +++ b/lib/awful/util.lua @@ -200,13 +200,13 @@ end --- Get the path to the directory where themes are installed. -- @return A string with the requested path with a slash at the end. function util.get_themes_dir() - return "@AWESOME_THEMES_PATH@" .. "/" + return (os.getenv('AWESOME_THEMES_PATH') or "@AWESOME_THEMES_PATH@") .. "/" end --- Get the path to the directory where our icons are installed. -- @return A string with the requested path with a slash at the end. function util.get_awesome_icon_dir() - return "@AWESOME_ICON_PATH@" .. "/" + return (os.getenv('AWESOME_ICON_PATH') or "@AWESOME_ICON_PATH@") .. "/" end --- Get the user's config or cache dir.