GPU: [Linux] Hide duplicate lines
This commit is contained in:
parent
464a810f94
commit
631ae8d2b4
1 changed files with 3 additions and 3 deletions
6
neofetch
6
neofetch
|
@ -637,13 +637,13 @@ get_wm() {
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Mac OS X")
|
"Mac OS X")
|
||||||
ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm')"
|
ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm')"
|
||||||
|
|
||||||
case "$ps_line" in
|
case "$ps_line" in
|
||||||
*"kwm"*) wm="Kwm" ;;
|
*"kwm"*) wm="Kwm" ;;
|
||||||
*"Amethyst"*) wm="Amethyst" ;;
|
*"Amethyst"*) wm="Amethyst" ;;
|
||||||
*"Spectacle"*) wm="Spectacle" ;;
|
*"Spectacle"*) wm="Spectacle" ;;
|
||||||
*) wm="Quartz Compositor" ;;
|
*) wm="Quartz Compositor" ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Windows")
|
"Windows")
|
||||||
|
@ -1064,7 +1064,7 @@ get_gpu() {
|
||||||
"Linux")
|
"Linux")
|
||||||
# Read GPUs into array.
|
# Read GPUs into array.
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '/"Display|"3D|"VGA/ {print $3 " " $4}'))
|
gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '!a[$0]++ && /"Display|"3D|"VGA/ {print $3 " " $4}'))
|
||||||
IFS="$old_ifs"
|
IFS="$old_ifs"
|
||||||
|
|
||||||
# Number the GPUs if more than one exists.
|
# Number the GPUs if more than one exists.
|
||||||
|
|
Loading…
Reference in a new issue