awesomerc.lua: use nano by default if no editor found in env

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Damien Leone 2008-10-22 22:51:01 +02:00 committed by Julien Danjou
parent 183f372626
commit bc3c4d03ec
1 changed files with 3 additions and 2 deletions

View File

@ -9,8 +9,9 @@ require("beautiful")
-- This is a file path to a theme file which will defines colors. -- This is a file path to a theme file which will defines colors.
theme_path = "@AWESOME_THEMES_PATH@/default" 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" terminal = "xterm"
editor = terminal .. " -e " .. os.getenv("EDITOR") or terminal .. " -e " .. "nano"
-- Default modkey. -- Default modkey.
-- Usually, Mod4 is the key with a logo between Control and Alt. -- Usually, Mod4 is the key with a logo between Control and Alt.
@ -101,7 +102,7 @@ mytextbox.text = "<b><small> " .. AWESOME_RELEASE .. " </small></b>"
-- Create a laucher widget and a main menu -- Create a laucher widget and a main menu
myawesomemenu = { myawesomemenu = {
{"manual", terminal .. " -e man awesome" }, {"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 }, {"restart", awesome.restart },
{"quit", awesome.quit } {"quit", awesome.quit }
} }