X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/f17cc00a01932a3a5e34ff1e3d4acd1272b079e4..cf75e935fef989adf6958d77d1cf69ee4bbec57b:/awesome/widgets/pomodoro.lua diff --git a/awesome/widgets/pomodoro.lua b/awesome/widgets/pomodoro.lua index 942967d..7e7a5c1 100644 --- a/awesome/widgets/pomodoro.lua +++ b/awesome/widgets/pomodoro.lua @@ -2,12 +2,13 @@ local pomodoro = require("widgets/pomodoro/init") local wibox = require("wibox") -- durations in seconds -pomodoro.short_pause_duration = 0.5 * 60 -pomodoro.long_pause_duration = 1 * 60 -pomodoro.work_duration = 1 * 60 +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.auto_start_pomodoro = false pomodoro.init() @@ -16,13 +17,15 @@ pombox:add(pomodoro.icon_widget) pombox:add(pomodoro.widget) --TODO connect signals to something sensible (sb:20170130) -pomodoro:connect_signal("stop_working", function () naughty.notify{ text = "stop_working", timeout = 10 } end) -pomodoro:connect_signal("stop_pause", function () naughty.notify{ text = "stop_pause", timeout = 10 } end) -pomodoro:connect_signal("start_working", function () naughty.notify{ text = "start_working", timeout = 10 } end) -pomodoro:connect_signal("start_pause", function () naughty.notify{ text = "start_pause", timeout = 10 } end) +-- pomodoro:connect_signal("stop_working", function () naughty.notify{ text = "stop_working", timeout = 10 } end) +-- pomodoro:connect_signal("stop_pause", function () naughty.notify{ text = "stop_pause", timeout = 10 } end) +-- pomodoro:connect_signal("start_working", function () naughty.notify{ text = "start_working", timeout = 10 } end) +pomodoro:connect_signal("work_stop", function () + awful.spawn(terminal.." -name diary -e diary") +end) globalkeys = awful.util.table.join(globalkeys, - awful.key({ modkey, "Shift" }, "p", function() pomodoro:start() end) + awful.key({ modkey, "Shift" }, "p", function() pomodoro:toggle() end) ) return pombox