summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.config/polybar/focus8
1 files changed, 7 insertions, 1 deletions
diff --git a/.config/polybar/focus b/.config/polybar/focus
index 849a440..42edffb 100755
--- a/.config/polybar/focus
+++ b/.config/polybar/focus
@@ -35,7 +35,13 @@ my $task = $lines[2];
35$task =~ s/^\s+|\s+$//g; # left and right trim 35$task =~ s/^\s+|\s+$//g; # left and right trim
36$task =~ s/\s+/ /g; # reduce multiple whitespace into one 36$task =~ s/\s+/ /g; # reduce multiple whitespace into one
37 37
38my $context = `task context | grep yes | cut -d' ' -f1`;
39
38if ($task =~ m/^(.*)?\s(\d+\w+)$/g) { 40if ($task =~ m/^(.*)?\s(\d+\w+)$/g) {
39 print "$1 | $2"; 41 if ($context) {
42 print "$1 | $2 @ $context";
43 } else {
44 print "$1 | $2";
45 }
40} 46}
41# print $task; 47# print $task;