From 0ee8d81649c027a8bfbd9d740325f5e922eb9705 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Mon, 16 Dec 2019 15:10:12 +0300 Subject: Change focus script to display time --- .config/polybar/focus | 12 ++++++------ .taskrc##c.desktop,h.Lowe | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.config/polybar/focus b/.config/polybar/focus index 8eeb92a..17c9862 100755 --- a/.config/polybar/focus +++ b/.config/polybar/focus @@ -34,10 +34,10 @@ $active_task_maybe =~ s/^\s+|\s+$//g; my @lines = split /\n/, $active_task_maybe; my $task = $lines[2]; -$task =~ s/^\s+|\s+$//g; -$task =~ s/\s+/ /g; +$task =~ s/^\s+|\s+$//g; # left and right trim +$task =~ s/\s+/ /g; # reduce multiple whitespace into one -# if ($task =~ m/.*?next (.*)$/) { -# print "$1"; -# } -print $task; +if ($task =~ m/^(.*)?\s(\d+\w+)$/g) { + print "$1 | $2"; +} +# print $task; diff --git a/.taskrc##c.desktop,h.Lowe b/.taskrc##c.desktop,h.Lowe index b79820e..c8419c4 100644 --- a/.taskrc##c.desktop,h.Lowe +++ b/.taskrc##c.desktop,h.Lowe @@ -62,8 +62,8 @@ report.todoConky.filter = status:pending and due.after:now and due.before:l report.todoConky.dateformat = D-M-y H:N (A) ### report for focus script -report.custom_focus.columns = description -report.custom_focus.labels = Description +report.custom_focus.columns = description,start.age +report.custom_focus.labels = Description,active report.custom_focus.description = Task to feed to focus script report.custom_focus.filter = status:pending and +ACTIVE -- cgit v1.2.3-70-g09d2