From ab609c5480111b8ca81bc9faf932aaeba4e42eac Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Mon, 29 Mar 2010 19:06:56 +0200 Subject: rc.lua: introduced home variable --- rc.lua | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/rc.lua b/rc.lua index 39339bf..7942454 100644 --- a/rc.lua +++ b/rc.lua @@ -21,17 +21,14 @@ require("scratch") -- {{{ Variable definitions --- --- Beautiful theme -beautiful.init(awful.util.getdir("config") .. "/zenburn.lua") +local altkey = "Mod1" +local modkey = "Mod4" +local home = os.getenv("HOME") +local exec = awful.util.spawn +local sexec = awful.util.spawn_with_shell --- Modifier keys -altkey = "Mod1" -- Alt_L -modkey = "Mod4" -- Super_L - --- Function aliases -local exec = awful.util.spawn -local sexec = awful.util.spawn_with_shell +-- Beautiful theme +beautiful.init(home .. "/.config/awesome/zenburn.lua") -- Window management layouts layouts = { @@ -158,7 +155,7 @@ mailicon.image = image(beautiful.widget_mail) -- Initialize widget mailwidget = widget({ type = "textbox" }) -- Register widget -vicious.register(mailwidget, vicious.widgets.mbox, "$1", 181, {"/home/anrxc/mail/Inbox", 15}) +vicious.register(mailwidget, vicious.widgets.mbox, "$1", 181, {home .. "/mail/Inbox", 15}) -- Register buttons mailwidget:buttons(awful.util.table.join( awful.button({ }, 1, function () exec("urxvt -T Alpine -e alpine_exp") end) @@ -172,9 +169,8 @@ orgicon.image = image(beautiful.widget_org) orgwidget = widget({ type = "textbox" }) -- Configure widget local orgmode = { - files = { - "/home/anrxc/.org/work.org", "/home/anrxc/.org/index.org", - "/home/anrxc/.org/personal.org", "/home/anrxc/.org/computers.org" + files = { home.."/.org/computers.org", + home.."/.org/index.org", home.."/.org/personal.org", }, color = { past = '', -- cgit v1.2.3