Giter Club home page Giter Club logo

Comments (2)

vivien avatar vivien commented on July 16, 2024

Hi @sanpii ,

This is normal if you run i3blocks outside i3bar. This is because the stdin receives an EOF and thus triggers the SIGIO signal (meaning stdin is ready to be read). The handle_click() function assumes that there's a json string to read. If you use i3blocks within i3 you won't have any issue (hopefully).

But this is a good point, maybe I should disable the stdin reading when the I/O unit is a tty.

Using atoi() is safe here, as I know my input (known formatted json string). But you are right, I will definitely use strtol() in the future if I need to make the json parsing more robust.

from i3blocks.

sanpii avatar sanpii commented on July 16, 2024

But this is a good point, maybe I should disable the stdin reading when the I/O unit is a tty.

It’s a good idea to test my configuration, i3status displays an error and I couldn’t know why.

from i3blocks.

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.