瀏覽代碼

resolution: Fix output when monitor is turned off.

Dylan Araps 5 年之前
父節點
當前提交
0e448167c0
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      neofetch

+ 1 - 1
neofetch

@@ -2905,7 +2905,7 @@ get_resolution() {
                     "off")
                         resolution="$(xrandr --nograb --current |\
                                       awk -F 'connected |\\+|\\(' \
-                                             '/ connected/ && $2 {printf $2 ", "}')"
+                                             '/ connected.*[0-9]+x[0-9]+\+/ && $2 {printf $2 ", "}')"
 
                         resolution="${resolution/primary, }"
                         resolution="${resolution/primary }"