]> git.rmz.io Git - dotfiles.git/blobdiff - awesome/rc.lua
awesome: use TERMINAL env as much as possible
[dotfiles.git] / awesome / rc.lua
index 9a113241b474b5b3b69779f730258741d4ed0171..74688d7ed5ccf52701965f540a6aa6412a3d95a6 100644 (file)
@@ -6,7 +6,6 @@ require("awful.autofocus")
 beautiful = require("beautiful")
 naughty = require("naughty")
 menubar = require("menubar")
-lain = require("lain")
 require("awful.remote")
 
 -- Error handling {{{1
@@ -35,10 +34,18 @@ end
 
 -- Variable definitions {{{1
 -- Themes define colours, icons, font and wallpapers.
-beautiful.init(awful.util.getdir("config").."/themes/mlp/theme.lua")
+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