mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-03 16:51:29 +00:00
resolution: Added xwininfo support.
This commit is contained in:
7
neofetch
7
neofetch
@@ -2520,6 +2520,11 @@ get_resolution() {
|
||||
esac
|
||||
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
|
||||
resolution="$(xdpyinfo | awk '/dimensions:/ {printf $2}')"
|
||||
fi
|
||||
@@ -3687,7 +3692,7 @@ make_thumbnail() {
|
||||
;;
|
||||
|
||||
*)
|
||||
time convert \
|
||||
convert \
|
||||
-background none \
|
||||
"$image" \
|
||||
-strip \
|
||||
|
Reference in New Issue
Block a user