Term: Fix mate-terminal font when maximized or fullscreen

This commit is contained in:
Michael Straube 2017-07-26 20:53:17 +02:00
parent 9483a8941f
commit 3ccc42042a
1 changed files with 5 additions and 6 deletions

View File

@ -1814,13 +1814,12 @@ get_term_font() {
mate-terminal --save-config="$mateterm_config"
role="$(xprop -id "${WINDOWID}" WM_WINDOW_ROLE)"
role="${role##*= }"
role="${role##* }"
role="${role//\"}"
term_id="$(grep -A1 "${role//\"}" "$mateterm_config")"
term_id="${term_id##*=}"
profile="$(grep -A1 "\[$term_id\]" "$mateterm_config")"
profile="${profile##*=}"
profile="$(awk -F '=' -v r="$role" \
'$0~r {getline; if(/Maximized/) getline; if(/Fullscreen/) getline; id=$2"]"}
$0~id {if(id) {getline; print $2; exit}}' "$mateterm_config")"
rm -f "$mateterm_config"