From: Samir Benmendil Date: Tue, 31 Jan 2017 00:56:11 +0000 (+0000) Subject: awesome: spawn diary at the start of pause X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/b3cb552f0e19eb47b546c266c0b85fe349dbb52c?ds=sidebyside awesome: spawn diary at the start of pause The pause timer should probably only start after the window is closed. --- diff --git a/awesome/widgets/pomodoro.lua b/awesome/widgets/pomodoro.lua index e55b1e4..3947aed 100644 --- a/awesome/widgets/pomodoro.lua +++ b/awesome/widgets/pomodoro.lua @@ -16,10 +16,12 @@ 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("start_pause", function () + awful.spawn(terminal.." -name diary -e vim -c 'call vimwiki#diary#make_note(v:count1)' + -c 'r !date +\" * \\%H:\\%M \"' -c 'start!'") +end) globalkeys = awful.util.table.join(globalkeys, awful.key({ modkey, "Shift" }, "p", function() pomodoro:start() end)