Merge branch 'master' of sc:awesome

This commit is contained in:
crater2150 2010-11-21 22:30:06 +01:00
commit 025e989c4e
6 changed files with 55 additions and 11 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
wp
wallpaper
walls

View file

@ -61,6 +61,7 @@ globalkeys = awful.util.table.join(
awful.key({ modkey, }, "p", function () awful.util.spawn("pidgin") end),
awful.key({ modkey, }, "s", function () awful.util.spawn("sunbird") end),
awful.key({ modkey, }, "g", function () awful.util.spawn("gmpc") end),
awful.key({ modkey, }, "w", function () awful.util.spawn("awsetbg -a -r /home/crater2150/.config/awesome/walls/ &") end),
awful.key({ }, "XF86Mail", function () awful.util.spawn("xset dpms force off") end),
awful.key({ }, "XF86Mail", function () awful.util.spawn("xset dpms force off") end),
awful.key({ modkey }, "XF86Mail", function () awful.util.spawn("urslock") end),

7
rc.lua
View file

@ -1,5 +1,5 @@
terminal = "urxvtc -e screen"
editor_cmd = "urxvt -e vim"
editor_cmd = "urxvtc -e vim"
modkey = "Mod4"
hyper = "Mod3"
@ -14,6 +14,9 @@ require("obvious.popup_run_prompt")
require("vicious")
require("aweswt")
MY_PATH = os.getenv("HOME") .. "/.config/awesome/"
WALLPATH = MY_PATH .. "walls/"
-- Themes define colours, icons, and wallpapers
beautiful.init("/home/crater2150/.config/awesome/zenburn/theme.lua")
@ -30,10 +33,10 @@ layouts =
awful.layout.suit.floating
}
MY_PATH = os.getenv("HOME") .. "/.config/awesome/"
dofile (MY_PATH .. "helpers.lua")
dofile (MY_PATH .. "tags.lua")
dofile (MY_PATH .. "wibox.lua")
dofile (MY_PATH .. "bindings.lua")
dofile (MY_PATH .. "rules.lua")
dofile (MY_PATH .. "signals.lua")
--dofile (MY_PATH .. "wallpaper.lua")

View file

@ -17,7 +17,7 @@ awful.rules.rules = {
ontop = true,
focus = true } },
{ rule = { class = "Teardrop" },
properties = { floating = true } },
properties = { floating = true, tag = tags[1][12] } },
{ rule = { class = "pinentry" },
properties = { floating = true } },
{ rule = { class = "gimp" },

29
wallpaper.lua Normal file
View file

@ -0,0 +1,29 @@
-- seed and "pop a few"
math.randomseed( os.time())
for i=1,1000 do tmp=math.random(0,1000) end
x = 0
-- setup the timer
mytimer = timer { timeout = x }
mytimer:add_signal("timeout", function()
-- tell awsetbg to randomly choose a wallpaper from your wallpaper directory
os.execute("awsetbg -a -r /home/crater2150/.config/awesome/walls/ &")
-- stop the timer (we don't need multiple instances running at the same time)
mytimer:stop()
-- define the interval in which the next wallpaper change should occur in seconds
-- (in this case anytime between 10 and 20 minutes)
x = math.random( 600, 1200)
--restart the timer
mytimer.timeout = x
mytimer:start()
end)
-- initial start when rc.lua is first run
mytimer:start()

View file

@ -19,19 +19,29 @@ clock = widget({ type = "textbox" })
vicious.register(clock, vicious.widgets.date, "%b %d, %R", 60)
memwidget = widget({ type = "textbox" })
vicious.register(memwidget, vicious.widgets.mem, " $1% ($2MB / $3MB) ", 13)
vicious.register(memwidget, vicious.widgets.mem, "RAM: $1% ($2MB / $3MB) ", 13)
--batwidget = obvious.battery();
--batwidget = awful.widget.progressbar()
--batwidget:set_width(60)
--batwidget:set_height(15)
--batwidget:set_vertical(false)
--batwidget:set_background_color("#494B4F")
--batwidget:set_border_color(nil)
--batwidget:set_color("#AECF96")
--batwidget:set_gradient_colors({ "#AECF96", "#88A175", "#FF5656" })
batwidget = widget({ type = "textbox" })
vicious.register(batwidget, vicious.widgets.bat, "⌁ $1$2% - $3", 61)
--vicious.register(batwidget, vicious.widgets.bat, "BAT: $2%", 61, "BAT1")
vicious.register(batwidget, vicious.widgets.bat, "BAT1: $1$2% - $3", 61, "BAT1")
--cpuwidget = awful.widget.progressbar()
--cpuwidget:set_width(50)
--cpuwidget:set_background_color("#494B4F")
--cpuwidget:set_color("#FF5656")
--cpuwidget:set_gradient_colors({ "#FF5656", "#88A175", "#AECF96" })
--vicious.register(cpuwidget, vicious.widgets.cpu, "$1",41)
cpuwidget = awful.widget.progressbar()
cpulabel = widget({ type = "textbox" })
cpuwidget:set_width(50)
cpuwidget:set_background_color("#494B4F")
cpuwidget:set_color("#FF5656")
cpuwidget:set_gradient_colors({ "#FF5656", "#88A175", "#AECF96" })
vicious.register(cpuwidget, vicious.widgets.cpu, "$1",41)
vicious.register(cpulabel, vicious.widgets.cpu, "CPU: $1%")