You are not logged in.

#1 2010-03-06 18:17:53

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Awesome3 and vicious problem (fs.lua)

Hi, i need some help to get the widget to work, right now when i restart i only see the wallpaper. Right now my config look like this (whiteout the widget i want):
http://pastebin.com/FgJf2mt8
The code i like is from this man: http://git.sysphere.org/awesome-configs/

The error i receive is about this line in fs.lua.
helpers.uformat(fs_info, m .. " size",  s, unit)

Is this something i should change by my on, if so, please let me know what to change. smile

Offline

#2 2010-03-06 21:49:52

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 834
Website

Re: Awesome3 and vicious problem (fs.lua)

without the widget i want

You need to paste the exact code you are trying to use.


You need to install an RTFM interface.

Offline

#3 2010-03-06 22:06:19

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: Awesome3 and vicious problem (fs.lua)

Oh, right! I have just copied from his config, and removed the storage used and the backup thing. I really dont know what 599 means, but i think its ware the stuff should be placed?

-- {{{ File system usage
fsicon = widget({ type = "imagebox" })
fsicon.image = image(beautiful.widget_fs)
-- Initialize widgets
fs = {
  r = awful.widget.progressbar(),  h = awful.widget.progressbar(),
  s = awful.widget.progressbar(),  b = awful.widget.progressbar()
}
-- Progressbar properties
for _, w in pairs(fs) do
  w:set_width(5)
  w:set_height(12)
  w:set_vertical(true)
  w:set_background_color(beautiful.fg_off_widget)
  w:set_border_color(beautiful.border_widget)
  w:set_color(beautiful.fg_widget)
  w:set_gradient_colors({ beautiful.fg_widget,
     beautiful.fg_center_widget, beautiful.fg_end_widget
  }) -- Register buttons
  w.widget:buttons(awful.util.table.join(
    awful.button({ }, 1, function () exec("rox", false) end)
  ))
end -- Enable caching
vicious.enable_caching(vicious.widgets.fs)
-- Register widgets
vicious.register(fs.r, vicious.widgets.fs, "${/ used_p}",            599)
vicious.register(fs.h, vicious.widgets.fs, "${/home used_p}",        599)
vicious.register(fs.s, vicious.widgets.fs, "${/mnt/storage used_p}", 599)
vicious.register(fs.b, vicious.widgets.fs, "${/mnt/backup used_p}",  599)
-- }}}

I have also add this:
separator, fs.b.widget, fs.s.widget, fs.h.widget, fs.r.widget, fsicon,

Edit; Didn't wrote paste all the stuff.

Last edited by kaptenen (2010-03-06 22:13:36)

Offline

#4 2010-03-06 23:43:46

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 834
Website

Re: Awesome3 and vicious problem (fs.lua)

I will explain all in comments, read them:

-- {{{ File system usage

-- Widget icon
fsicon = widget({ type = "imagebox" })    -- initialize "fsicon" widget of type imagebox
fsicon.image = image(beautiful.widget_fs) -- set the icon to widget_fs defined in your theme

-- Initialize widgets
fs = {
  r = awful.widget.progressbar(),   -- widget object that will hold your root partition data
  h = awful.widget.progressbar(),   -- widget object that will hold your home partition data
  --x = awful.widget.progressbar(), -- widget object that could hold your other partition data
}

-- Progressbar properties           -- loop sets the same properties for all of them
for _, w in pairs(fs) do
  w:set_width(5)
  w:set_height(12)
  w:set_vertical(true)
  w:set_background_color(beautiful.fg_off_widget)
  w:set_border_color(beautiful.border_widget)
  w:set_color(beautiful.fg_widget)
  w:set_gradient_colors({ beautiful.fg_widget,
     beautiful.fg_center_widget, beautiful.fg_end_widget
  })

  -- Register buttons
  w.widget:buttons(awful.util.table.join(
    awful.button({ }, 1, function () exec("rox", false) end)
  ))
end

-- Enable caching
vicious.enable_caching(vicious.widgets.fs)  -- explanation in the README

-- Register widgets
vicious.register(fs.r,   vicious.widgets.fs, "${/ used_p}",      599) -- Do I need to tell you that you do it only
vicious.register(fs.h,   vicious.widgets.fs, "${/home used_p}",  599) -- for partitions YOU HAVE ON YOUR system?
--vicious.register(fs.x, vicious.widgets.fs, "${/partx used_p}", 599) -- These register calls will update your progressbars every 599 seconds
-- }}}

Then you add to your widget box only those objects you actually created

separator, fs.h.widget, fs.r.widget, fsicon, -- fs.x.widget y and z if needed

Last edited by anrxc (2010-03-07 02:40:43)


You need to install an RTFM interface.

Offline

#5 2010-03-07 02:18:44

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: Awesome3 and vicious problem (fs.lua)

I have read the README, and i have done the stuff you are mention. smile
I can tell you the message i got:
Attempt to concatenate local ´m´ (a nil value), from the fs.lua.
Thanks for the help and awesome work, and im sorry that my English isn't the best.

Offline

#6 2010-03-07 02:38:31

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 834
Website

Re: Awesome3 and vicious problem (fs.lua)

I have read the README, and i have done the stuff you are mention.

Before? Good thing you showed the invalid wibox.widgets line and made that "599 comment"... so we can waste time explaining every line.

Attempt to concatenate local ´m´ (a nil value), from the fs.lua.

If this is true the regexp did not match one of your partitions, since there is no error handler widget broke (there are not many handlers in this library). You can add a handler or a check your self (if m ~= nil then uformat... would suffice), or e-mail me the output of command df -kP and I will check if there is a bug. Thank you.

Last edited by anrxc (2010-03-07 02:53:32)


You need to install an RTFM interface.

Offline

Board footer

Powered by FluxBB