From 4b399f06a2e200eccce60414a0fc8c40dbbef290 Mon Sep 17 00:00:00 2001 From: Ishimoto Shinobu Date: Fri, 10 May 2019 21:59:38 +0900 Subject: [PATCH 1/5] januslinux is ataraxia linux! Signed-off-by: Ishimoto Shinobu --- neofetch | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/neofetch b/neofetch index 250ad171..c70a20fe 100755 --- a/neofetch +++ b/neofetch @@ -6437,25 +6437,33 @@ WW W EOF ;; - "januslinux"*|"janus"*) - set_colors 4 7 4 + "januslinux"*|"janus"*|"Ataraxia Linux"*|"Ataraxia"*) + set_colors 4 5 6 2 read -rd '' ascii_data <<'EOF' -${c1}oooooooooooooooooooooooooooooooo -oooooooooooooooooooooooooooooooo -oooooooooooooooooooooooooooooooo -ooooooooooooo${c2}dOWWOd${c1}ooooooooooooo -oooooooooood${c2}0WMMMMWkd${c1}ooooooooooo -oooooooood${c2}0WMMMMMX0KN0d${c1}oooolllll -ooooooo${c2}xKWMMMMWKxKWMMMWKx${c3}lllllll -ooooo${c2}xXMMMMMW0doooOWMMMMMXx${c3}lllll -ooooo${c2}xXMMMMMW0doloONMMMMMXx${c3}lllll -ooooooo${c2}xKWMMMWXO0WMMMMMKx${c3}lllllll -ooooooooo${c2}d0NX0KWMMMMW0d${c3}lllllllll -oooooooooooo${c2}xWMMMMW0o${c3}llllllccccc -oooooooooooll${c2}o0WW0o${c3}lllllcccccccc -ooooooooooollll${c2}oo${c3}llllllccccccccc -oooooooooollllllllllllcccccccccc -oooooooooollllllllllllcccccccccc +${c1} 'l: + loooooo + loooo coooool + looooooooooooooooooool + looooooooooooooooo + lool cooo + coooooooloooooooo + clooooo ;lood cloooo + :loooocooo cloo loooo + loooo :ooooool loooo +looo cooooo cooooo +looooooooooooo ;loooooo ${c2}looooooc +${c1}looooooooo loo cloooooool ${c2}looooc +${c1} cooo cooooooooooo ${c2}looolooooool +${c1} cooo: ${c2}coooooooooooooooooool + loooooooooooolc: loooc; + cooo: loooooooooooc + ;oool looooooo: + coool olc, + looooc ,, + coooooc loc + :oooool, coool:, looool:, + looool: ooooooooooooooo: + cooolc .ooooooooooool EOF ;; From 85c6a5dd16ac54b350255acdbf3b3122b2bd358a Mon Sep 17 00:00:00 2001 From: Vlad Glagolev Date: Tue, 14 May 2019 06:33:24 +0000 Subject: [PATCH 2/5] Retrieve public IP info via drill --- neofetch | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/neofetch b/neofetch index 2064d9d0..3bd821fe 100755 --- a/neofetch +++ b/neofetch @@ -3371,6 +3371,11 @@ get_public_ip() { [[ "$public_ip" =~ ^\; ]] && unset public_ip fi + if [[ -z "$public_ip" ]] && type -p drill >/dev/null; then + public_ip="$(drill myip.opendns.com @resolver1.opendns.com | \ + awk '/^myip\./ && $3 == "IN" {print $5}')" + fi + if [[ -z "$public_ip" ]] && type -p curl >/dev/null; then public_ip="$(curl --max-time "$public_ip_timeout" -w '\n' "$public_ip_host")" fi From accccca8e9039d7bfbcf1d8871d64049d3e1f4cb Mon Sep 17 00:00:00 2001 From: Lucius Hu Date: Mon, 3 Jun 2019 00:23:05 -0400 Subject: [PATCH 3/5] kitty font parsing where font name has whitespaces --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 3bd821fe..cb4b9fe4 100755 --- a/neofetch +++ b/neofetch @@ -2981,7 +2981,7 @@ END kitty_config="$(kitty --debug-config)" [[ "$kitty_config" != *font_family* ]] && return - term_font="$(awk '/^font_family|^font_size/ {printf $2 " "}' <<< "$kitty_config")" + term_font="$(awk '/^font_family|^font_size/ {$1="";gsub("^ *","",$0);print $0}' <<< "$kitty_config")" ;; "konsole" | "yakuake") From b58942d6c6229c5dcac7c3914b1f9b161b8721bc Mon Sep 17 00:00:00 2001 From: Lucius Hu Date: Mon, 3 Jun 2019 03:38:30 -0400 Subject: [PATCH 4/5] Work for multiple GPUs now 1. Replace `\\"` with `\"`, otherwise awk warns `\"' is not a known regexp operator 2. Use the slot number of `lspci -mm` return value to determine whether two video cards are in different PCI slots, and therefore are two different GPUS. --- neofetch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 3bd821fe..2ca10880 100755 --- a/neofetch +++ b/neofetch @@ -2135,9 +2135,9 @@ get_gpu() { case "$os" in "Linux") # Read GPUs into array. - gpu_cmd="$(lspci -mm | awk -F '\\"|\\" \\"|\\(' \ - '/"Display|"3D|"VGA/ {a[$0] = $3 " " $4} END {for(i in a) - {if(!seen[a[i]]++) print a[i]}}')" + gpu_cmd="$(lspci -mm | awk -F '\"|\" \"|\\(' \ + '/"Display|"3D|"VGA/ {a[$0] = $1 " " $3 " " $4} + END {for(i in a) {if(!seen[a[i]]++) print a[i]}}')" IFS=$'\n' read -d "" -ra gpus <<< "$gpu_cmd" # Remove duplicate Intel Graphics outputs. From f3dbd54a6b0ddb9364008073baf1ddade14bf3b7 Mon Sep 17 00:00:00 2001 From: Lucius Hu Date: Fri, 7 Jun 2019 02:56:57 -0400 Subject: [PATCH 5/5] make line below 100 columns --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index cb4b9fe4..6058b2e0 100755 --- a/neofetch +++ b/neofetch @@ -2981,7 +2981,8 @@ END kitty_config="$(kitty --debug-config)" [[ "$kitty_config" != *font_family* ]] && return - term_font="$(awk '/^font_family|^font_size/ {$1="";gsub("^ *","",$0);print $0}' <<< "$kitty_config")" + term_font="$(awk '/^font_family|^font_size/ {$1="";gsub("^ *","",$0);print $0}' \ + <<< "$kitty_config")" ;; "konsole" | "yakuake")