mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 17:09:21 +00:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
92bf7da15a | ||
|
5fb3ab6ee3 | ||
|
3b57104997 | ||
|
fbc029b1b1 | ||
|
b16ff8bc4d | ||
|
bad073d78a | ||
|
0f7e7b6ee0 | ||
|
e398f1ee08 |
@@ -20,3 +20,4 @@ script:
|
||||
# Check for lines longer than 100 chars.
|
||||
# There are 3 lines that must be longer than 100 chars.
|
||||
- if (("$(grep '.\{101\}' neofetch | wc -l)" > 3)); then (exit 1); else (exit 0); fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd tests && ./test.sh; fi
|
||||
|
10
CHANGELOG.md
10
CHANGELOG.md
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
|
||||
## [4.0.0] - 2018-05-17
|
||||
|
||||
This release bumps the version number up to `4.0.0` as it contains major
|
||||
changes to how Neofetch is packaged and installed.
|
||||
|
||||
@@ -24,7 +27,9 @@ it. :+1:
|
||||
|
||||
## Discord
|
||||
|
||||
Neofetch now has a Discord server. Come and join the discussion! <a
|
||||
Neofetch now has a Discord server. Come and join the discussion!
|
||||
|
||||
<a
|
||||
href="https://discord.gg/BtnTPFF"><img
|
||||
src="https://img.shields.io/discord/440354555197128704.svg"></a>
|
||||
|
||||
@@ -2653,7 +2658,8 @@ Changelog:
|
||||
Let me know if you're having issues.
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/dylanaraps/neofetch/compare/3.4.0...HEAD
|
||||
[Unreleased]: https://github.com/dylanaraps/neofetch/compare/4.0.0...HEAD
|
||||
[4.0.0]: https://github.com/dylanaraps/neofetch/compare/3.4.0...4.0.0
|
||||
[3.4.0]: https://github.com/dylanaraps/neofetch/compare/3.3.0...3.4.0
|
||||
[3.3.0]: https://github.com/dylanaraps/neofetch/compare/3.2.0...3.3.0
|
||||
[3.2.0]: https://github.com/dylanaraps/neofetch/compare/3.1.0...3.2.0
|
||||
|
12
neofetch
12
neofetch
@@ -27,7 +27,7 @@
|
||||
# SOFTWARE.
|
||||
|
||||
# Neofetch version.
|
||||
version="4.0.0"
|
||||
version="4.0.1"
|
||||
|
||||
bash_version="${BASH_VERSION/.*}"
|
||||
sys_locale="${LANG:-C}"
|
||||
@@ -831,7 +831,7 @@ stdout="off"
|
||||
#
|
||||
# NOTE: Don't change this value, neofetch reads this to determine
|
||||
# how to handle backwards compatibility.
|
||||
config_version="4.0.0"
|
||||
config_version="4.0.1"
|
||||
EOF
|
||||
|
||||
# DETECT INFORMATION
|
||||
@@ -2787,14 +2787,16 @@ get_term() {
|
||||
[[ -z "$parent" ]] && break
|
||||
name="$(get_process_name "$parent")"
|
||||
case "${name// }" in
|
||||
"${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;;
|
||||
"${SHELL/*\/}" | *"sh" | "screen" | "su"*) ;;
|
||||
"login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;;
|
||||
"ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"* | "kdeinit"*)
|
||||
"ruby" | "1" | "systemd" | "sshd"* | "python"* |\
|
||||
"USER"*"PID"* | "kdeinit"* | "launchd"*)
|
||||
break
|
||||
;;
|
||||
"gnome-terminal-") term="gnome-terminal" ;;
|
||||
*"nvim") term="Neovim Terminal" ;;
|
||||
*"NeoVimServer"*) term="VimR Terminal" ;;
|
||||
*"tmux"*) term="tmux" ;;
|
||||
*) term="${name##*/}" ;;
|
||||
esac
|
||||
fi
|
||||
@@ -8722,4 +8724,4 @@ main() {
|
||||
return 0
|
||||
}
|
||||
|
||||
main "$@"
|
||||
[[ "$0" == "${BASH_SOURCE[0]}" ]] && main "$@"
|
||||
|
@@ -1,5 +1,5 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.6.
|
||||
.TH NEOFETCH "1" "May 2018" "Neofetch 4.0.0" "User Commands"
|
||||
.TH NEOFETCH "1" "May 2018" "Neofetch 4.0.1" "User Commands"
|
||||
.SH NAME
|
||||
Neofetch \- A fast, highly customizable system info script
|
||||
.SH SYNOPSIS
|
||||
|
7
tests/test.sh
Executable file
7
tests/test.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Run all tests.
|
||||
|
||||
./test_misc.sh
|
||||
|
||||
[[ -f /tmp/err ]] || exit 0 && { rm /tmp/err; exit 1; }
|
32
tests/test_misc.sh
Executable file
32
tests/test_misc.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Test misc functions.
|
||||
|
||||
source test_util.sh
|
||||
source ../neofetch
|
||||
|
||||
# Tests only work on Linux for now.
|
||||
os="Linux"
|
||||
|
||||
|
||||
test_convert_time() {
|
||||
# 24 hour time.
|
||||
result="$(convert_time "2016" "04" "14" "23:50")"
|
||||
assert_equals "$result" "Thu 14 Apr 2016 23:50"
|
||||
|
||||
# 12 hour time.
|
||||
install_time_format="12h"
|
||||
result="$(convert_time "2016" "04" "14" "23:50")"
|
||||
assert_equals "$result" "Thu 14 Apr 2016 11:50 PM"
|
||||
}
|
||||
|
||||
test_get_ppid() {
|
||||
result="$(trim "$(get_ppid "1")")"
|
||||
assert_equals "$result" "0"
|
||||
}
|
||||
|
||||
|
||||
printf "%s\\n" "Test MISC functions."
|
||||
|
||||
test_convert_time
|
||||
test_get_ppid
|
11
tests/test_util.sh
Executable file
11
tests/test_util.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Test util functions.
|
||||
|
||||
assert_equals() {
|
||||
# Test equality.
|
||||
local status
|
||||
[[ "$1" == "$2" ]] && status="✔"
|
||||
printf "%s\\n" " ${status:-✖} : ${FUNCNAME[1]}"
|
||||
[[ "$1" == "$2" ]] || { :>/tmp/err; return 1; } && return 0
|
||||
}
|
Reference in New Issue
Block a user