2023-11-14 14:00:38 +01:00
|
|
|
# nushell puts prompt at bottom of terminal on resize, so it's preferable to start on the bottom of the terminal
|
|
|
|
|
2023-11-29 11:25:24 +01:00
|
|
|
let has_tfetch = not (which tfetch | is-empty)
|
|
|
|
|
2023-11-14 14:00:38 +01:00
|
|
|
# tfetch takes 19 lines, 21 with prompt
|
2023-11-29 11:25:24 +01:00
|
|
|
let height = (stty size | split row " " | get 0 | into int) - (if $has_tfetch { 21 } else { 0 })
|
2023-11-14 14:00:38 +01:00
|
|
|
|
|
|
|
# skip lines so that the prompt starts at the bottom of the terminal
|
|
|
|
for i in 0..<$height {
|
|
|
|
print -n "\n"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Start tfetch
|
2023-11-29 11:25:24 +01:00
|
|
|
if $has_tfetch {
|
|
|
|
tfetch
|
|
|
|
}
|