awesomeWM / awesome-www

Website of AwesomeWM
https://awesomewm.org/
56 stars 34 forks source link

Add Caps Lock and Calendar widgets to recipe list #122

Closed stefano-m closed 6 years ago

stefano-m commented 7 years ago

I have written a couple of widgets to

  1. display the Caps Lock status
  2. embed the a calendar in the textclock widget

Maybe they are of interest and could be added to the recipe list.

Thanks.

psychon commented 7 years ago

I'm not really convinced, sorry.

The caps lock widget just spawns sleep 0.2 && xset -q and parses the output (no idea why the sleep, but I think I do not want to know) whenever the Caps_Lock key is pressed. Meh, but okay.

The calendar widget is documented as a thin wrapper around our calendar popup, falling back to something else in older versions. I'm not sure if this works at all since calls both calendar_popup:attach and does the same thing itself, calling :toggle(). So, basically when I click on the widget, the calendar popup is toggled twice, aka "nothing happens". At least I am confused by this code.

I'll leave this for others to decide. @blueyed ?

stefano-m commented 7 years ago

No worries, and thanks for the code review :)

The caps lock widget is really dumb, I had to use "sleep" or awesome would be too fast to parse the output and get it wrong.

I wrote calendar when I had some systems on older versions of Awesome and wanted a calendar that worked both with and without the widget.

Feel free to drop the PR if you feel that those recipes are not going to be helpful... I will try and use your feedback to improve them!

Thanks for your time.

stefano-m commented 7 years ago

@psychon FIY I have removed the call to attach in the calendar widget. Thanks again for the tip!

stefano-m commented 6 years ago

Since this PR is not getting any traction, I am going to close it.

Thanks for your feedback.