[PR] dylanaraps/neofetch#1134 from bessonm - Improve nix support with termite

Upstream PR: https://github.com/dylanaraps/neofetch/pull/1134
Thanks to @bessonm

Co-authored-by: bessonm <besson.mael@gmail.com>
This commit is contained in:
Azalea (on HyDEV-Daisy) 2022-08-11 20:55:34 -04:00
parent 002a10466f
commit 1f55b8d2e8

View file

@ -3774,6 +3774,10 @@ get_term() {
break
;;
"."*"-wrap"*)
[[ $name =~ \.(.*)-wrap.* ]] && term=${BASH_REMATCH[1]}
;;
"gnome-terminal-") term="gnome-terminal" ;;
"cutefish-termin") term="cutefish-terminal" ;;
"urxvtd") term="urxvt" ;;
@ -4047,13 +4051,23 @@ END
[[ -f "${XDG_CONFIG_HOME}/termite/config" ]] && \
termite_config="${XDG_CONFIG_HOME}/termite/config"
XDG_DIR="/etc/xdg"
OLD_IFS=$IFS
IFS=":"
for directory in $XDG_CONFIG_DIRS; do
if [[ -f "$directory/termite/config" ]]; then
XDG_DIR="$directory"
break
fi
done
term_font="$(awk -F '= ' '/\[options\]/ {
opt=1
}
/^\s*font/ {
if(opt==1) a=$2;
opt=0
} END {print a}' "/etc/xdg/termite/config" \
} END {print a}' "$XDG_DIR/termite/config" \
"$termite_config")"
;;