beautiful.init(gears.filesystem.get_dir("config").."/themes/mlp/theme.lua")
-- This is used later as the default terminal and editor to run.
-terminal = "urxvtc"
+terminal = os.getenv("TERMINAL") or "xterm"
+terminal_class = (function()
+ local map = { urxvt = "URxvt"
+ , urxvtc = "URxvt"
+ , xterm = "XTerm"
+ }
+ return map[terminal] or terminal
+end)()
+
editor = os.getenv("EDITOR") or "vim"
editor_cmd = terminal .. " -e " .. editor