Skip to main content

Session

What​

Show the current user and host name.

Sample Configuration​

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

Template (info)​

default template
{{ if .SSHSession }}\ueba9 {{ end }}{{ .UserName }}@{{ .HostName }}

Properties​

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