From 598a50249eb85476e1eb077d2a2f854b7c440b21 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 23 Oct 2008 10:26:13 +0200 Subject: [PATCH] awesomerc: fix editor when nil Signed-off-by: Julien Danjou --- awesomerc.lua.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/awesomerc.lua.in b/awesomerc.lua.in index a44f347b..47f43c82 100644 --- a/awesomerc.lua.in +++ b/awesomerc.lua.in @@ -11,7 +11,8 @@ theme_path = "@AWESOME_THEMES_PATH@/default" -- This is used later as the default terminal and editor to run. terminal = "xterm" -editor = terminal .. " -e " .. os.getenv("EDITOR") or terminal .. " -e " .. "nano" +editor = os.getenv("EDITOR") or "nano" +editor_cmd = terminal .. " -e " .. editor -- Default modkey. -- Usually, Mod4 is the key with a logo between Control and Alt. @@ -102,7 +103,7 @@ mytextbox.text = " " .. AWESOME_RELEASE .. " " -- Create a laucher widget and a main menu myawesomemenu = { {"manual", terminal .. " -e man awesome" }, - {"edit config", editor .. " " .. awful.util.getdir("config") .. "/rc.lua" }, + {"edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" }, {"restart", awesome.restart }, {"quit", awesome.quit } }