跳转到主内容

会话

非官方测试版翻译

本页面由 PageTurner AI 翻译(测试版)。未经项目官方认可。 发现错误? 报告问题 →

功能

显示当前用户和主机名。

示例配置

{
"type": "session",
"style": "diamond",
"foreground": "#ffffff",
"background": "#c386f1",
"leading_diamond": "",
"trailing_diamond": "",
"template": "{{ if .SSHSession }} {{ end }}{{ .UserName }}"
}

模板 (信息)

默认模板
 {{ if .SSHSession }}\ueba9 {{ end }}{{ .UserName }}@{{ .HostName }}

属性

NameTypeDescription
.UserNamestringthe current user's name
.HostNamestringthe current computer's name
.SSHSessionbooleanactive SSH session or not
.Rootbooleanare you a root/admin user or not