From 4fe9341d182b2e4c58898117110f4a8eb313b0f2 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 16 Jan 2019 20:34:10 +0100 Subject: tv q-todo: highlight urgent stuff --- tv/5pkgs/simple/q/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tv') diff --git a/tv/5pkgs/simple/q/default.nix b/tv/5pkgs/simple/q/default.nix index 0e2aecb..7906b96 100644 --- a/tv/5pkgs/simple/q/default.nix +++ b/tv/5pkgs/simple/q/default.nix @@ -278,7 +278,11 @@ let select(now >= $date) | - "\u001b[38;5;208m\(.)\u001b[m" + ($text | test("\\[URGENT]"; "i")) as $urgent | + (if $urgent then "38;5;196" else "38;5;208" end) as $sgr | + if $urgent then sub("\\s*\\[URGENT]\\s*"; " "; "i") else . end | + + "\u001b[\($sgr)m\(.)\u001b[m" ) | if length == 0 then "nothing to remind" else .[] end ''} -- cgit v1.2.3