Foundations for terminal font support
This commit is contained in:
parent
4f3f24589a
commit
b1402c0372
35
neofetch
35
neofetch
|
@ -56,7 +56,8 @@ printinfo () {
|
|||
info "WM Theme" wmtheme
|
||||
info "Theme" theme
|
||||
info "Icons" icons
|
||||
info "Font" font
|
||||
info "Terminal Emulator" term
|
||||
info "Terminal Font" termfont
|
||||
info "CPU" cpu
|
||||
info "GPU" gpu
|
||||
info "Memory" memory
|
||||
|
@ -1734,6 +1735,38 @@ getfont () {
|
|||
|
||||
# }}}
|
||||
|
||||
# Terminal Emulator {{{
|
||||
|
||||
getterm () {
|
||||
parent="$(ps -p ${1:-$PPID} -o ppid=)"
|
||||
name="$(ps -p $parent -o comm=)"
|
||||
|
||||
case "$name" in
|
||||
"${SHELL/*\/}" | *"sh") getterm "$parent" ;;
|
||||
*) term="$name" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# }}}
|
||||
|
||||
# Terminal Emulator Font {{{
|
||||
|
||||
gettermfont () {
|
||||
[ -z "$term" ] && getterm
|
||||
|
||||
case "$term" in
|
||||
"urxvt"*)
|
||||
# Need to figure out how to best parse the Xresources file.
|
||||
;;
|
||||
|
||||
"xfce4-terminal")
|
||||
termfont="$(awk -F '=' '/FontName/ {printf $2}' "${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc")"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# }}}
|
||||
|
||||
# Disk Usage {{{
|
||||
|
||||
getdisk () {
|
||||
|
|
Reference in New Issue