From 3f30293e85f4f02a468608352dd2d6fd8a72f24d Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Fri, 6 Nov 2009 19:27:10 +0100 Subject: rc.lua: expose more objects --- rc.lua | 70 +++++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'rc.lua') diff --git a/rc.lua b/rc.lua index 06af38a..a86a83a 100644 --- a/rc.lua +++ b/rc.lua @@ -27,15 +27,15 @@ require("scratchpad") beautiful.init(awful.util.getdir("config") .. "/zenburn.lua") -- Modifier keys -local altkey = "Mod1" -- Alt_L -local modkey = "Mod4" -- Super_L +altkey = "Mod1" -- Alt_L +modkey = "Mod4" -- Super_L -- Function aliases local exec = awful.util.spawn local sexec = awful.util.spawn_with_shell -- Window management layouts -local layouts = { +layouts = { awful.layout.suit.tile, -- 1 awful.layout.suit.tile.left, -- 2 awful.layout.suit.tile.bottom, -- 3 @@ -48,7 +48,7 @@ local layouts = { -- {{{ Tags -local tags = {} +tags = {} tags.setup = { { name = "term", layout = layouts[3] }, { name = "emacs", layout = layouts[1] }, @@ -80,18 +80,18 @@ end -- {{{ Widgets configuration -- -- {{{ Reusable separators -local spacer = widget({ type = "textbox" }) -local separator = widget({ type = "textbox" }) +spacer = widget({ type = "textbox" }) +separator = widget({ type = "textbox" }) spacer.text = " " separator.text = "|" -- }}} -- {{{ CPU usage and temperature -local cpuicon = widget({ type = "imagebox" }) +cpuicon = widget({ type = "imagebox" }) cpuicon.image = image(beautiful.widget_cpu) -- Initialize widgets -local tzswidget = widget({ type = "textbox" }) -local cpugraph = awful.widget.graph() +cpugraph = awful.widget.graph() +tzswidget = widget({ type = "textbox" }) -- Graph properties cpugraph:set_width(50) cpugraph:set_height(14) @@ -106,7 +106,7 @@ vicious.register(tzswidget, vicious.widgets.thermal, "$1°C", 19, "TZS0") -- }}} -- {{{ Battery state -local baticon = widget({ type = "imagebox" }) +baticon = widget({ type = "imagebox" }) baticon.image = image(beautiful.widget_bat) -- Initialize widget batwidget = widget({ type = "textbox" }) @@ -115,10 +115,10 @@ vicious.register(batwidget, vicious.widgets.bat, "$1$2%", 61, "BAT0") -- }}} -- {{{ Memory usage -local memicon = widget({ type = "imagebox" }) +memicon = widget({ type = "imagebox" }) memicon.image = image(beautiful.widget_mem) -- Initialize widget -local membar = awful.widget.progressbar() +membar = awful.widget.progressbar() -- Pogressbar properties membar:set_width(8) membar:set_height(10) @@ -134,10 +134,10 @@ vicious.register(membar, vicious.widgets.mem, "$1", 13) -- }}} -- {{{ File system usage -local fsicon = widget({ type = "imagebox" }) +fsicon = widget({ type = "imagebox" }) fsicon.image = image(beautiful.widget_fs) -- Initialize widgets -local fs = { +fs = { r = awful.widget.progressbar(), h = awful.widget.progressbar(), s = awful.widget.progressbar(), b = awful.widget.progressbar() } @@ -167,12 +167,12 @@ vicious.register(fs.b, vicious.widgets.fs, "${/mnt/backup usep}", 599) -- }}} -- {{{ Network usage -local dnicon = widget({ type = "imagebox" }) -local upicon = widget({ type = "imagebox" }) +dnicon = widget({ type = "imagebox" }) +upicon = widget({ type = "imagebox" }) dnicon.image = image(beautiful.widget_net) upicon.image = image(beautiful.widget_netup) -- Initialize widget -local netwidget = widget({ type = "textbox" }) +netwidget = widget({ type = "textbox" }) -- Register widget vicious.register(netwidget, vicious.widgets.net, '${eth0 down_kb}