URxvt 中的电池条?

5 shell arch-linux terminal urxvt

我正在浏览 URxvt 上的 ArchLinux 线程,我在帖子 #184 中发现了一个我正在疯狂寻找的设置。

在此处输入图片说明

看起来 PS1 中有某种电池条,那里也有位图。我对 Linux 并不陌生,但我找不到任何关于如何完成的信息。

如果只是针对某个特定的shell 就好了,我只是想了解更多。

jas*_*yan 4

它是一个 zsh shell 提示符,Oblique 的配置在 github 上共享。

提示的基本内容是:

# prompt theme
setopt prompt_subst
PROMPT='%{$fg[blue]%}[%D{%d/%m/%y} %T]%{$reset_color%} %(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m%{$reset_color%} %{$fg[magenta]%}[%(!.%1~.%~)]%{$reset_color%} $(_git_prompt_info)
%{$fg[red]%}>>%{$reset_color%} '
# use battery status only if we are in linux console
if [[ $TERM = linux* ]]; then
    RPROMPT='$(_battery_status)'
fi
Run Code Online (Sandbox Code Playgroud)

电池状态是一个单独的脚本,图形是使用 unicode 字符创建的。