Enable resolution support by default but don't display anything if the user doesn't have the dependencies
This commit is contained in:
parent
b73da53045
commit
422cc5ac8b
|
@ -24,6 +24,7 @@ printinfo () {
|
||||||
info "Uptime" uptime
|
info "Uptime" uptime
|
||||||
info "Packages" packages
|
info "Packages" packages
|
||||||
info "Shell" shell
|
info "Shell" shell
|
||||||
|
info "Resolution" resolution
|
||||||
info "Desktop Environment" de
|
info "Desktop Environment" de
|
||||||
info "Window Manager" wm
|
info "Window Manager" wm
|
||||||
info "Theme" theme
|
info "Theme" theme
|
||||||
|
|
6
fetch
6
fetch
|
@ -42,6 +42,7 @@ printinfo () {
|
||||||
info "Uptime" uptime
|
info "Uptime" uptime
|
||||||
info "Packages" packages
|
info "Packages" packages
|
||||||
info "Shell" shell
|
info "Shell" shell
|
||||||
|
info "Resolution" resolution
|
||||||
info "Desktop Environment" de
|
info "Desktop Environment" de
|
||||||
info "Window Manager" wm
|
info "Window Manager" wm
|
||||||
info "Theme" theme
|
info "Theme" theme
|
||||||
|
@ -1104,11 +1105,8 @@ getsong () {
|
||||||
getresolution () {
|
getresolution () {
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Linux" | *"BSD")
|
"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}')
|
resolution=$(xdpyinfo 2>/dev/null | awk '/dimensions:/ {printf $2}')
|
||||||
else
|
|
||||||
resolution="Unknown"
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Mac OS X")
|
"Mac OS X")
|
||||||
|
|
Reference in New Issue