X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/c42c76ce2b85f537cd741a4a87da9e460f03d551..f2199b615e1624b4de93075a40a38b68d9aa8e15:/awesome/widgets/pomodoro.lua diff --git a/awesome/widgets/pomodoro.lua b/awesome/widgets/pomodoro.lua new file mode 100644 index 0000000..3c7af63 --- /dev/null +++ b/awesome/widgets/pomodoro.lua @@ -0,0 +1,22 @@ +local pomodoro = require("widgets/pomodoro/init") +local wibox = require("wibox") + +-- durations in seconds +pomodoro.short_pause_duration = 5 * 60 +pomodoro.long_pause_duration = 30 * 60 +pomodoro.work_duration = 25 * 60 + +-- format string +pomodoro.format = function (t) return " "..t.."" end + +pomodoro.init() + +pombox = wibox.layout.fixed.horizontal() +pombox:add(pomodoro.icon_widget) +pombox:add(pomodoro.widget) + +globalkeys = awful.util.table.join(globalkeys, + awful.key({ modkey, "Shift" }, "p", function() pomodoro:start() end) +) + +return pombox