From 749625e6123e529b33a0c51b327a3c48dc840acf Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Tue, 14 Nov 2023 14:00:38 +0100 Subject: [PATCH] Start at bottom --- nushell/config.nu | 3 +-- nushell/config/tfetch.nu | 12 ++++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 nushell/config/tfetch.nu diff --git a/nushell/config.nu b/nushell/config.nu index 12005c6..876d797 100644 --- a/nushell/config.nu +++ b/nushell/config.nu @@ -8,6 +8,5 @@ source ~/.config/nushell/config/gclone.nu source ~/.config/nushell/config/pass.nu source ~/.config/nushell/config/docker.nu source ~/.config/nushell/config/xrandr.nu +source ~/.config/nushell/config/tfetch.nu -# Start tfetch -tfetch diff --git a/nushell/config/tfetch.nu b/nushell/config/tfetch.nu new file mode 100644 index 0000000..45fd285 --- /dev/null +++ b/nushell/config/tfetch.nu @@ -0,0 +1,12 @@ +# nushell puts prompt at bottom of terminal on resize, so it's preferable to start on the bottom of the terminal + +# tfetch takes 19 lines, 21 with prompt +let height = (stty size | split row " " | get 0 | into int) - 21 + +# skip lines so that the prompt starts at the bottom of the terminal +for i in 0..<$height { + print -n "\n" +} + +# Start tfetch +tfetch