Coder Social home page Coder Social logo

Comments (5)

k2s avatar k2s commented on June 1, 2024 1

@HarshalRathore

  • make sure you have upower installed
    • the original code, which works for you, was using acpi for the new one requires upowe
  • if some other battery number (see ?) works in upower -i /org/freedesktop/UPower/devices/battery_BAT? then it is possible to set this number by adding BLOCK_INSTANCE=? to your i3blocks.conf

from endeavouros-i3wm-setup.

killajoe avatar killajoe commented on June 1, 2024

Thanks for heads-up.. i will check this asap, the changes were committed by @alindl
Let`s see

from endeavouros-i3wm-setup.

k2s avatar k2s commented on June 1, 2024

@mztikk I created pull request. Could you please confirm, that upower -i /org/freedesktop/UPower/devices/battery_BAT0 returns no data on your PC? Also probably you are using variable env BLOCK_INSTANCE to set value and you get information for other battery then 0.

from endeavouros-i3wm-setup.

HarshalRathore avatar HarshalRathore commented on June 1, 2024

Hii @killajoe
I am having the same problem. I tried finding solution for this on internet but as I don't have much shell scripting knowledge I couldn't find anything relevant to it. Is there any update on this issue.

from endeavouros-i3wm-setup.

HarshalRathore avatar HarshalRathore commented on June 1, 2024

Hello @k2s
I tried your script but it is still not working for me.

output of shellscript

Use of uninitialized value $bat_state in pattern match (m//) at .config/i3/scripts/battery.sh line 53.
Use of uninitialized value $bat_state in concatenation (.) or string at .config/i3/scripts/battery.sh line 54.

I also ran the upower -i /org/freedesktop/UPower/devices/battery_BAT0 command on my PC it gave this output.

  native-path:          (null)
  power supply:         no
  updated:              Thursday 01 January 1970 05:30:00 AM (1637303381 seconds ago)
  has history:          no
  has statistics:       no
  unknown
    warning-level:       unknown
    battery-level:       unknown
    percentage:          0% (should be ignored)
    icon-name:          '(null)'

from endeavouros-i3wm-setup.

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.