diff options
author | Andinus <andinus@nand.sh> | 2021-08-16 00:48:26 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2021-08-16 00:48:26 +0530 |
commit | f7991707b48f6f503e18dbac31b9af80290d9991 (patch) | |
tree | 051ca2490ec997be6687681d1669c496a2613221 /lib/Taurus/CLI.rakumod | |
parent | f60c2fb28918e4485fb6391356265bf14f1a9f91 (diff) | |
download | taurus-f7991707b48f6f503e18dbac31b9af80290d9991.tar.gz |
Focus bottom pane on selection
Diffstat (limited to 'lib/Taurus/CLI.rakumod')
-rw-r--r-- | lib/Taurus/CLI.rakumod | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Taurus/CLI.rakumod b/lib/Taurus/CLI.rakumod index a7759b0..7d80f51 100644 --- a/lib/Taurus/CLI.rakumod +++ b/lib/Taurus/CLI.rakumod @@ -77,11 +77,11 @@ multi sub MAIN ( $p0.select-first; $p0.select(2); $p0.on: select => -> :%meta { + my Int $fmt = 16; if %meta<all> { + ui.focus(:pane(1)); $p1.clear; with @logs { - my Int $fmt = 16; - my $outgoing = .grep(*.[2] eqv "Outgoing Call").map(*.[4]).sum; my $incoming = .grep(*.[2] eqv "Incoming Call").map(*.[4]).sum; @@ -90,9 +90,9 @@ multi sub MAIN ( $p1.put: "%-*s %s".sprintf($fmt, "Total:", seconds-to-str($outgoing + $incoming)); $p1.put: ""; } + $p1.select-first; } elsif %meta<number> -> $num { - my Int $fmt = 18; - + ui.focus(:pane(1)); $p1.clear; $p1.put: "Name: " ~ $_ with %contacts{$num}; $p1.put: "Number: " ~ $num; @@ -113,6 +113,7 @@ multi sub MAIN ( $p1.put: "%-*s %d".sprintf($fmt, "Missed Calls:", .grep(*.[2] eqv "Missed Call").elems); } + $p1.select-first; } } |