Giter Club home page Giter Club logo

Comments (12)

shdown avatar shdown commented on June 15, 2024

Are you sure that:

  1. you have the timeout option of the plugin set (to something sensible, e.g. 10), and

  2. you are waiting that amount of seconds (10 in our example) before reconnecting?

from luastatus.

shdown avatar shdown commented on June 15, 2024

Also, please try i3-msg restart and report if the signal changes.

from luastatus.

lieux avatar lieux commented on June 15, 2024

Still no changes. I have timeout=10. I waited for several seconds each time I place the laptop somewhere and it does not update.

Also did i3-msg restart. Nothing happens.

from luastatus.

lieux avatar lieux commented on June 15, 2024

Here is the code:

widget = {
    plugin = 'network-linux',
    opts = {
        wireless = true,
        timeout = 10
    },
    cb = function(t)
        if not t then
            return nil
        end
        local dbm
        for iface, param in pairs(t) do
            if param.wireless then
                if param.wireless.signal_dbm then
                    dbm = param.wireless.signal_dbm
                end
            end
        end
        return {
            full_text = string.format('%s', dbm)
        }
    end
}

from luastatus.

lieux avatar lieux commented on June 15, 2024

And also, the example wireless.lua is not updating (signal bars not changing).

from luastatus.

shdown avatar shdown commented on June 15, 2024

I waited for several seconds each time I place the laptop somewhere and it does not update.

Have you been waiting for 10 seconds?

Also did i3-msg restart. Nothing happens.

Then, the problem is in your driver, because this restarts the luastatus process (so it has no chance to cache the signal information anywhere).

And, are you sure that reconnecting updates it?

from luastatus.

shdown avatar shdown commented on June 15, 2024

Also, as an experiment, can you please launch i3status (with a config that displays wireless %quality, default will do) in the terminal and see if it changes?

from luastatus.

lieux avatar lieux commented on June 15, 2024

Have you been waiting for 10 seconds?

Yes. Minutes even just to make sure.

And, are you sure that reconnecting updates it?

Yes. By just toggling airplane mode.

i3status

I tried it. Set the global interval to 1 but still it's not changing. So I guess it really is a driver problem. Thanks!

from luastatus.

shdown avatar shdown commented on June 15, 2024

Hmm, interesting, the same is going on on my machine. cat /proc/net/wireless updates in the real time.

The code for the network-linux plugin was adapted from i3status, so there’s a bug either in:

  1. i3status’ code for retrieving the wireless parameters;

  2. libnl;

  3. kernel driver.

I will probably investigate it later.

P.S. I’ve just found a bug in network-linux that has nothing to do with the quality not updating, but could crash the entire luastatus process when reconnecting, so please update (fixed with f403c84 commit).

from luastatus.

shdown avatar shdown commented on June 15, 2024

Also, i3status has a bug open for it: i3/i3status#106

from luastatus.

shdown avatar shdown commented on June 15, 2024

Fixed, please try now.

from luastatus.

lieux avatar lieux commented on June 15, 2024

It's working. Thank you!

from luastatus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.