mirror of
https://github.com/kmein/niveum
synced 2026-03-19 11:31:09 +01:00
feat(i3status-rust): add todo count
This commit is contained in:
@@ -69,6 +69,7 @@ in {
|
|||||||
net_wired = "🌐";
|
net_wired = "🌐";
|
||||||
net_wireless = "📶";
|
net_wireless = "📶";
|
||||||
pomodoro = "🍅 ";
|
pomodoro = "🍅 ";
|
||||||
|
tasks = "✅";
|
||||||
time = "📅 ";
|
time = "📅 ";
|
||||||
toggle_off = "👎";
|
toggle_off = "👎";
|
||||||
toggle_on = "👍";
|
toggle_on = "👍";
|
||||||
@@ -90,6 +91,32 @@ in {
|
|||||||
block = "custom";
|
block = "custom";
|
||||||
interval = 10;
|
interval = 10;
|
||||||
command = "newsboat-unread-count";
|
command = "newsboat-unread-count";
|
||||||
|
json = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "custom";
|
||||||
|
interval = 10;
|
||||||
|
command = pkgs.writers.writeDash "todo" ''
|
||||||
|
${pkgs.todoman}/bin/todo --porcelain | ${pkgs.jq}/bin/jq -r '
|
||||||
|
map(select(.due != null))
|
||||||
|
| (map(select(.due < now)) | length) as $overdue
|
||||||
|
| (map(select(.due >= now and .due < now + (60 * 60 * 24))) | length) as $dueToday
|
||||||
|
| {
|
||||||
|
icon: "tasks",
|
||||||
|
text: "\($overdue)+\($dueToday)",
|
||||||
|
state: (
|
||||||
|
if $overdue > 0 then
|
||||||
|
"Critical"
|
||||||
|
elif $dueToday == 0 then
|
||||||
|
"Good"
|
||||||
|
else
|
||||||
|
"Info"
|
||||||
|
end
|
||||||
|
)
|
||||||
|
}
|
||||||
|
'
|
||||||
|
'';
|
||||||
|
json = true;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
block = "weather";
|
block = "weather";
|
||||||
|
|||||||
Reference in New Issue
Block a user