0

(From the project introduction) "i3blocks executes your command lines and generates a status line from their output."

As per the i3blocks config file, here is the syntax to get the time in the status :

[time]
label=any string or glyph 
full_text=any string or glyph 
command=date "+%a, %b %_d %Y %I:%M%P"
interval=5

And here is how you execute a GUI command on click:

[click]
full_text=Click me!
command=gsimplecal
color=#F79494

Both work, but how do I combine the two, that is, being able to click on the time to pop up the calendar? I tried this:

[clickable_time]
full_text=date "+%a, %b %_d %Y %I:%M%P"
command=gsimplecal
interval=5

But it doesn't work (the date string command is displayed, and gsimplecal gets executed every 5 seconds) so obviously a workaround must be found..?

1
  • my setup uses the status_command, which involves generating and stream-parsing json. i'd be very interested in a better option as well
    – Fox
    Dec 28, 2020 at 7:05

1 Answer 1

1

I know this is a few months old but i just came across a similar requirement where i want to show the volume in the bar but want to open pavucontrol on click to configure audio settings. This is what i ended up with that works.

[volume]
command=if [ $button ]; then pavucontrol; else pulseaudio-ctl full-status | awk '{ printf "%i%\n", $1 }'; fi
interval=1
label=<span color="#ffb86c"> </span>

checking if $button exists (a click) and doing something different, otherwise get the volume (the text that gets placed into the value)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .