summaryrefslogtreecommitdiffstats
path: root/awesome/rc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'awesome/rc.lua')
-rw-r--r--awesome/rc.lua37
1 files changed, 21 insertions, 16 deletions
diff --git a/awesome/rc.lua b/awesome/rc.lua
index 3f5e79f..d7f339a 100644
--- a/awesome/rc.lua
+++ b/awesome/rc.lua
@@ -6,6 +6,7 @@ require("awful.rules")
require("beautiful")
-- Notification library
require("naughty")
+require("vicious")
-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
@@ -72,6 +73,10 @@ mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
-- Create a textclock widget
mytextclock = awful.widget.textclock({ align = "right" })
+-- Create Network usage widget
+netwidget = widget({ type = "textbox" })
+vicious.register(netwidget, vicious.net, "down:${eth0 down_kb} up:${eth0 up_kb}")
+
-- Create a systray
mysystray = widget({ type = "systray" })
@@ -113,9 +118,10 @@ mytasklist.buttons = awful.util.table.join(
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end))
+xmms2_playing = false
-- Create a previous button
-myprevbutton = widget({ type = "textbox" })
-myprevbutton.text = " << "
+myprevbutton = widget({ type = "imagebox" })
+myprevbutton.image = image(beautiful.xmms2_previous_icon)
myprevbutton:buttons(awful.util.table.join(
awful.button({ }, 1,
function ()
@@ -123,37 +129,36 @@ myprevbutton:buttons(awful.util.table.join(
end)
))
-- Create a play button
-playing = false
-myplaybutton = widget({ type = "textbox" })
-myplaybutton.text = " > "
+myplaybutton = widget({ type = "imagebox" })
+myplaybutton.image = image(beautiful.xmms2_play_icon)
myplaybutton:buttons(awful.util.table.join(
awful.button({ }, 1,
function ()
awful.util.spawn("xmms2 toggleplay")
- if playing then playing = false else playing = true end
- if playing then
- myplaybutton.text = " || "
+ if xmms2_playing then xmms2_playing = false else xmms2_playing = true end
+ if xmms2_playing then
+ myplaybutton.image = image(beautiful.xmms2_pause_icon)
else
- myplaybutton.text = " > "
+ myplaybutton.image = image(beautiful.xmms2_play_icon)
end
end)
))
-- Create a stop button
-mystopbutton = widget({ type = "textbox" })
-mystopbutton.text = " [ ] "
+mystopbutton = widget({ type = "imagebox" })
+mystopbutton.image = image(beautiful.xmms2_stop_icon)
mystopbutton:buttons(awful.util.table.join(
awful.button({ }, 1,
function ()
- if playing then
- playing = false
- myplaybutton.text = " > "
+ if xmms2_playing then
+ xmms2_playing = false
+ myplaybutton.image = image(beautiful.xmms2_play_icon)
end
awful.util.spawn("xmms2 stop")
end)
))
-- Create a next button
-mynextbutton = widget({ type = "textbox" })
-mynextbutton.text = " >> "
+mynextbutton = widget({ type = "imagebox" })
+mynextbutton.image = image(beautiful.xmms2_next_icon)
mynextbutton:buttons(awful.util.table.join(
awful.button({ }, 1,
function ()