Compare commits

..

34 Commits
comp ... 5.0.0

Author SHA1 Message Date
Dylan Araps
8a2e973814 misc: cleanup 2018-06-19 09:46:53 +10:00
Dylan Araps
2bdb5f3b01 docs: update 2018-06-19 09:42:08 +10:00
Dylan Araps
d35574352f misc: cleanup 2018-06-19 09:41:27 +10:00
Dylan Araps
01bd13a3b5 song: Fix detection. 2018-06-19 09:37:10 +10:00
Dylan Araps
94362674f2 image: Use stty instead of sequence first. 2018-06-19 09:21:48 +10:00
Dylan Araps
2783446387 fix tests 2018-06-19 09:09:09 +10:00
Dylan Araps
afb6782a88 fix tests 2018-06-19 09:08:02 +10:00
Dylan Araps
24f5259339 fix tests 2018-06-19 09:04:10 +10:00
Dylan Araps
536c0b0ef7 Merge branch 'master' of github.com:dylanaraps/neofetch 2018-06-19 08:59:30 +10:00
Dylan Araps
b3e6b7e818 song: Added mpc_args to specify arguments for mpc. Closes #1033 2018-06-19 08:59:14 +10:00
Dylan Araps
4ac3dedaa0 Merge pull request #1032 from mstraube/clearos
OS: Add support for ClearOS
2018-06-15 06:30:17 +10:00
Michael Straube
1fc48be2f4 OS: Add support for ClearOS 2018-06-14 20:50:05 +02:00
Dylan Araps
dfafca9f62 Merge pull request #1030 from mstraube/song
Song: Add Dragon Player and SMPlayer
2018-06-14 06:44:37 +10:00
Michael Straube
ea462a8ec1 song: Add SMPlayer 2018-06-13 18:03:51 +02:00
Michael Straube
94ae0099be song: Add Dragon Player 2018-06-13 17:58:41 +02:00
Dylan Araps
e7306982e9 packages: Fix bug with dpkg 2018-06-09 17:48:49 +10:00
Dylan Araps
40bf68af26 packages: Fix dpkg bug. 2018-06-09 17:40:09 +10:00
Dylan Araps
078cda7b48 misc: cleanup 2018-06-09 17:23:42 +10:00
Dylan Araps
329abc5c46 Merge branch 'master' of github.com:dylanaraps/neofetch 2018-06-09 17:23:07 +10:00
Dylan Araps
440e8ca7b1 packages: Fix bug with snapd. Closes #1026 2018-06-09 17:22:51 +10:00
Dylan Araps
34eacd561b Merge pull request #1025 from mstraube/song
song: use get_song_dbus for amarok
2018-06-09 06:40:33 +10:00
Michael Straube
abe6b82fc7 song: add comment for exaile 2018-06-08 14:18:56 +02:00
Michael Straube
26389a8423 song: use get_song_dbus for amarok 2018-06-08 13:56:45 +02:00
Dylan Araps
daf866039e Merge pull request #1023 from mstraube/pragha
song: use get_song_dbus for pragha
2018-06-08 04:58:22 +10:00
Michael Straube
059239d2a7 song: use get_song_dbus for pragha 2018-06-07 13:47:13 +02:00
Dylan Araps
8cfabdae47 Merge pull request #1021 from mstraube/indent
misc: indent
2018-06-06 20:39:06 +00:00
Michael Straube
b30151e6dd misc: indent 2018-06-06 18:02:07 +02:00
Dylan Araps
93ffa118a3 Merge pull request #1020 from MindTooth/fix_end
awk: Space around END
2018-06-05 20:07:01 +00:00
Birger J. Nordølum
e7645597e1 awk: Space around END 2018-06-05 19:33:20 +02:00
Andrew Titmuss
428b73fc5a os: add cache_uname for Darwin (macOS/iOS) 2018-06-05 23:13:20 +10:00
Dylan Araps
e95776d40b misc: cleanup 2018-06-05 13:12:29 +10:00
Dylan Araps
d8f7e8df54 config: Fixed incorrect error message 2018-06-05 12:20:12 +10:00
Dylan Araps
bc9fd232e4 distro: Fixed file error 2018-06-05 12:19:18 +10:00
Dylan Araps
f847b05e32 image: Added method to get the terminal size using an escape sequence. 2018-06-05 11:50:55 +10:00
4 changed files with 114 additions and 509 deletions

