From 9657b8771f90c394c55966462e09f7161f91aeea Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Fri, 29 Nov 2024 15:48:39 +0100 Subject: [PATCH] add bahn.expert lookup command to nu config --- other/config.nu | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/other/config.nu b/other/config.nu index 6dbae6e..b03a517 100644 --- a/other/config.nu +++ b/other/config.nu @@ -882,6 +882,17 @@ def nev [ unit = day ] { | format duration $unit } +# TODO: intermediate stations +def bx [from: string to: string] { + let map = open ~/Docs/ril100map.json; + let start = $map | get ($from | str upcase) | first; + let dest = $map | get ($to | str upcase) | first; + + let url = $"https://bahn.expert/routing/($start)/($dest)/0/"; + print $url; + ^bash -c $"nohup chromium '($url)' &"; +} + alias gnix = cd ~/nix-configs; alias grepo = cd ~/Documents/repos; alias wh = wormhole-rs; @@ -907,3 +918,5 @@ alias bash = echo $"(ansi red)no, fuck that shit!"; alias sh = echo $"(ansi red)no, fuck that shit!"; alias zsh = echo $"(ansi red)no, fuck that shit!"; alias fish = echo $"(ansi red)no, fuck that shit!"; + +alias px = pulsemixer;