add event counter to shell startup
This commit is contained in:
parent
bb3ed01418
commit
e603b5ecd5
1 changed files with 15 additions and 1 deletions
|
@ -48,7 +48,21 @@ def flag [
|
||||||
|
|
||||||
def main [] {
|
def main [] {
|
||||||
print (flag $TRANS);
|
print (flag $TRANS);
|
||||||
print $"(ansi attr_bold) Hi jade, you're on HRT for ((date now) - ('2024-02-18T20:53' | into datetime) | format duration month)s now!";
|
let next_events = open ~/Docs/dates.csv
|
||||||
|
| update datetime {|ev| $ev.datetime | into datetime }
|
||||||
|
| sort-by datetime
|
||||||
|
| first
|
||||||
|
| each {|ev| $"(ansi attr_bold)($ev.event)(ansi reset) in (ansi attr_bold)(tfmt ($ev.datetime - (date now)))s(ansi reset)" };
|
||||||
|
print $"Hi jade, you're on HRT for (ansi reset)(ansi attr_bold)((date now) - ('2024-02-18T20:53' | into datetime) | format duration month)s(ansi reset) now! | Next Event: ($next_events)";
|
||||||
# print (flag $LESBIAN);
|
# print (flag $LESBIAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def tfmt [dur: duration] {
|
||||||
|
if ($dur < 1hr) {
|
||||||
|
return ($dur | format duration min);
|
||||||
|
} else if ($dur < 1day) {
|
||||||
|
return ($dur | format duration hr);
|
||||||
|
} else {
|
||||||
|
return ($dur | format duration day);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue