Merge pull request #1375 from arisinfenix/term_font
Fixes and updates for Konsole font detection
This commit is contained in:
commit
b9ade82233
9
neofetch
9
neofetch
|
@ -3102,6 +3102,8 @@ END
|
||||||
# Get Process ID of current konsole window / tab
|
# Get Process ID of current konsole window / tab
|
||||||
child="$(get_ppid "$$")"
|
child="$(get_ppid "$$")"
|
||||||
|
|
||||||
|
QT_BINDIR="$(qtpaths --binaries-dir)" && PATH+=":$QT_BINDIR"
|
||||||
|
|
||||||
IFS=$'\n' read -d "" -ra konsole_instances \
|
IFS=$'\n' read -d "" -ra konsole_instances \
|
||||||
<<< "$(qdbus | awk '/org.kde.konsole/ {print $1}')"
|
<<< "$(qdbus | awk '/org.kde.konsole/ {print $1}')"
|
||||||
|
|
||||||
|
@ -3112,17 +3114,20 @@ END
|
||||||
if ((child == "$(qdbus "$i" "$session" processId)")); then
|
if ((child == "$(qdbus "$i" "$session" processId)")); then
|
||||||
profile="$(qdbus "$i" "$session" environment |\
|
profile="$(qdbus "$i" "$session" environment |\
|
||||||
awk -F '=' '/KONSOLE_PROFILE_NAME/ {print $2}')"
|
awk -F '=' '/KONSOLE_PROFILE_NAME/ {print $2}')"
|
||||||
|
[[ $profile ]] || profile="$(qdbus "$i" "$session" profile)"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
[[ "$profile" ]] && break
|
[[ $profile ]] && break
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ $profile ]] || return
|
||||||
|
|
||||||
# We could have two profile files for the same profile name, take first match
|
# We could have two profile files for the same profile name, take first match
|
||||||
profile_filename="$(grep -l "Name=${profile}" "$HOME"/.local/share/konsole/*.profile)"
|
profile_filename="$(grep -l "Name=${profile}" "$HOME"/.local/share/konsole/*.profile)"
|
||||||
profile_filename="${profile_filename/$'\n'*}"
|
profile_filename="${profile_filename/$'\n'*}"
|
||||||
|
|
||||||
[[ "$profile_filename" ]] && \
|
[[ $profile_filename ]] && \
|
||||||
term_font="$(awk -F '=|,' '/Font=/ {print $2,$3}' "$profile_filename")"
|
term_font="$(awk -F '=|,' '/Font=/ {print $2,$3}' "$profile_filename")"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
Reference in New Issue