]> git.rmz.io Git - dotfiles.git/commitdiff
awesome: spawn diary at the start of pause
authorSamir Benmendil <me@rmz.io>
Tue, 31 Jan 2017 00:56:11 +0000 (00:56 +0000)
committerSamir Benmendil <me@rmz.io>
Tue, 31 Jan 2017 00:56:11 +0000 (00:56 +0000)
The pause timer should probably only start after the window is closed.

awesome/widgets/pomodoro.lua

index e55b1e4dddf9f43bf0ae21f0f03cbb6691178b59..3947aed71068ca7edfec32302b8a054a72f8c27d 100644 (file)
@@ -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)