diff --git a/CHANGELOG.md b/CHANGELOG.md
index 65667d3a..933df38f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,14 @@
- **[@jorgegonzalez](https://github.com/jorgegonzalez)**
- **[@ikeydoherty](https://github.com/ikeydoherty)**
- **[@eliezio](https://github.com/eliezio)**
+- **[@nilesr](https://github.com/nilesr)**
+- **[@dritter](https://github.com/dritter)**
+
+
+## Operating System
+
+- Added support for SliTaz. **[@nilesr](https://github.com/nilesr)**
+- Added support for Nitrux. **[@mstraube](https://github.com/mstraube)**
## Ascii
@@ -21,22 +29,31 @@
## Info
-**Window Manager**
+**CPU**
+
+- Add option to show decimals in CPU speed.
+
+**Terminal Font**
+
+- Added \*experimental\* font detection for iTerm2. **[@dritter](https://github.com/dritter)**
+
+**Window Manager**
- [MacOS] Added support for Kwm. **[@jorgegonzalez](https://github.com/jorgegonzalez)**
- [MacOS] Added support for Spectacle. **[@jorgegonzalez](https://github.com/jorgegonzalez)**
+- [MacOS] Add support for Amethyst. **[@jorgegonzalez](https://github.com/jorgegonzalez)**
-**Song**
+**Song**
- Fixed Audacious song output when `dbus-send` fails. **[@mstraube](https://github.com/mstraube)**
-**Local IP**
+**Local IP**
- [Linux] Fixed UID showing instead of Local IP on several versions/configs of iproute2.
-**Packages**
+**Packages**
- [eopkg] Used a faster detection method. **[@ikeydoherty](https://github.com/ikeydoherty)**
-**Resolution**
+**Resolution**
- [macOS] Fixed `screenresolution` not appearing at all on newer versions. **[@eliezio](https://github.com/eliezio)**
- [Linux] Show decimals.
diff --git a/ascii/distro/nitrux b/ascii/distro/nitrux
new file mode 100644
index 00000000..2f49d638
--- /dev/null
+++ b/ascii/distro/nitrux
@@ -0,0 +1,18 @@
+${c1}`:/.
+`/yo
+`/yo
+`/yo .+:.
+`/yo .sys+:.`
+`/yo `-/sys+:.`
+`/yo ./sss+:.`
+`/yo .:oss+:-`
+`/yo ./o///:-`
+`/yo `.-:///////:`
+`/yo `.://///++//-``
+`/yo `.-:////++++/-`
+`/yo `-://///++o+/-`
+`/yo `-/+o+++ooo+/-`
+`/s+:+oooossso/.`
+`//+sssssso:.
+`+syyyy+:`
+:+s+-
diff --git a/ascii/distro/slitaz b/ascii/distro/slitaz
new file mode 100644
index 00000000..5ee52706
--- /dev/null
+++ b/ascii/distro/slitaz
@@ -0,0 +1,17 @@
+${c1} @ @( @
+ @@ @@ @ @/
+ @@ @@ @@ @@
+ @@ %@@ @@ @@
+ @@ %@@@ @@@@@. @@@@ @@
+ @@@ @@@@ @@@@@@@ &@@@ @@@
+ @@@@@@@ %@@@@@@@@@@@@ &@@@% @@@@@@@/
+ ,@@@@@@@@@@@@@@@@@@@@@@@@@
+ .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/
+@@@@@@. @@@@@@@@@@@@@@@@@@@@@ /@@@@@@
+@@ @@@@@ @@@@@@@@@@@@, @@@@@ @@@
+@@ @@@@. @@@@@@@@@@@@@% #@@@@ @@.
+@@ ,@@ @@@@@@@@@@@@@ @@@ @@
+@ @@. @@@@@@@@@@@@@ @@@ *@
+@ @@ @@@@@@@@@@@@ @@ @
+ @ @@@@@@@@@. #@
+ @ ,@@@@@ @
diff --git a/config/config b/config/config
index 2a57fe3f..d1621962 100644
--- a/config/config
+++ b/config/config
@@ -138,6 +138,17 @@ shell_version="on"
# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.
speed_type="bios_limit"
+# CPU speed shorthand
+#
+# Default: 'off'
+# Values: 'on', 'off'.
+# Flag: --speed_shorthand.
+#
+# Example:
+# on: 'i7-6500U (4) @ 3.1GHz'
+# off: 'i7-6500U (4) @ 3.100GHz'
+speed_shorthand="off"
+
# Shorten the output of the CPU function
#
# Default: 'off'
diff --git a/neofetch b/neofetch
index 97289078..a3690aa9 100755
--- a/neofetch
+++ b/neofetch
@@ -93,6 +93,9 @@ get_distro() {
"tiny") distro="${distro//version*}" ;;
esac
+ elif type -p tazpkg >/dev/null; then
+ distro="SliTaz $(< /etc/slitaz-release)"
+
elif [[ -d "/system/app/" && -d "/system/priv-app" ]]; then
distro="Android $(getprop ro.build.version.release)"
@@ -476,6 +479,9 @@ get_packages() {
type -p crew >/dev/null && \
packages="$((packages+=$(ls -l /usr/local/etc/crew/meta/*.filelist | wc -l)))"
+ type -p tazpkg >/dev/null && \
+ packages="$((packages+=$(tazpkg list | wc -l) - 6))"
+
if type -p pkg >/dev/null; then
case "$kernel_name" in
"FreeBSD") packages="$((packages+=$(pkg info | wc -l)))" ;;
@@ -630,9 +636,14 @@ get_wm() {
else
case "$os" in
"Mac OS X")
- wm="Quartz Compositor"
- ps -e | grep -q '[S]pectacle' && wm='Spectacle'
- ps -e | grep -q "[k]wm" && wm="Kwm"
+ ps_line="$(ps -e | grep -o '[S]pectacle\|[A]methyst\|[k]wm')"
+
+ case "$ps_line" in
+ *"kwm"*) wm="Kwm" ;;
+ *"Amethyst"*) wm="Amethyst" ;;
+ *"Spectacle"*) wm="Spectacle" ;;
+ *) wm="Quartz Compositor" ;;
+ esac
;;
"Windows")
@@ -810,11 +821,10 @@ get_cpu() {
speed="$(< "${speed_dir}/bios_limit")" || \
speed="$(< "${speed_dir}/scaling_max_freq")" || \
speed="$(< "${speed_dir}/cpuinfo_max_freq")"
- speed="$((speed / 100000))"
+ speed="$((speed / 1000))"
else
speed="$(awk -F ': |\\.' '/cpu MHz/ {printf $2; exit}' /proc/cpuinfo)"
- speed="$((speed / 100))"
fi
# Get CPU temp.
@@ -882,7 +892,6 @@ get_cpu() {
# Get CPU speed.
speed="$(sysctl -n hw.cpuspeed)"
[[ -z "$speed" ]] && speed="$(sysctl -n hw.clockrate)"
- speed="$((speed / 100))"
# Get CPU cores.
cores="$(sysctl -n hw.ncpu)"
@@ -920,7 +929,6 @@ get_cpu() {
# Get CPU speed.
speed="$(psrinfo -v | awk '/operates at/ {print $6; exit}')"
- speed="$((speed / 100))"
# Get CPU cores.
case "$cpu_cores" in
@@ -937,7 +945,6 @@ get_cpu() {
# Get CPU speed.
speed="$(sysinfo -cpu | awk '/running at/ {print $NF; exit}')"
speed="${speed/MHz}"
- speed="$((speed / 100))"
# Get CPU cores.
cores="$(sysinfo -cpu | grep -c -F 'CPU #')"
@@ -950,7 +957,6 @@ get_cpu() {
# Get CPU speed.
speed="$(prtconf | awk -F':' '/Processor Clock Speed/ {printf $2}')"
speed="${speed/MHz}"
- speed="$((speed / 100))"
# Get CPU cores.
case "$cpu_cores" in
@@ -960,8 +966,12 @@ get_cpu() {
;;
esac
- # Fix for speeds under 1ghz.
if [[ "$speed" ]]; then
+ # Hide decimals if on.
+ [[ "$speed_shorthand" == "on" ]] && \
+ speed="$((speed / 100))"
+
+ # Fix for speeds under 1ghz.
if [[ -z "${speed:1}" ]]; then
speed="0.${speed}"
else
@@ -1644,6 +1654,46 @@ get_term_font() {
term_font="$(osascript -e 'tell application "Terminal" to font name of window frontmost')"
;;
+ "iTerm2")
+ # Unfortunately the profile name is not unique, but it seems to be the only thing
+ # that identifies an active profile. There is the "id of current session of current window"
+ # thou, but that does not match to a guid in the plist.
+ # So, be warned! Collisions may occur!
+ # See: https://groups.google.com/forum/#!topic/iterm2-discuss/0tO3xZ4Zlwg
+ local current_profile_name
+ current_profile_name="$(osascript -e 'tell application "iTerm2" to profile name of current session of current window')"
+
+ # Warning: Dynamic profiles are not taken into account here!
+ # https://www.iterm2.com/documentation-dynamic-profiles.html
+
+ # Count Guids in "New Bookmarks"; they should be unique
+ local profiles_count
+ profiles_count="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null | grep -c "Guid")"
+
+ for ((i=0; i<=profiles_count; i++)); do
+ local profile_name
+ profile_name="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Name:" ~/Library/Preferences/com.googlecode.iterm2.plist 2>/dev/null)"
+
+ if [[ "$profile_name" == "$current_profile_name" ]]; then
+ # "Normal Font"
+ term_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Normal\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)"
+ # Font for non-ascii characters
+ # Only check for a different non-ascii font, if the user checked
+ # the "use a different font for non-ascii text" switch.
+ local use_different_font
+ use_different_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Use\ Non-ASCII\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)"
+
+ if [[ "$use_different_font" == "true" ]]; then
+ local non_ascii_font
+ non_ascii_font="$(/usr/libexec/PlistBuddy -c "Print :New\ Bookmarks:${i}:Non\ Ascii\ Font:" ~/Library/Preferences/com.googlecode.iterm2.plist)"
+
+ [[ "$term_font" != "$non_ascii_font" ]] && \
+ term_font="$term_font (normal) / $non_ascii_font (non-ascii)"
+ fi
+ fi
+ done
+ ;;
+
"deepin-terminal"*)
term_font="$(awk -F '=' '/font=/ {a=$2} /font_size/ {b=$2} END{print a " " b}' "${XDG_CONFIG_HOME}/deepin/deepin-terminal/config.conf")"
;;
@@ -3020,6 +3070,11 @@ get_distro_colors() {
ascii_file="netrunner"
;;
+ "Nitrux"*)
+ set_colors 4
+ ascii_file="nitrux"
+ ;;
+
"NixOS"*)
set_colors 4 6
ascii_file="nixos"
@@ -3155,6 +3210,11 @@ get_distro_colors() {
ascii_file="slackware"
;;
+ "SliTaz"*)
+ set_colors 3 3
+ ascii_file="slitaz"
+ ;;
+
"SmartOS"*)
set_colors 6 7
ascii_file="smartos"
@@ -3743,6 +3803,7 @@ INFO:
NOTE: This only supports Linux with cpufreq.
+ --speed_shorthand on/off Whether or not to show decimals in CPU speed.
--cpu_shorthand type Shorten the output of CPU
Possible values: name, speed, tiny, on, off
--cpu_cores type Whether or not to display the number of CPU cores
@@ -3948,6 +4009,7 @@ get_args() {
"--cpu_cores") cpu_cores="$2" ;;
"--cpu_speed") cpu_speed="$2" ;;
"--speed_type") speed_type="$2" ;;
+ "--speed_shorthand") speed_shorthand="$2" ;;
"--distro_shorthand") distro_shorthand="$2" ;;
"--kernel_shorthand") kernel_shorthand="$2" ;;
"--uptime_shorthand") uptime_shorthand="$2" ;;
diff --git a/neofetch.1 b/neofetch.1
index a51742df..245cbbb7 100644
--- a/neofetch.1
+++ b/neofetch.1
@@ -1,5 +1,5 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
-.TH NEOFETCH "1" "February 2017" "Neofetch 3.0.2" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.1.
+.TH NEOFETCH "1" "March 2017" "Neofetch 3.0.2" "User Commands"
.SH NAME
Neofetch \- A fast, highly customizable system info script
.SH SYNOPSIS
@@ -30,6 +30,9 @@ scaling_current, scaling_min, scaling_max
.IP
NOTE: This only supports Linux with cpufreq.
.TP
+\fB\-\-speed_shorthand\fR on/off
+Whether or not to show decimals in CPU speed.
+.TP
\fB\-\-cpu_shorthand\fR type
Shorten the output of CPU
Possible values: name, speed, tiny, on, off