From bc3c4d03ec5602d6a428fc2a89a11ec83ccd91bf Mon Sep 17 00:00:00 2001 From: Damien Leone Date: Wed, 22 Oct 2008 22:51:01 +0200 Subject: [PATCH] awesomerc.lua: use nano by default if no editor found in env 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 fafa6219..a44f347b 100644 --- a/awesomerc.lua.in +++ b/awesomerc.lua.in @@ -9,8 +9,9 @@ require("beautiful") -- This is a file path to a theme file which will defines colors. theme_path = "@AWESOME_THEMES_PATH@/default" --- This is used later as the default terminal to run. +-- This is used later as the default terminal and editor to run. terminal = "xterm" +editor = terminal .. " -e " .. os.getenv("EDITOR") or terminal .. " -e " .. "nano" -- Default modkey. -- Usually, Mod4 is the key with a logo between Control and Alt. @@ -101,7 +102,7 @@ mytextbox.text = " " .. AWESOME_RELEASE .. " " -- Create a laucher widget and a main menu myawesomemenu = { {"manual", terminal .. " -e man awesome" }, - {"edit config", terminal .. " -e " .. os.getenv("EDITOR") .. " " .. awful.util.getdir("config") .. "/rc.lua" }, + {"edit config", editor .. " " .. awful.util.getdir("config") .. "/rc.lua" }, {"restart", awesome.restart }, {"quit", awesome.quit } }