Down/Up widget

This commit is contained in:
Kolan Sh 2012-07-17 16:33:25 +04:00
parent 7647cb57b2
commit 61cc9a1205
2 changed files with 18 additions and 0 deletions

13
rc.lua
View File

@ -10,6 +10,7 @@ require("naughty")
require("autostart") require("autostart")
require("apps") require("apps")
require("volume") require("volume")
require("vicious")
-- {{{ Error handling -- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to -- Check if awesome encountered an error during startup and fell back to
@ -127,6 +128,16 @@ mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
-- }}} -- }}}
-- {{{ Wibox -- {{{ Wibox
-- Network usage widget
-- Initialize widget
netwidget = widget({ type = "textbox" })
-- Register widget
vicious.register(netwidget, vicious.widgets.net, '<span color="#7F9F7F">${wlan0 down_kb}</span> <span color="#CC9393">${wlan0 up_kb}</span>', 3)
dnicon = widget({ type = "imagebox" })
upicon = widget({ type = "imagebox" })
dnicon.image = image(beautiful.widget_net)
upicon.image = image(beautiful.widget_netup)
-- Create a textclock widget -- Create a textclock widget
mytextclock = awful.widget.textclock({ align = "right" }) mytextclock = awful.widget.textclock({ align = "right" })
@ -210,6 +221,8 @@ for s = 1, screen.count() do
mylayoutbox[s], mylayoutbox[s],
mytextclock, mytextclock,
volume_widget, volume_widget,
netwidget,
-- separator, upicon, netwidget, dnicon,
s == 1 and mysystray or nil, s == 1 and mysystray or nil,
mytasklist[s], mytasklist[s],
layout = awful.widget.layout.horizontal.rightleft layout = awful.widget.layout.horizontal.rightleft

View File

@ -92,5 +92,10 @@ theme.layout_dwindle = "/usr/share/awesome/themes/default/layouts/dwindlew.png"
theme.awesome_icon = "/usr/share/awesome/icons/awesome16.png" theme.awesome_icon = "/usr/share/awesome/icons/awesome16.png"
theme.widget_net = "~/.config/awesome/icons/down.png"
theme.widget_netup = "~/.config/awesome/icons/up.png"
return theme return theme
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80