diff options
| -rwxr-xr-x | .config/polybar/focus | 8 |
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 | ||
| 38 | my $context = `task context | grep yes | cut -d' ' -f1`; | ||
| 39 | |||
| 38 | if ($task =~ m/^(.*)?\s(\d+\w+)$/g) { | 40 | if ($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; |
