]> git.rmz.io Git - dotfiles.git/blob - awesome/widgets/pomodoro.lua
awesome: highlight urgent windows with nord11
[dotfiles.git] / awesome / widgets / pomodoro.lua
1 local pomodoro = require("widgets/pomodoro/init")
2 local wibox = require("wibox")
3 local awful = require("awful")
4
5 -- durations in seconds
6 pomodoro.short_pause_duration = 5 * 60
7 pomodoro.long_pause_duration = 30 * 60
8 pomodoro.work_duration = 25 * 60
9
10 -- format string
11 pomodoro.format = function (t) return " <b>"..t.."</b>" end
12 pomodoro.auto_start_pomodoro = false
13
14 pomodoro.init()
15
16 pombox = wibox.layout.fixed.horizontal()
17 pombox:add(pomodoro.icon_widget)
18 pombox:add(pomodoro.widget)
19
20 --TODO connect signals to something sensible (sb:20170130)
21 -- pomodoro:connect_signal("stop_working", function () naughty.notify{ text = "stop_working", timeout = 10 } end)
22 -- pomodoro:connect_signal("stop_pause", function () naughty.notify{ text = "stop_pause", timeout = 10 } end)
23 -- pomodoro:connect_signal("start_working", function () naughty.notify{ text = "start_working", timeout = 10 } end)
24 pomodoro:connect_signal("work_stop", function ()
25 utils.spawn_terminal("diary", { instance = "diary" })
26 end)
27
28 globalkeys = gears.table.join(globalkeys,
29 awful.key({ modkey, "Shift" }, "p", function() pomodoro:toggle() end)
30 )
31
32 return pombox