Giter Club home page Giter Club logo

Comments (6)

acron0 avatar acron0 commented on August 14, 2024 18

What about when you want to generate text using command and have a response to click?

from i3blocks.

vivien avatar vivien commented on August 14, 2024 2

Hi @benkaiser,

FYI, now a block without interval won't be executed on startup. So adding a button is as simple as:

[clickme]
full_text=Click me!
command=notify-send "Button $BLOCK_BUTTON ($BLOCK_X, $BLOCK_Y)"

In contrast, one-shot commands must be specified as follow:

[kernel]
command=uname -r
interval=once

I hope this is intuitive and convenient enough!

from i3blocks.

vivien avatar vivien commented on August 14, 2024 1

Hi @benkaiser,

In #23 we agreed on a new click command to execute when appropiate. That will be done soon!
In the meantime, you could simply check for the $BLOCK_BUTTON variable and exit silently if it is not set. In Bash, you'd add a line like test -z "$BLOCK_BUTTON" && exit.

from i3blocks.

benkaiser avatar benkaiser commented on August 14, 2024

Hi @vivien,

Thanks for reply. I ended up trying out a different statusbar replacement (i3pystatus) and it did what I wanted. However I will look back into using i3blocks once you add the feature.
No rush of course, but could you update this issue / close it once you add the feature so I get a notification?

Thanks

from i3blocks.

vivien avatar vivien commented on August 14, 2024

Sure. I hope you'll find the best tool for your needs!

from i3blocks.

rileyrg avatar rileyrg commented on August 14, 2024

Any further on this? I want to click my i3blocks volume status to bring up pavucontrol

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.