mirror of
https://github.com/KiTTYsh/dotfiles.git
synced 2025-12-09 20:59:16 -05:00
nushell: show remote host in title
This commit is contained in:
@@ -1,6 +1,17 @@
|
|||||||
# Disable welcome message per https://www.nushell.sh/book/configuration.html#remove-welcome-message
|
# Disable welcome message per https://www.nushell.sh/book/configuration.html#remove-welcome-message
|
||||||
$env.config.show_banner = false
|
$env.config.show_banner = false
|
||||||
|
|
||||||
|
# Configure window title with SSH hostname prefix
|
||||||
|
$env.config.hooks.pre_prompt = [{
|
||||||
|
let title_prefix = if "SSH_CONNECTION" in $env {
|
||||||
|
$"[(sys host | get hostname)] "
|
||||||
|
} else {
|
||||||
|
""
|
||||||
|
}
|
||||||
|
|
||||||
|
print -n $"(ansi title)($title_prefix)(pwd | str replace $env.HOME "~")(ansi st)"
|
||||||
|
}]
|
||||||
|
|
||||||
# Set theme
|
# Set theme
|
||||||
source ($nu.default-config-dir | path join "themes/catppuccin/themes/catppuccin_mocha.nu")
|
source ($nu.default-config-dir | path join "themes/catppuccin/themes/catppuccin_mocha.nu")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user