resolution: Added xwininfo support.
This commit is contained in:
parent
e3723d277c
commit
21103d9ada
1 changed files with 6 additions and 1 deletions
7
neofetch
7
neofetch
|
@ -2520,6 +2520,11 @@ get_resolution() {
|
||||||
esac
|
esac
|
||||||
resolution="${resolution//\*}"
|
resolution="${resolution//\*}"
|
||||||
|
|
||||||
|
elif type -p xwininfo >/dev/null; then
|
||||||
|
read -r w h \
|
||||||
|
< <(xwininfo -root | awk -F':' '/Width|Height/ {printf $2}')
|
||||||
|
resolution="${w}x${h}"
|
||||||
|
|
||||||
elif type -p xdpyinfo >/dev/null; then
|
elif type -p xdpyinfo >/dev/null; then
|
||||||
resolution="$(xdpyinfo | awk '/dimensions:/ {printf $2}')"
|
resolution="$(xdpyinfo | awk '/dimensions:/ {printf $2}')"
|
||||||
fi
|
fi
|
||||||
|
@ -3687,7 +3692,7 @@ make_thumbnail() {
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
time convert \
|
convert \
|
||||||
-background none \
|
-background none \
|
||||||
"$image" \
|
"$image" \
|
||||||
-strip \
|
-strip \
|
||||||
|
|
Loading…
Reference in a new issue