macOS: Fix xquartz issue.
This commit is contained in:
parent
c69e5ef041
commit
80299bd064
5
neofetch
5
neofetch
|
@ -3686,6 +3686,11 @@ get_term_size() {
|
||||||
term_width="${term_size[2]/t*}"
|
term_width="${term_size[2]/t*}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If the sequences above don't work and the user is on a macOS system
|
||||||
|
# or a system not running an X server, return early.
|
||||||
|
[[ -z "$DISPLAY" || "$os" == "Mac OS X" ]] && \
|
||||||
|
{ term_width=0; return; }
|
||||||
|
|
||||||
# Get terminal width/height if \e[14t is unsupported.
|
# Get terminal width/height if \e[14t is unsupported.
|
||||||
if [[ -z "$term_width" ]] || (( "$term_width" < 50 )); then
|
if [[ -z "$term_width" ]] || (( "$term_width" < 50 )); then
|
||||||
if type -p xdotool >/dev/null 2>&1; then
|
if type -p xdotool >/dev/null 2>&1; then
|
||||||
|
|
Reference in New Issue