View File

@@ -9,17 +9,21 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
<img src="https://i.imgur.com/ZQI2EYz.png" alt="logo" height="100px">
A lot of the script has been rewritten and all lint errors have been resolved. There's probably a few bugs so the version number has been bumped to `5.0`. Thanks to everyone who contributed to this release.
**Contributors**
- [**@mstraube**](https://github.com/mstraube)
- [**@arisinfenix**](https://github.com/arisinfenix)
- [**@iandrewt**](https://github.com/iandrewt)
- [**@konimex**](https://github.com/konimex)
- [**@MindTooth**](https://github.com/MindTooth)
**Operating System**
- Added support for Condres OS. [**@mstraube**](https://github.com/mstraube)
- Added support for RedCore Linux. [**@mstraube**](https://github.com/mstraube)
- Added support for Regata OS. [**@mstraube**](https://github.com/mstraube)
- Added support for Condres OS. [**@arisinfenix**](https://github.com/arisinfenix)
- Added support for RedCore Linux. [**@arisinfenix**](https://github.com/arisinfenix)
- Added support for Regata OS. [**@arisinfenix**](https://github.com/arisinfenix)
- Added support for ClearOS. [**@arisinfenix**](https://github.com/arisinfenix)
- Added support for PureOS.
- Added support for Kibojoe Linux.
- Added support for SharkLinux.
@@ -62,24 +66,24 @@ See: https://github.com/dylanaraps/neofetch/issues/1001
- **cpu**: Remove extra call to `uname`.
- **cpu**: Simplify core calculation.
- **disk**: Clean up.
- **font**: Fix iTerm2 checking for 2 extra profiles that don't exist.
[**@iandrewt**](https://github.com/iandrewt")
- **font**: Fix iTerm2 checking for 2 extra profiles that don't exist. [**@iandrewt**](https://github.com/iandrewt")
- **gpu**: Fixed ATI/AMD branding issue.
- **gpu**: Removed `glxinfo` usage (*too slow*).
- **packages**: Added support for `flatpak`.
[**@konimex**](https://github.com/konimex)
- **packages**: Added support for `snap`.
[**@konimex**](https://github.com/konimex)
- **packages**: Added support for `flatpak`. [**@konimex**](https://github.com/konimex)
- **packages**: Added support for `snap`. [**@konimex**](https://github.com/konimex)
- **packages**: Added used package managers to output (`Packages: 900
(pacman, snap)`).
- **packages**: Fixed issues with `pacman` 5.1.
- **packages**: Fixed issues with `dpkg`.
- **packages**: Removed `find` usage.
- **packages**: Removed `ls` usage.
- **packages**: Removed `wc -l` usage.
- **song**: Added support for `gmusicbrowser`.
[**@mstraube**](https://github.com/mstraube)
- **song**: Added support for `gmusicbrowser`. [**@arisinfenix**](https://github.com/arisinfenix)
- **song**: Added support for `SMPlayer`. [**@arisinfenix**](https://github.com/arisinfenix)
- **song**: Added support for `Dragon Player`. [**@arisinfenix**](https://github.com/arisinfenix)
- **song**: Fixed song detection on macOS.
- **song**: Fixed song output on systems using `C` locale.
- **song**: Added `mpc_args` to send additional arguments to `mpc`.
- **term\_font**: Clean up of config file handling.
- **resolution**: Added support for `xwininfo`.

View File

@@ -1,437 +0,0 @@
#!/usr/bin/env bash
#
# Shell completion for neofetch.
shopt -s nullglob
_neofetch_completions() {
local cur prev usage
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
if [[ "$cur" == -* ]]; then
usage="$(neofetch -h | awk '/^ --/{printf $1" "}')"
IFS=$'\n' read -d "" -ra COMPREPLY \
< <(compgen -W "$usage" -- "$cur")
else
case "$prev" in
"--disable")
conf="${HOME}/.config/neofetch/config.conf"
[[ -f "$conf" ]] &&
IFS=$'\n' read -d "" -ra values \
< <(awk '/ info /&&!a[$0]++{print $NF}' "$conf")
;;
"--backend")
values=(
"ascii"
"caca"
"iterm2"
"jp2a"
"kitty"
"pixterm"
"sixel"
"termpix"
"tycat"
"w3m"
"off"
)
;;
"--os_arch"|\
"--speed_shorthand"|\
"--cpu_brand"|\
"--cpu_speed"|\
"--kernel_shorthand"|\
"--refresh_rate"|\
"--gpu_brand"|\
"--gtk_shorthand"|\
"--gtk2"|\
"--gtk3"|\
"--shell_path"|\
"--shell_version"|\
"--song_shorthand"|\
"--underline"|\
"--bold"|\
"--color_blocks"|\
"--bar_border"|\
"--ascii_bold")
values=(
"on"
"off"
)
;;
"--uptime_shorthand"|\
"--package_managers"|\
"--distro_shorthand")
values=(
"on"
"tiny"
"off"
)
;;
"--speed_type")
values=(
"current"
"min"
"max"
"bios"
"scaling_current"
"scaling_min"
"scaling_max"
)
;;
"--cpu_cores")
values=(
"logical"
"physical"
"off"
)
;;
"--cpu_temp")
values=(
"C"
"F"
"off"
)
;;
"--gpu_type")
values=(
"all"
"dedicated"
"integrated"
)
;;
"--disk_show")
values=(
"/dev/sd"*
"/"
)
;;
"--disk_subtitle")
values=(
"name"
"mount"
"dir"
)
;;
"--ip_host")
values=(
"http://ident.me"
)
;;
"--song_format")
values=(
"\"%artist% - %album% - %title%\""
"\"%artist - %title\""
)
;;
"--music_player")
values=(
"amarok"
"audacious"
"banshee"
"bluemindo"
"clementine"
"cmus"
"deadbeef"
"deepin-music"
"elisa"
"exaile"
"gmusicbrowser"
"gnome-music"
"gmusicbrowser"
"Google Play"
"guayadeque"
"iTunes"
"juk"
"lollypop"
"mocp"
"mopidy"
"mpd"
"pogo"
"pragha"
"qmmp"
"quodlibet"
"rhythmbox"
"sayonara"
"spotify"
"Spotify"
"tomahawk"
"vlc"
"xmms2d"
"yarock"
)
;;
"--install_time_format")
values=(
"12h"
"24h"
)
;;
"--underline_char")
values=(
"_"
"-"
"."
"⎯"
"―"
)
;;
"--block_width"|\
"--block_height"|\
"--bar_length")
values=(
{1..9}
)
;;
"--cpu_display"|\
"--memory_display"|\
"--battery_display"|\
"--disk_display")
values=(
"bar"
"infobar"
"barinfo"
"off"
)
;;
"--source"|\
"--ascii"|\
"--caca"|\
"--iterm2"|\
"--jp2a"|\
"--kitty"|\
"--pixterm"|\
"--sixel"|\
"--termpix"|\
"--tycat"|\
"--w3m")
values=(
"auto"
"ascii"
"wallpaper"
"/path/to/img.jpg"
"/path/to/images"
"/path/to/ascii_file"
)
;;
"--ascii_distro")
values=(
"aix"
"alpine"
"alpine_small"
"amazon"
"anarchy"
"android"
"antergos"
"antix"
"aosc"
"apricity"
"arch"
"arch_old"
"arch_small"
"archbox"
"archlabs"
"archmerge"
"arcolinux"
"artix"
"arya"
"bitrig"
"blag"
"blankon"
"bsd"
"bunsenlabs"
"calculate"
"centos"
"chakra"
"chaletos"
"chapeau"
"chrom"
"clover"
"condres"
"crux"
"crux_small"
"darwin"
"debian"
"debian_small"
"deepin"
"desaos"
"devuan"
"dracos"
"dragonfly"
"dragonfly_old"
"dragonfly_small"
"elementary"
"endless"
"exherbo"
"fedora"
"freebsd"
"freebsd_small"
"freemint"
"frugalware"
"funtoo"
"galliumos"
"gentoo"
"gentoo_small"
"gnewsense"
"gnu"
"gobolinux"
"grombyang"
"guixsd"
"haiku"
"hyperbola"
"irix"
"kali"
"kaos"
"kde"
"kibojoe"
"kogaion"
"korora"
"kslinux"
"kubuntu"
"lede"
"linux lite"
"linux mint"
"linux"
"lmde"
"lubuntu"
"lunar"
"mac"
"mageia"
"magpieos"
"manjaro"
"maui"
"mer"
"minix"
"mx"
"netbsd"
"netrunner"
"nitrux"
"nixos"
"nixos_small"
"nurunner"
"nutyx"
"obrevenge"
"open source media center"
"openbsd"
"openbsd_small"
"openindiana"
"openmandriva"
"opensuse"
"openwrt"
"oracle"
"pacbsd"
"parabola"
"pardus"
"parrot"
"parsix"
"pcbsd"
"pclinuxos"
"peppermint"
"porteus"
"postmarketos"
"puppy"
"pureos"
"qubes"
"raspbian"
"red star"
"redcore"
"redcore"
"redhat"
"regata"
"rosa"
"sabayon"
"sabotage"
"sailfishos"
"salentos"
"scientific"
"sharklinux"
"siduction"
"slackware"
"slitaz"
"smartos"
"solus"
"sparky"
"steamos"
"sunos"
"swagarch"
"tails"
"trisquel"
"ubuntu"
"ubuntu_old"
"void"
"void_small"
"windows 10"
"windows"
"xferience"
"xubuntu"
"zorin"
)
;;
"--size")
values=(
"00px"
"00%"
"auto"
"none"
)
;;
"--crop_mode")
values=(
"normal"
"fit"
"fill"
)
;;
"--crop_offset")
values=(
"northwest"
"north"
"northeast"
"west"
"center"
"east"
"southwest"
"south"
"southeast"
)
;;
"--config")
values=(
"none"
"/path/to/config"
)
;;
esac
IFS=$'\n' read -d "" -ra COMPREPLY \
< <(compgen -W "${values[*]}" -- "$cur")
fi
}
complete -F _neofetch_completions neofetch

