Enable resolution support by default but don't display anything if the user doesn't have the dependencies

This commit is contained in:
Dylan 2016-02-23 19:46:22 +11:00
parent b73da53045
commit 422cc5ac8b
2 changed files with 3 additions and 4 deletions

View file

@ -24,6 +24,7 @@ printinfo () {
info "Uptime" uptime
info "Packages" packages
info "Shell" shell
info "Resolution" resolution
info "Desktop Environment" de
info "Window Manager" wm
info "Theme" theme

6
fetch
View file

@ -42,6 +42,7 @@ printinfo () {
info "Uptime" uptime
info "Packages" packages
info "Shell" shell
info "Resolution" resolution
info "Desktop Environment" de
info "Window Manager" wm
info "Theme" theme
@ -1104,11 +1105,8 @@ getsong () {
getresolution () {
case "$os" in
"Linux" | *"BSD")
if type -p xdpyinfo >/dev/null 2>&1; then
type -p xdpyinfo >/dev/null 2>&1 && \
resolution=$(xdpyinfo 2>/dev/null | awk '/dimensions:/ {printf $2}')
else
resolution="Unknown"
fi
;;
"Mac OS X")