@@ -124,6 +124,29 @@ local function tab_today()
124124 table.insert (lines , { { " 💻 No activity yet. Start coding!" , " commentfg" } })
125125 end
126126
127+ -- Projects (today)
128+ if ts .projects and next (ts .projects ) then
129+ local items = {}
130+ for name , stat in pairs (ts .projects ) do
131+ items [# items + 1 ] = { name = name , time = stat .time or 0 , lines = stat .lines or 0 }
132+ end
133+ table.sort (items , function (a , b )
134+ return a .time > b .time
135+ end )
136+
137+ table.insert (lines , {})
138+ table.insert (lines , { { " 🔥 Projects" , " exgreen" } })
139+ table.insert (lines , {})
140+ for i = 1 , math.min (3 , # items ) do
141+ local it = items [i ]
142+ table.insert (lines , {
143+ { " " .. it .name , i == 1 and " excyan" or " commentfg" },
144+ { " " .. fmt_time (it .time ), " normal" },
145+ { " (" .. fmt_num (it .lines ) .. " lines)" , " commentfg" },
146+ })
147+ end
148+ end
149+
127150 -- Hourly activity
128151 local ha = ts .hourly_activity
129152 if ha and next (ha ) then
@@ -141,7 +164,11 @@ local function tab_today()
141164 end
142165 local pct = math.floor (sum / max * 100 )
143166 local hl = pct > 60 and " exgreen" or pct > 30 and " exyellow" or " commentfg"
144- table.insert (lines , { { " " .. b [1 ] .. " " , " commentfg" }, { progress (pct , 25 ), hl } })
167+ table.insert (lines , {
168+ { " " .. b [1 ] .. " " , " commentfg" },
169+ { progress (pct , 25 ), hl },
170+ { string.format (" %3d%% (%d events)" , pct , sum ), " commentfg" },
171+ })
145172 end
146173 end
147174 end
0 commit comments