152
neofetch
View File

@@ -28,7 +28,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
version="4.0.3"
version="5.0.0"
bash_version="${BASH_VERSION/.*}"
sys_locale="${LANG:-C}"
@@ -156,7 +156,7 @@ uptime_shorthand="on"
# on: '998 (pacman), 8 (flatpak), 4 (snap)'
# tiny: '908 (pacman, flatpak, snap)'
# off: '908'
package_managers="tiny"
package_managers="on"
# Shell
@@ -424,6 +424,7 @@ disk_subtitle="mount"
# cmus
# deadbeef
# deepin-music
# dragon
# elisa
# exaile
# gnome-music
@@ -442,6 +443,7 @@ disk_subtitle="mount"
# quodlibet
# rhythmbox
# sayonara
# smplayer
# spotify
# Spotify
# tomahawk
@@ -474,6 +476,12 @@ song_format="%artist% - %album% - %title%"
# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'
song_shorthand="off"
# 'mpc' arguments (specify a host, password etc).
#
# Default: ''
# Example: mpc_args=(-h HOST -P PASSWORD)
mpc_args=()
# Text Colors
@@ -774,13 +782,13 @@ get_os() {
# $kernel_name is set in a function called cache_uname and is
# just the output of "uname -s".
case "$kernel_name" in
"Darwin") : "$(sw_vers -productName)" ;;
"SunOS") : "Solaris" ;;
"Haiku") : "Haiku" ;;
"MINIX") : "MINIX" ;;
"AIX") : "AIX" ;;
"IRIX"*) : "IRIX" ;;
"FreeMiNT") : "FreeMiNT" ;;
"Darwin"): "$darwin_name" ;;
"SunOS"): "Solaris" ;;
"Haiku"): "Haiku" ;;
"MINIX"): "MINIX" ;;
"AIX"): "AIX" ;;
"IRIX"*): "IRIX" ;;
"FreeMiNT"): "FreeMiNT" ;;
"Linux" | "GNU"*)
: "Linux"
@@ -860,7 +868,7 @@ get_distro() {
# Chrome OS doesn't conform to the /etc/*-release standard.
# While the file is a series of variables they can't be sourced
# by the shell since the values aren't quoted.
elif [[ "$(< /etc/lsb-release)" == *CHROMEOS* ]]; then
elif [[ -f /etc/lsb-release && "$(< /etc/lsb-release)" == *CHROMEOS* ]]; then
distro="$(awk -F '=' '/NAME|VERSION/ {printf $2 " "}' /etc/lsb-release)"
elif [[ -f "/etc/os-release" || \
@@ -926,9 +934,6 @@ get_distro() {
;;
"Mac OS X")
osx_version="$(sw_vers -productVersion)"
osx_build="$(sw_vers -buildVersion)"
case "$osx_version" in
"10.4"*) codename="Mac OS X Tiger" ;;
"10.5"*) codename="Mac OS X Leopard" ;;
@@ -959,7 +964,7 @@ get_distro() {
;;
"iPhone OS")
distro="iOS $(sw_vers -productVersion)"
distro="iOS $osx_version"
# "uname -m" doesn't print architecture on iOS so we force it off.
os_arch="off"
@@ -1257,7 +1262,7 @@ get_packages() {
"Linux" | "BSD" | "iPhone OS" | "Solaris")
# Package Manager Programs.
has "pacman-key" && tot pacman -Qq --color never
has "dpkg" && tot dpkg-query -f '\n' -W
has "dpkg" && tot dpkg-query -f '.\n' -W
has "rpm" && tot rpm -qa
has "xbps-query" && tot xbps-query -l
has "apk" && tot apk info
@@ -1283,7 +1288,7 @@ get_packages() {
/var/db/paludis/repositories/installed/data/*/
# Other (Needs complex command)
has "kpm-pkg" && ((packages+="$(kpm --get-selections | grep -cv deinstall$)"))
has "kpm-pkg" && ((packages+="$(kpm --get-selections | grep -cv deinstall$)"))
case "$kernel_name" in
"FreeBSD") has "pkg" && tot pkg info ;;
@@ -1301,7 +1306,7 @@ get_packages() {
# Snap hangs if the command is run without the daemon running.
# Only run snap if the daemon is also running.
has "snap" && ps -e | grep -Fm 1 "snapd" && tot snap list && ((packages-=1))
has "snap" && ps -e | grep -qFm 1 "snapd" >/dev/null && tot snap list && ((packages-=1))
;;
"Mac OS X" | "MINIX")
@@ -1571,7 +1576,7 @@ get_wm_theme() {
"Sawfish")
wm_theme="$(awk -F '\\(quote|\\)' '/default-frame-style/ {print $(NF-4)}' \
"${HOME}/.sawfish/custom")"
"${HOME}/.sawfish/custom")"
;;
"Cinnamon" | "Muffin" | "Mutter (Muffin)")
@@ -1774,15 +1779,13 @@ get_cpu() {
fi
# Get CPU temp.
if [[ -f "$temp_dir" ]]; then
deg="$(< "$temp_dir")"
deg="$((deg * 100 / 10000))"
fi
[[ -f "$temp_dir" ]] && \
deg="$(($(< "$temp_dir") * 100 / 10000))"
# Get CPU cores.
case "$cpu_cores" in
"logical" | "on") cores="$(grep -c "^processor" "$cpu_file")" ;;
"physical") cores="$(awk '/^core id/&&!a[$0]++{++i}END{print i}' "$cpu_file")" ;;
"physical") cores="$(awk '/^core id/&&!a[$0]++{++i} END {print i}' "$cpu_file")" ;;
esac
;;
@@ -2029,7 +2032,7 @@ get_gpu() {
"Linux")
# Read GPUs into array.
gpu_cmd="$(lspci -mm | awk -F '\\"|\\" \\"|\\(' \
'/"Display|"3D|"VGA/ {a[$0] = $3 " " $4} END{for(i in a)
'/"Display|"3D|"VGA/ {a[$0] = $3 " " $4} END {for(i in a)
{if(!seen[a[i]]++) print a[i]}}')"
IFS=$'\n' read -d "" -ra gpus <<< "$gpu_cmd"
@@ -2234,13 +2237,13 @@ get_memory() {
;;
"OpenBSD"*) ;;
*) mem_free="$(($(vmstat | awk 'END{printf $5}') / 1024))" ;;
*) mem_free="$(($(vmstat | awk 'END {printf $5}') / 1024))" ;;
esac
# Mem used.
case "$kernel_name" in
"OpenBSD"*)
mem_used="$(vmstat | awk 'END{printf $3}')"
mem_used="$(vmstat | awk 'END {printf $3}')"
mem_used="${mem_used/M}"
;;
@@ -2308,6 +2311,7 @@ get_song() {
"cmus"
"deadbeef"
"deepin-music"
"dragon"
"elise"
"exaile"
"gnome-music"
@@ -2326,6 +2330,7 @@ get_song() {
"quodlibet"
"rhythmbox"
"sayonara"
"smplayer"
"spotify"
"Spotify"
"tomahawk"
@@ -2335,7 +2340,8 @@ get_song() {
)
printf -v players "|%s" "${players[@]}"
player="$(ps -e | awk -v pattern="(${players:1})$" '$0 ~ pattern {print $NF; exit}')"
player="$(ps aux | awk -v pattern="(${players:1})" \
'!/ awk / && match($0,pattern){print substr($0,RSTART,RLENGTH); exit}')"
[[ "$music_player" && "$music_player" != "auto" ]] && \
player="$music_player"
@@ -2353,7 +2359,7 @@ get_song() {
}
case "${player/*\/}" in
"mpd"* | "mopidy"*) song="$(mpc -f '%artist% \n %album% \n %title%' current)" ;;
"mpd"*|"mopidy"*) song="$(mpc -f '%artist%\n%album%\n%title%' current "${mpc_args[@]}")" ;;
"mocp"*) song="$(mocp -Q '%artist \n %album \n %song')" ;;
"google play"*) song="$(gpmdp-remote current)" ;;
"rhythmbox"*) song="$(rhythmbox-client --print-playing-format '%ta \n %at \n %tt')" ;;
@@ -2374,6 +2380,10 @@ get_song() {
"audacious"*) get_song_dbus "audacious" ;;
"vlc"*) get_song_dbus "vlc" ;;
"gmusicbrowser"*) get_song_dbus "gmusicbrowser" ;;
"pragha"*) get_song_dbus "pragha" ;;
"amarok"*) get_song_dbus "amarok" ;;
"dragon"*) get_song_dbus "dragonplayer" ;;
"smplayer"*) get_song_dbus "smplayer" ;;
"cmus"*)
song="$(cmus-remote -Q | awk 'BEGIN { ORS=" "};
@@ -2410,21 +2420,11 @@ get_song() {
"banshee"*)
song="$(banshee --query-artist --query-album --query-title |\
awk -F':' '/^artist/ {a=$2} /^album/ {b=$2} /^title/ {t=$2}
END{print a " \n " b " \n "t}')"
;;
"amarok"*)
song="$(qdbus org.kde.amarok /Player GetMetadata |\
awk -F':' '/^artist:/ {a=$2} /^album:/ {b=$2} /^title:/ {t=$2}
END{print a " \n " b " \n " t}')"
;;
"pragha"*)
song="$(pragha -c | awk -F':' '/^artist/ {a=$2} /^album/ {b=$2} /^title/ {t=$2}
END{print a " \n " b " \n " t}')"
END {print a " \n " b " \n "t}')"
;;
"exaile"*)
# NOTE: Exaile >= 4.0.0 will support mpris2.
song="$(dbus-send --print-reply --dest=org.exaile.Exaile /org/exaile/Exaile \
org.exaile.Exaile.Query |
awk -F':|,' '{if ($6 && $8 && $4) printf $6 " \n" $8 " \n" $4}')"
@@ -2434,7 +2434,7 @@ get_song() {
song="$(dbus-send --print-reply --dest=net.sacredchao.QuodLibet \
/net/sacredchao/QuodLibet net.sacredchao.QuodLibet.CurrentSong |\
awk -F'"' '/artist/ {getline; a=$2} /album/ {getline; b=$2}
/title/ {getline; t=$2} END{print a " \n " b " \n " t}')"
/title/ {getline; t=$2} END {print a " \n " b " \n " t}')"
;;
"pogo"*)
@@ -2842,13 +2842,13 @@ END
;;
"deepin-terminal"*)
term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END{print a " " b}' \
term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END {print a " " b}' \
"${XDG_CONFIG_HOME}/deepin/deepin-terminal/config.conf")"
;;
"GNUstep_Terminal")
term_font="$(awk -F '>|<' '/>TerminalFont</ {getline; f=$3}
/>TerminalFontSize</ {getline; s=$3} END{print f " " s}' \
/>TerminalFontSize</ {getline; s=$3} END {print f " " s}' \
"${HOME}/GNUstep/Defaults/Terminal.plist")"
;;
@@ -2927,7 +2927,7 @@ END
if(/Fullscreen/) getline;
id=$2"]"
} $0~id {if(id) {getline; print $2; exit}}' \
"$mateterm_config")"
"$mateterm_config")"
rm -f "$mateterm_config"
@@ -2958,7 +2958,7 @@ END
;;
"qterminal")
term_font="$(awk -F '=' '/fontFamily=/ {a=$2} /fontSize=/ {b=$2} END{print a " " b}' \
term_font="$(awk -F '=' '/fontFamily=/ {a=$2} /fontSize=/ {b=$2} END {print a " " b}' \
"${XDG_CONFIG_HOME}/qterminal.org/qterminal.ini")"
;;
@@ -3050,7 +3050,7 @@ END
;;
"xfce4-terminal")
term_font="$(awk -F '=' '/^FontName/{a=$2}/^FontUseSystem=TRUE/{a=$0}END{print a}' \
term_font="$(awk -F '=' '/^FontName/{a=$2}/^FontUseSystem=TRUE/{a=$0} END {print a}' \
"${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc")"
[[ "$term_font" == "FontUseSystem=TRUE" ]] && \
@@ -3361,7 +3361,7 @@ image_backend() {
return
}
get_term_size
get_window_size
((term_width < 1)) && {
to_ascii "Image: Failed to find terminal window size."
@@ -3530,11 +3530,11 @@ get_w3m_img_path() {
err "Image: w3m-img wasn't found on your system"
}
get_term_size() {
get_window_size() {
# This functions gets the current window size in
# pixels.
#
# We first try to use the escape sequence "\044[14t"
# We first try to use the escape sequence "\033[14t"
# to get the terminal window size in pixels. If this
# fails we then fallback to using "xdotool" or other
# programs.
@@ -3606,14 +3606,19 @@ get_term_size() {
term_width="${term_width:-0}"
}
get_image_size() {
# This functions determines the size to make
# the thumbnail image.
read -r lines columns <<< "$(stty size)"
get_term_size() {
# Get the terminal size in cells.
read -r lines columns < <(stty size)
# Calculate font size.
font_width="$((term_width / columns))"
font_height="$((term_height / lines))"
}
get_image_size() {
# This functions determines the size to make the thumbnail image.
get_term_size
case "$image_size" in
"auto")
@@ -4063,7 +4068,7 @@ get_user_config() {
elif [[ -f "${files[0]}" ]]; then
source "${files[0]}"
err "Config: Sourced user config. (${config_file})"
err "Config: Sourced user config. (${files[0]})"
else
config_file="${XDG_CONFIG_HOME}/neofetch/config.conf"
@@ -4150,6 +4155,14 @@ cache_uname() {
kernel_name="${uname[0]}"
kernel_version="${uname[1]}"
kernel_machine="${uname[2]}"
if [[ "$kernel_name" == "Darwin" ]]; then
IFS=$'\n' read -d "" -ra sw_vers < <(awk -F'<|>' '/string/ {print $3}' \
"/System/Library/CoreServices/SystemVersion.plist")
darwin_name="${sw_vers[2]}"
osx_version="${sw_vers[3]}"
osx_build="${sw_vers[0]}"
fi
}
get_ppid() {
@@ -4569,7 +4582,7 @@ get_args() {
"-v") verbose="on" ;;
"--print_config") printf '%s\n' "$config"; exit ;;
"-vv") set -x; verbose="on" ;;
"-h"|"--help") usage ;;
"--help") usage ;;
"--version")
printf '%s\n' "Neofetch $version"
exit 1
@@ -4645,7 +4658,8 @@ get_args() {
cpu_temp="C"
# Known implicit unused variables.
printf '%s\n' "$kernel $icons $font $battery $locale"
mpc_args=()
printf '%s\n' "$kernel $icons $font $battery $locale ${mpc_args[*]}"
;;
esac
@@ -5403,6 +5417,32 @@ ${c1} ..,:${c3}dOkxl:.
EOF
;;
"ClearOS"*)
set_colors 2
read -rd '' ascii_data <<'EOF'
${c1} `.--::::::--.`
.-:////////////////:-.
`-////////////////////////-`
-////////////////////////////-
`//////////////-..-//////////////`
./////////////: ://///////////.
`//////:..-////: :////-..-//////`
://////` -///:.``.:///-` ://///:
`///////:. -////////-` `:///////`
.//:--////:. -////-` `:////--://.
./: .////:. --` `:////- :/.
`//-` .////:. `:////- `-//`
:///-` .////:. `:////- `-///:
`/////-` -///: :///- `-/////`
`//////- `///: :///` .//////`
`:////: `///: :///` -////:`
.://: `///: :///` -//:.
.:: `///: :///` -:.
`///: :///`
`... ...`
EOF
;;
"Clover"*)
set_colors 2 6
read -rd '' ascii_data <<'EOF'

View File

@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
.TH NEOFETCH "1" "June 2018" "Neofetch 4.0.3" "User Commands"
.TH NEOFETCH "1" "June 2018" "Neofetch 5.0.0" "User Commands"
.SH NAME
Neofetch \- A fast, highly customizable system info script
.SH SYNOPSIS
@@ -23,7 +23,7 @@ For example: 'info "Memory" memory' would be '\-\-disable memory'
NOTE: You can supply multiple args. eg. 'neofetch \fB\-\-disable\fR cpu gpu'
.TP
\fB\-\-package_managers\fR on/off
Hide/Show Package Manager names.
Hide/Show Package Manager names . (tiny, on, off)
.TP
\fB\-\-os_arch\fR on/off
Hide/Show OS architecture.
@@ -260,8 +260,6 @@ Whether or not to bold the ascii logo.
.TP
\fB\-L\fR, \fB\-\-logo\fR
Hide the info text and only show the ascii logo.
.IP
Possible values: bar, infobar, barinfo, off
.SS "IMAGE:"
.TP
\fB\-\-loop\fR