aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2021-08-16 00:48:26 +0530
committerAndinus <andinus@nand.sh>2021-08-16 00:48:26 +0530
commitf7991707b48f6f503e18dbac31b9af80290d9991 (patch)
tree051ca2490ec997be6687681d1669c496a2613221
parentf60c2fb28918e4485fb6391356265bf14f1a9f91 (diff)
downloadtaurus-f7991707b48f6f503e18dbac31b9af80290d9991.tar.gz
Focus bottom pane on selection
-rw-r--r--lib/Taurus/CLI.rakumod9
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;
}
}