mirror of
https://github.com/dylanaraps/neofetch.git
synced 2026-01-01 13:16:07 +00:00
added Linux support
This commit is contained in:
7
neofetch
7
neofetch
@@ -1273,8 +1273,13 @@ getsong () {
|
||||
getresolution () {
|
||||
case "$os" in
|
||||
"Linux" | *"BSD")
|
||||
type -p xdpyinfo >/dev/null 2>&1 && \
|
||||
if type -p xrandr >/dev/null 2>&1; then
|
||||
resolution=$(xrandr --nograb --current | awk 'match($0,/[0-0]{2,3}.[0-9]{2}\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}')
|
||||
resolution=${resolution//\*}
|
||||
|
||||
elif type -p xdpyinfo >/dev/null 2>&1 && \
|
||||
resolution=$(xdpyinfo 2>/dev/null | awk '/dimensions:/ {printf $2}')
|
||||
fi
|
||||
;;
|
||||
|
||||
"Mac OS X")
|
||||
|
||||
Reference in New Issue
Block a user