From 597280813177434105e78ba0933b0fd867a03edd Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Fri, 23 May 2025 21:39:07 +0100 Subject: [PATCH] pomodoro: show started task in pomodoro widget --- awesome/widgets/pomodoro.lua | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/awesome/widgets/pomodoro.lua b/awesome/widgets/pomodoro.lua index 035ed7f..c83accf 100644 --- a/awesome/widgets/pomodoro.lua +++ b/awesome/widgets/pomodoro.lua @@ -15,6 +15,31 @@ pomodoro.auto_start_pomodoro = true pomodoro.init() local pombox = wibox.layout.fixed.horizontal() +pombox:add(wibox.widget { + layout = wibox.layout.align.horizontal, + forced_width = 200, + expand = "outside", + nil, + { + layout = wibox.container.scroll.horizontal, + max_size = 200, + extra_space = 10, + step_function = wibox.container.scroll.step_functions.linear_increase, + speed = 20, + { + -- TODO: make this context aware + widget = awful.widget.watch('task +ACTIVE _unique description', + 1, + function(widget, stdout) + if not stdout or stdout == "" then + stdout = "No task started!" + end + widget:set_markup(''..stdout..'') + end) + }, + }, + nil, +}) pombox:add(pomodoro.icon_widget) pombox:add(pomodoro.widget) -- 2.50.1