From af4cf16bf4ec5c9ad4a93d71f715fdf14c88db6d Mon Sep 17 00:00:00 2001 From: ncmprhnsbl Date: Thu, 17 Sep 2020 21:58:37 +1000 Subject: [PATCH 1/6] add song= support for MellowPlayer using get_song_dbus (#1558) * add song= support for MellowPlayer using get_song_dbus * adjusted indent for mellowplayer get_song_dbus Co-authored-by: ncmprhnsb1 --- neofetch | 3 +++ 1 file changed, 3 insertions(+) diff --git a/neofetch b/neofetch index 0df70a8a..bce4e2a9 100755 --- a/neofetch +++ b/neofetch @@ -508,6 +508,7 @@ disk_percent="on" # iTunes # juk # lollypop +# MellowPlayer # mocp # mopidy # mpd @@ -2696,6 +2697,7 @@ get_song() { "iTunes" "juk" "lollypop" + "MellowPlayer" "mocp" "mopidy" "mpd" @@ -2772,6 +2774,7 @@ get_song() { "netease-cloud-music"*) get_song_dbus "netease-cloud-music" ;; "plasma-browser-integration"*) get_song_dbus "plasma-browser-integration" ;; "io.elementary.music"*) get_song_dbus "Music" ;; + "MellowPlayer"*) get_song_dbus "MellowPlayer3" ;; "mpd"* | "mopidy"*) song="$(mpc -f '%artist% \n%album% \n%title%' current "${mpc_args[@]}")" From 8a9eacbab8653bb5f4546d51e50af3b15518caaa Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sat, 19 Sep 2020 23:47:15 +0200 Subject: [PATCH 2/6] os: Add Live Raizo (#1560) --- neofetch | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/neofetch b/neofetch index bce4e2a9..3c27b00e 100755 --- a/neofetch +++ b/neofetch @@ -8108,6 +8108,31 @@ ${c2} ``-:::::-`` EOF ;; + "Live Raizo"* | "Live_Raizo"*) + set_colors 3 + read -rd '' ascii_data <<'EOF' +${c1} `......` + -+shmNMMMMMMNmhs/. + :smMMMMMmmhyyhmmMMMMMmo- + -hMMMMd+:. `----` .:odMMMMh- + `hMMMN+. .odNMMMMMMNdo. .yMMMMs` + hMMMd. -dMMMMmdhhdNMMMNh` .mMMMh +oMMMm` :MMMNs.:sddy:-sMMMN- `NMMM+ +mMMMs dMMMo sMMMMMMd yMMMd sMMMm +----` .---` oNMMMMMh `---. .---- + .sMMy: + /MM/ + +dMMms. + hMMMMMMN + `dMMMMMMm: + .+ss+sMNysMMoomMd+ss+. + +MMMMMMN` +MM/ hMMMMMNs + sMMMMMMm-hNMMMd-hMMMMMMd + :yddh+`hMMMMMMN :yddy/` + .hMMMMd: + `..` +EOF + ;; "mx_small"*) set_colors 4 6 7 From f74746d5b94727587fccd43820396335e0d928b0 Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Sun, 20 Sep 2020 18:28:17 +0200 Subject: [PATCH 3/6] os: Add Quibian (#1561) --- neofetch | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/neofetch b/neofetch index 3c27b00e..e8de6b06 100755 --- a/neofetch +++ b/neofetch @@ -9110,6 +9110,30 @@ ${c1} `..--..` EOF ;; + "Quibian"*) + set_colors 3 7 + read -rd '' ascii_data <<'EOF' +${c1} `.--::::::::--.` + `.-:::-..`` ``..-::-.` + .::::-` .${c2}+${c1}:`` `.-::.` + .::::.` -::::::-` `.::. + `-:::-` -:::::::::--..`` .::` + `::::- .${c2}oy${c1}:::::::---.```.: `::` + -:::: `.-:::::::::::-.``` `:: +.::::.`-:::::::::::::. `:. +-::::.::::::::::::::: -: +::::::::::::::::::::` `: +:::::::::::::::::::- `: +::::::::::::::::::: -- +.:::::::::::::::::` `:` +`::::::::::::::::: -` + .:::::::::::::::- -` + `::::::::::::::- `.` + .::::::::::::- `` + `.--:::::-. +EOF + ;; + "Radix"*) set_colors 1 2 read -rd '' ascii_data <<'EOF' From b83a48a60f2a06b87b4d6532f3e2cc1df6d0795e Mon Sep 17 00:00:00 2001 From: Michael Straube Date: Fri, 25 Sep 2020 13:36:46 +0200 Subject: [PATCH 4/6] uptime: Fix shorthand off (#1564) --- neofetch | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/neofetch b/neofetch index e8de6b06..c9a3e5cd 100755 --- a/neofetch +++ b/neofetch @@ -1433,7 +1433,7 @@ get_uptime() { d="$((s / 60 / 60 / 24)) days" h="$((s / 60 / 60 % 24)) hours" - m="$((s / 60 % 60)) mins" + m="$((s / 60 % 60)) minutes" # Remove plural if < 2. ((${d/ *} == 1)) && d=${d/s} @@ -1447,20 +1447,24 @@ get_uptime() { uptime=${d:+$d, }${h:+$h, }$m uptime=${uptime%', '} - uptime=${uptime:-$s secs} + uptime=${uptime:-$s seconds} # Make the output of uptime smaller. case $uptime_shorthand in - on) ;; + on) + uptime=${uptime/ minutes/ mins} + uptime=${uptime/ minute/ min} + uptime=${uptime/ seconds/ secs} + ;; tiny) uptime=${uptime/ days/d} uptime=${uptime/ day/d} uptime=${uptime/ hours/h} uptime=${uptime/ hour/h} - uptime=${uptime/ mins/m} - uptime=${uptime/ min/m} - uptime=${uptime/ secs/s} + uptime=${uptime/ minutes/m} + uptime=${uptime/ minute/m} + uptime=${uptime/ seconds/s} uptime=${uptime//,} ;; esac From 6f8d365deb07accaa728ffe0850abca53f561ee5 Mon Sep 17 00:00:00 2001 From: Simon Gredal Date: Sun, 27 Sep 2020 06:39:11 +0200 Subject: [PATCH 5/6] Fix CPU Temp. not showing up on Raspberry Pi (#1566) Added another possible name to the regex for finding cpu temperature. This was tested on a Raspberry Pi 4 running Arch Linux ARM. --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index c9a3e5cd..eaefbf23 100755 --- a/neofetch +++ b/neofetch @@ -2103,7 +2103,7 @@ get_cpu() { # Select the right temperature file. for temp_dir in /sys/class/hwmon/*; do - [[ "$(< "${temp_dir}/name")" =~ (coretemp|fam15h_power|k10temp) ]] && { + [[ "$(< "${temp_dir}/name")" =~ (cpu_thermal|coretemp|fam15h_power|k10temp) ]] && { temp_dirs=("$temp_dir"/temp*_input) temp_dir=${temp_dirs[0]} break From 1a4fdc346f0c914585a282c8e7e2ed53af3fbc67 Mon Sep 17 00:00:00 2001 From: j-james <35242550+j-james@users.noreply.github.com> Date: Tue, 29 Sep 2020 21:44:09 -0700 Subject: [PATCH 6/6] Images: Reimplement catimg support (#1570) Fixes broken size parameter from the last implementation --- neofetch | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/neofetch b/neofetch index eaefbf23..7a8c22fb 100755 --- a/neofetch +++ b/neofetch @@ -744,7 +744,7 @@ disk_display="off" # Image backend. # # Default: 'ascii' -# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off', +# Values: 'ascii', 'caca', 'catimg', 'chafa', 'jp2a', 'iterm2', 'off', # 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty' # Flag: --backend image_backend="ascii" @@ -881,6 +881,14 @@ crop_offset="center" # --size image_size="auto" +# Catimg block size. +# Control the resolution of catimg. +# +# Default: '2' +# Values: '1', '2' +# Flags: --catimg_size +catimg_size="2" + # Gap between image and text # # Default: '3' @@ -3833,7 +3841,7 @@ image_backend() { "ascii") print_ascii ;; "off") image_backend="off" ;; - "caca" | "chafa" | "jp2a" | "iterm2" | "termpix" |\ + "caca" | "catimg" | "chafa" | "jp2a" | "iterm2" | "termpix" |\ "tycat" | "w3m" | "sixel" | "pixterm" | "kitty" | "pot") get_image_source @@ -3858,9 +3866,9 @@ image_backend() { *) err "Image: Unknown image backend specified '$image_backend'." - err "Image: Valid backends are: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'kitty', - 'off', 'sixel', 'pot', 'pixterm', 'termpix', 'tycat', - 'w3m')" + err "Image: Valid backends are: 'ascii', 'caca', 'catimg', 'chafa', 'jp2a', 'iterm2', + 'kitty', 'off', 'sixel', 'pot', 'pixterm', 'termpix', + 'tycat', 'w3m')" err "Image: Falling back to ascii mode." print_ascii ;; @@ -4248,6 +4256,10 @@ display_image() { "$image" ;; + "catimg") + catimg -w "$((width*catimg_size / font_width))" -r "$catimg_size" "$image" + ;; + "chafa") chafa --stretch --size="$((width / font_width))x$((height / font_height))" "$image" ;; @@ -4885,8 +4897,8 @@ BARS: IMAGE BACKEND: --backend backend Which image backend to use. - Possible values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', - 'off', 'sixel', 'tycat', 'w3m', 'kitty' + Possible values: 'ascii', 'caca', 'catimg', 'chafa', 'jp2a', + 'iterm2', 'off', 'sixel', 'tycat', 'w3m', 'kitty' --source source Which image or ascii file to use. Possible values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/', 'command output' [ascii] @@ -4896,6 +4908,7 @@ IMAGE BACKEND: NEW: neofetch --ascii \"\$(fortune | cowsay -W 30)\" --caca source Shortcut to use 'caca' backend. + --catimg source Shortcut to use 'catimg' backend. --chafa source Shortcut to use 'chafa' backend. --iterm2 source Shortcut to use 'iterm2' backend. --jp2a source Shortcut to use 'jp2a' backend. @@ -4969,6 +4982,7 @@ IMAGE: in some terminals emulators when using image mode. --size 00px | --size 00% How to size the image. Possible values: auto, 00px, 00%, none + --catimg_size 1/2 Change the resolution of catimg. --crop_mode mode Which crop mode to use Takes the values: normal, fit, fill --crop_offset value Change the crop offset for normal mode. @@ -5120,8 +5134,8 @@ get_args() { # Image backend "--backend") image_backend="$2" ;; "--source") image_source="$2" ;; - "--ascii" | "--caca" | "--chafa" | "--jp2a" | "--iterm2" | "--off" | "--pot" |\ - "--pixterm" | "--sixel" | "--termpix" | "--tycat" | "--w3m" | "--kitty") + "--ascii" | "--caca" | "--catimg" | "--chafa" | "--jp2a" | "--iterm2" | "--off" |\ + "--pot" | "--pixterm" | "--sixel" | "--termpix" | "--tycat" | "--w3m" | "--kitty") image_backend="${1/--}" case $2 in "-"* | "") ;; @@ -5132,6 +5146,7 @@ get_args() { # Image options "--loop") image_loop="on" ;; "--image_size" | "--size") image_size="$2" ;; + "--catimg_size") catimg_size="$2" ;; "--crop_mode") crop_mode="$2" ;; "--crop_offset") crop_offset="$2" ;; "--xoffset") xoffset="$2" ;;