You are not logged in.

#1 2017-01-01 20:06:20

AmagicalFishy
Member
Registered: 2016-12-10
Posts: 69

Awesome-WM: Help creating a timer widget controlled by the run-prompt

I've been using Arch for a few months, and Awesome for a week or two now, and everything's going... well, awesomely. I am currently using Awesome 4.0

I have managed to do everything 'til now with the help of online resources, but I'm not sure where to even start with this one.

Currently, I have a small timer command in ~/bin that I run with Mod4 + R, and typing in something like "timer 10m"

#!/bin/bash
(sleep $1 && notify-send -u critical "Time's up" && paplay ~/.local/share/sounds/dingling.wav) &
echo "Timer set." 

What I'd like something like this:
- A widget that reads 00:00 on my wibox bar
- When I Mod4 + R and type "timer 10m Study" the widget will read "10:00 - Study" and countdown from there
- Upon hitting 00:00 again, it will play the dingling.wav sound and naughty.notify a little "Timer's Up" notice

I am really not sure how to go about doing this *at all*. Would anyone mind pointing me in the right direction, or giving me an example I can work from? Primarily, I'm not sure how to:

- Create a textbox widget so that it counts down with seconds; maybe using wibox.widget.textclock ?
- Use the run-prompt to control widgets

Thanks for any help anyone can offer

Offline

Board footer

Powered by FluxBB