[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 break
;; ;;
"."*"-wrap"*)
[[ $name =~ \.(.*)-wrap.* ]] && term=${BASH_REMATCH[1]}
;;
"gnome-terminal-") term="gnome-terminal" ;; "gnome-terminal-") term="gnome-terminal" ;;
"cutefish-termin") term="cutefish-terminal" ;; "cutefish-termin") term="cutefish-terminal" ;;
"urxvtd") term="urxvt" ;; "urxvtd") term="urxvt" ;;
@ -4047,13 +4051,23 @@ END
[[ -f "${XDG_CONFIG_HOME}/termite/config" ]] && \ [[ -f "${XDG_CONFIG_HOME}/termite/config" ]] && \
termite_config="${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\]/ { term_font="$(awk -F '= ' '/\[options\]/ {
opt=1 opt=1
} }
/^\s*font/ { /^\s*font/ {
if(opt==1) a=$2; if(opt==1) a=$2;
opt=0 opt=0
} END {print a}' "/etc/xdg/termite/config" \ } END {print a}' "$XDG_DIR/termite/config" \
"$termite_config")" "$termite_config")"
;; ;;