mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-22 11:39:53 +00:00
Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8572cf9a08 | ||
|
|
abaf8808fe | ||
|
|
7646a76d02 | ||
|
|
4718dedd31 | ||
|
|
993d95d6bd | ||
|
|
3242425c4f | ||
|
|
55420c3c30 | ||
|
|
def8123c46 | ||
|
|
fe3da7e0b8 | ||
|
|
28f5630b05 | ||
|
|
38b705dd59 | ||
|
|
3025c2a8c4 | ||
|
|
efd48587c3 | ||
|
|
c48f201a9d | ||
|
|
901d5319bc | ||
|
|
874a29e0c3 | ||
|
|
05503e3914 | ||
|
|
c8b7ed6d1b | ||
|
|
b0cd5f07ec | ||
|
|
781a0fff9b | ||
|
|
74e8facfe2 | ||
|
|
04cf863f78 | ||
|
|
a1d87ea105 | ||
|
|
eeaae2d554 | ||
|
|
0b3fe3301f | ||
|
|
1948f0e4ff | ||
|
|
72e4e35b28 |
109
CHANGELOG.md
109
CHANGELOG.md
@@ -1,104 +1,41 @@
|
|||||||
## Contributors
|
## Contributors
|
||||||
|
|
||||||
- **[@konimex](https://github.com/konimex)**
|
- **[@MatthewCox](https://github.com/MatthewCox)**
|
||||||
|
- **[@dawidd6](https://github.com/dawidd6)**
|
||||||
|
- **[@erikdubois](https://github.com/erikdubois)**
|
||||||
- **[@mstraube](https://github.com/mstraube)**
|
- **[@mstraube](https://github.com/mstraube)**
|
||||||
- **[@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)**
|
|
||||||
- **[@HebaruSan](https://github.com/HebaruSan)**
|
|
||||||
- **[@LER0ever](https://github.com/LER0ever)**
|
|
||||||
- **[@obrevenge](https://github.com/obrevenge)**
|
|
||||||
- **[@ajjames31](https://github.com/ajjames31)**
|
|
||||||
- Eliezio Oliveira
|
|
||||||
|
|
||||||
|
|
||||||
## Operating System
|
## General
|
||||||
|
|
||||||
- Added Chrome OS Crouton support. **[@LER0ever](https://github.com/LER0ever)**
|
- Minimum required BASH version is now 3.2.
|
||||||
- Added support for SliTaz. **[@nilesr](https://github.com/nilesr)**
|
- (Neofetch has always used 3.2+ features, I've just made it obvious now in the documentation.)
|
||||||
- Added support for Nitrux. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
- Added support for DesaOS.
|
|
||||||
- Added support for MinGW.
|
|
||||||
- Added support for OBRevenge. **[@obrevenge](https://github.com/obrevenge)**
|
|
||||||
- Added support for ArchLabs. **[@obrevenge](https://github.com/obrevenge)**
|
|
||||||
|
|
||||||
|
|
||||||
## Screenshot
|
|
||||||
|
|
||||||
The screenshot feature no longer requires any configuration before working. We no longer hardcode `${HOME}/Pictures/neofetch` as the screenshot location. Here's how the `-s` and `-su` flags now function:
|
|
||||||
|
|
||||||
- `neofetch -s` will save a file in the current directory named: `neofetch-$(date +%F-%I-%M-%S-${RANDOM}).png`
|
|
||||||
- `neofetch -s test.png` will save a file in the current directory called `test.png`
|
|
||||||
- `neofetch -s ~/` will save a file in `~` called `neofetch-$(date +%F-%I-%M-%S-${RANDOM}).png`
|
|
||||||
- `neofetch -s ~/test.png` will save a file in `~` called `test.png`.
|
|
||||||
|
|
||||||
|
|
||||||
## ASCII
|
|
||||||
|
|
||||||
- Arch ASCII art now uses lighter colors.
|
|
||||||
- Fixed Ubuntu-Studio ASCII setting. **[@@HebaruSan](https://github.com/HebaruSan)**
|
|
||||||
- Updated Parabola logo. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
- Updated Raspbian ASCII art.
|
|
||||||
|
|
||||||
|
|
||||||
## Images
|
## Images
|
||||||
|
|
||||||
- Added `libsixel` backend.
|
- [w3m] Added `--loop` flag which makes Neofetch draw the image once per second.
|
||||||
- Added `termpix` backend.
|
- This is a workaround to the images disappearing on resize and workspace switch.
|
||||||
- Only use a zero width space in the `w3m` backend.
|
- Use Ctrl+C to exit.
|
||||||
- Fixed bug causing terminal size to not be found.
|
|
||||||
- [iTerm2] Fixed images not appearing inside `tmux`.
|
|
||||||
|
## Ascii
|
||||||
|
|
||||||
|
- Added Ubuntu-MATE ascii art.
|
||||||
|
- Fixed ArchLabs ascii art. **[@erikdubois](https://github.com/erikdubois)**
|
||||||
|
|
||||||
|
|
||||||
## Info
|
## Info
|
||||||
|
|
||||||
**Locale**
|
**Terminal Emulator**
|
||||||
|
|
||||||
- Added a new function to display system locale. (Disabled by default)
|
- Added font support for mate-terminal. **[@mstraube](https://github.com/mstraube)**
|
||||||
|
- [Termite] Fix font mismatch. **[@MatthewCox](https://github.com/MatthewCox)**
|
||||||
**CPU**
|
|
||||||
|
|
||||||
- Added 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] Added support for Amethyst. **[@jorgegonzalez](https://github.com/jorgegonzalez)**
|
|
||||||
|
|
||||||
**Battery**
|
|
||||||
|
|
||||||
- Added battery support for Bay Trail devices. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
|
|
||||||
**Disk**
|
|
||||||
|
|
||||||
- Added new option to only show dir name in subtitle.
|
|
||||||
|
|
||||||
**Song**
|
|
||||||
|
|
||||||
- Added support for Deepin Music. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
- Added support for Tomahawk. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
- Fixed Audacious song output when `dbus-send` fails. **[@mstraube](https://github.com/mstraube)**
|
|
||||||
|
|
||||||
**Local IP**
|
|
||||||
|
|
||||||
- [Linux] Fixed UID showing instead of Local IP on several versions/configs of iproute2.
|
|
||||||
|
|
||||||
**Packages**
|
|
||||||
|
|
||||||
- [eopkg] Use a faster detection method. **[@ikeydoherty](https://github.com/ikeydoherty)**
|
|
||||||
|
|
||||||
**Resolution**
|
|
||||||
|
|
||||||
- [macOS] Fixed `screenresolution` not appearing at all on newer versions. **[@eliezio](https://github.com/eliezio)**
|
|
||||||
- [Linux] Show decimals.
|
|
||||||
|
|
||||||
**GPU**
|
**GPU**
|
||||||
|
|
||||||
- [Linux] Hide duplicate GPU lines (Only display 1).
|
- [Linux] Fixed GPU sort.
|
||||||
|
|
||||||
|
**Song**
|
||||||
|
|
||||||
|
- Do not detect ibus\* or indicator\* as player. **[@dawidd6](https://github.com/dawidd6)**
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ Neofetch is a CLI system information tool written in BASH. Neofetch displays inf
|
|||||||
|
|
||||||
Neofetch is highly customizable through the use of command line flags or the user config file. There are over 50 config options to mess around with and there's the `print_info()` function and friends which let you add your own custom info.
|
Neofetch is highly customizable through the use of command line flags or the user config file. There are over 50 config options to mess around with and there's the `print_info()` function and friends which let you add your own custom info.
|
||||||
|
|
||||||
Neofetch can be used on any OS that has BASH, it's just a matter of adding support. If your OS/Distro isn't in the list below, feel free to open an issue on the repo and I'll gladly add support. Neofetch currently supports `Linux`, `MacOS`, `iOS`, `BSD`, `Solaris`, `Android`, `Haiku`, `GNU Hurd`, `MINIX`, `AIX`, and `Windows (Cygwin/MSYS2/MinGW/Windows 10 Linux subsystem)`.
|
Neofetch can be used on any OS that has BASH 3.2+, it's just a matter of adding support. If your OS/Distro isn't in the list below, feel free to open an issue on the repo and I'll gladly add support. Neofetch currently supports `Linux`, `MacOS`, `iOS`, `BSD`, `Solaris`, `Android`, `Haiku`, `GNU Hurd`, `MINIX`, `AIX`, and `Windows (Cygwin/MSYS2/MinGW/Windows 10 Linux subsystem)`.
|
||||||
|
|
||||||
For more information:
|
For more information:
|
||||||
|
|
||||||
|
|||||||
@@ -15,4 +15,4 @@ ${c1} sy
|
|||||||
/--::::::::::::dd::::::::::+N
|
/--::::::::::::dd::::::::::+N
|
||||||
:-:::/+syhd NNN N dhys+/:::/
|
:-:::/+syhd NNN N dhys+/:::/
|
||||||
d::+ydN /s+/d
|
d::+ydN /s+/d
|
||||||
hsd y\\.
|
arc y\\.
|
||||||
|
|||||||
20
ascii/distro/ubuntu-mate
Normal file
20
ascii/distro/ubuntu-mate
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
${c1} `:+shmNNMMNNmhs+:`
|
||||||
|
.odMMMMMMMMMMMMMMMMMMdo.
|
||||||
|
/dMMMMMMMMMMMMMMMmMMMMMMMMd/
|
||||||
|
:mMMMMMMMMMMMMNNNNM/`/yNMMMMMMm:
|
||||||
|
`yMMMMMMMMMms:..-::oM: -omMMMMMy`
|
||||||
|
`dMMMMMMMMy-.odNMMMMMM: -odMMMMMMd`
|
||||||
|
hMMMMMMMm-.hMMy/....+M:`/yNm+mMMMMMMMh
|
||||||
|
/MMMMNmMN-:NMy`-yNMMMMMmNyyMN:`dMMMMMMM/
|
||||||
|
hMMMMm -odMMh`sMMMMMMMMMMs sMN..MMMMMMMh
|
||||||
|
NMMMMm `/yNMMMMMMMMMMMM: MM+ mMMMMMMN
|
||||||
|
NMMMMm `/yNMMMMMMMMMMMM: MM+ mMMMMMMN
|
||||||
|
hMMMMm -odMMh sMMMMMMMMMMs oMN..MMMMMMMh
|
||||||
|
/MMMMNNMN-:NMy`-yNMMMMMNNsyMN:`dMMMMMMM/
|
||||||
|
hMMMMMMMm-.hMMy/....+M:.+hNd+mMMMMMMMh
|
||||||
|
`dMMMMMMMMy-.odNMMMMMM: :smMMMMMMd`
|
||||||
|
yMMMMMMMMMms/..-::oM: .+dMMMMMy
|
||||||
|
:mMMMMMMMMMMMMNNNNM: :smMMMMMMm:
|
||||||
|
/dMMMMMMMMMMMMMMMdNMMMMMMMd/
|
||||||
|
.odMMMMMMMMMMMMMMMMMMdo.
|
||||||
|
`:+shmNNMMNNmhs+:`
|
||||||
@@ -540,6 +540,7 @@ disk_display="off"
|
|||||||
|
|
||||||
# Backend Settings
|
# Backend Settings
|
||||||
|
|
||||||
|
|
||||||
# Image backend.
|
# Image backend.
|
||||||
#
|
#
|
||||||
# Default: 'ascii'
|
# Default: 'ascii'
|
||||||
@@ -602,6 +603,15 @@ ascii_bold="on"
|
|||||||
# Image Options
|
# Image Options
|
||||||
|
|
||||||
|
|
||||||
|
# Image loop
|
||||||
|
# Setting this to on will make neofetch redraw the image constantly until
|
||||||
|
# Ctrl+C is pressed. This fixes display issues in some terminal emulators.
|
||||||
|
#
|
||||||
|
# Default: 'off'
|
||||||
|
# Values: 'on', 'off'
|
||||||
|
# Flag: --loop
|
||||||
|
image_loop="off"
|
||||||
|
|
||||||
# Thumbnail directory
|
# Thumbnail directory
|
||||||
#
|
#
|
||||||
# Default: '~/.cache/thumbnails/neofetch'
|
# Default: '~/.cache/thumbnails/neofetch'
|
||||||
@@ -714,4 +724,4 @@ image_host="teknik"
|
|||||||
#
|
#
|
||||||
# NOTE: Don't change this value, neofetch reads this to determine
|
# NOTE: Don't change this value, neofetch reads this to determine
|
||||||
# how to handle backwards compatibility.
|
# how to handle backwards compatibility.
|
||||||
config_version="3.1.0"
|
config_version="3.1.0-git"
|
||||||
|
|||||||
144
neofetch
144
neofetch
@@ -9,7 +9,7 @@
|
|||||||
# https://github.com/dylanaraps/
|
# https://github.com/dylanaraps/
|
||||||
|
|
||||||
# Neofetch version.
|
# Neofetch version.
|
||||||
version="3.1.0"
|
version="3.1.0-git"
|
||||||
|
|
||||||
bash_version="${BASH_VERSION/.*}"
|
bash_version="${BASH_VERSION/.*}"
|
||||||
sys_locale="${LANG:-C}"
|
sys_locale="${LANG:-C}"
|
||||||
@@ -1071,7 +1071,7 @@ get_gpu() {
|
|||||||
"Linux")
|
"Linux")
|
||||||
# Read GPUs into array.
|
# Read GPUs into array.
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '!a[$0]++ && /"Display|"3D|"VGA/ {print $3 " " $4}'))
|
gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '/"Display|"3D|"VGA/ {print $3 " " $4}'))
|
||||||
IFS="$old_ifs"
|
IFS="$old_ifs"
|
||||||
|
|
||||||
# Number the GPUs if more than one exists.
|
# Number the GPUs if more than one exists.
|
||||||
@@ -1173,7 +1173,16 @@ get_gpu() {
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"BSD" | "Solaris" | "MINIX" | "AIX")
|
"Windows")
|
||||||
|
gpu="$(wmic path Win32_VideoController get caption)"
|
||||||
|
gpu="${gpu//Caption}"
|
||||||
|
;;
|
||||||
|
|
||||||
|
"Haiku")
|
||||||
|
gpu="$(listdev | grep -A2 -F 'device Display controller' | awk -F':' '/device beef/ {print $2}')"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
case "$kernel_name" in
|
case "$kernel_name" in
|
||||||
"FreeBSD"* | "DragonFly"*)
|
"FreeBSD"* | "DragonFly"*)
|
||||||
gpu="$(pciconf -lv | grep -B 4 -F "VGA" | grep -F "device")"
|
gpu="$(pciconf -lv | grep -B 4 -F "VGA" | grep -F "device")"
|
||||||
@@ -1187,15 +1196,6 @@ get_gpu() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Windows")
|
|
||||||
gpu="$(wmic path Win32_VideoController get caption)"
|
|
||||||
gpu="${gpu//Caption}"
|
|
||||||
;;
|
|
||||||
|
|
||||||
"Haiku")
|
|
||||||
gpu="$(listdev | grep -A2 -F 'device Display controller' | awk -F':' '/device beef/ {print $2}')"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ "$gpu_brand" == "off" ]]; then
|
if [[ "$gpu_brand" == "off" ]]; then
|
||||||
@@ -1291,7 +1291,7 @@ get_memory() {
|
|||||||
|
|
||||||
get_song() {
|
get_song() {
|
||||||
# This is absurdly long.
|
# This is absurdly long.
|
||||||
player="$(ps x | awk '!(/ awk|Helper|Cache/) && /mpd|mopidy|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|guayadeque|yarock|qmmp|quodlibet|deepin-music|tomahawk/ {printf $5 " " $6; exit}')"
|
player="$(ps x | awk '!(/ awk|Helper|Cache|ibus|indicator/) && /mpd|mopidy|cmus|mocp|spotify|Google Play|iTunes.app|rhythmbox|banshee|amarok|deadbeef|audacious|xmms2d|gnome-music|lollypop|clementine|pragha|exaile|juk|bluemindo|guayadeque|yarock|qmmp|quodlibet|deepin-music|tomahawk/ {printf $5 " " $6; exit}')"
|
||||||
|
|
||||||
get_song_dbus() {
|
get_song_dbus() {
|
||||||
# Multiple players use an almost identical dbus command to get the information.
|
# Multiple players use an almost identical dbus command to get the information.
|
||||||
@@ -1394,19 +1394,6 @@ get_song() {
|
|||||||
|
|
||||||
get_resolution() {
|
get_resolution() {
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Linux" | "BSD" | "Solaris" | "MINIX" | "AIX")
|
|
||||||
if type -p xrandr >/dev/null; then
|
|
||||||
case "$refresh_rate" in
|
|
||||||
"on") resolution="$(xrandr --nograb --current | awk 'match($0,/[0-9]*\.[0-9]*\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}')" ;;
|
|
||||||
"off") resolution="$(xrandr --nograb --current | awk '/\*/ {printf $1 ", "}')" ;;
|
|
||||||
esac
|
|
||||||
resolution="${resolution//\*}"
|
|
||||||
|
|
||||||
elif type -p xdpyinfo >/dev/null; then
|
|
||||||
resolution="$(xdpyinfo | awk '/dimensions:/ {printf $2}')"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
"Mac OS X")
|
"Mac OS X")
|
||||||
if type -p screenresolution >/dev/null; then
|
if type -p screenresolution >/dev/null; then
|
||||||
resolution="$(screenresolution get 2>&1 | awk '/Display/ {printf $6 "Hz, "}')"
|
resolution="$(screenresolution get 2>&1 | awk '/Display/ {printf $6 "Hz, "}')"
|
||||||
@@ -1451,6 +1438,19 @@ get_resolution() {
|
|||||||
|
|
||||||
[[ "$refresh_rate" == "off" ]] && resolution="${resolution/ @*}"
|
[[ "$refresh_rate" == "off" ]] && resolution="${resolution/ @*}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
if type -p xrandr >/dev/null; then
|
||||||
|
case "$refresh_rate" in
|
||||||
|
"on") resolution="$(xrandr --nograb --current | awk 'match($0,/[0-9]*\.[0-9]*\*/) {printf $1 " @ " substr($0,RSTART,RLENGTH) "Hz, "}')" ;;
|
||||||
|
"off") resolution="$(xrandr --nograb --current | awk '/\*/ {printf $1 ", "}')" ;;
|
||||||
|
esac
|
||||||
|
resolution="${resolution//\*}"
|
||||||
|
|
||||||
|
elif type -p xdpyinfo >/dev/null; then
|
||||||
|
resolution="$(xdpyinfo | awk '/dimensions:/ {printf $2}')"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
resolution="${resolution%,*}"
|
resolution="${resolution%,*}"
|
||||||
@@ -1734,6 +1734,34 @@ get_term_font() {
|
|||||||
[[ "$profile_filename" ]] && term_font="$(awk -F '=|,' '/Font=/ {print $2 " " $3}' "$profile_filename")"
|
[[ "$profile_filename" ]] && term_font="$(awk -F '=|,' '/Font=/ {print $2 " " $3}' "$profile_filename")"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"mate-terminal")
|
||||||
|
# To get the actual config we have to create a temporarily file with the --save-config option.
|
||||||
|
mateterm_config="/tmp/mateterm.cfg"
|
||||||
|
|
||||||
|
# Ensure /tmp exists and we do not overwrite anything.
|
||||||
|
if [[ -d /tmp && ! -f "$mateterm_config" ]]; then
|
||||||
|
mate-terminal --save-config="$mateterm_config"
|
||||||
|
|
||||||
|
role="$(xprop -id "${WINDOWID}" WM_WINDOW_ROLE)"
|
||||||
|
role="${role##*= }"
|
||||||
|
|
||||||
|
term_id="$(grep -A1 "${role//\"}" "$mateterm_config")"
|
||||||
|
term_id="${term_id##*=}"
|
||||||
|
|
||||||
|
profile="$(grep -A1 "\[$term_id\]" "$mateterm_config")"
|
||||||
|
profile="${profile##*=}"
|
||||||
|
|
||||||
|
rm -f "$mateterm_config"
|
||||||
|
|
||||||
|
if [[ "$(gsettings get org.mate.terminal.profile:/org/mate/terminal/profiles/"${profile}"/ use-system-font)" == "true" ]]; then
|
||||||
|
term_font="$(gsettings get org.mate.interface monospace-font-name)"
|
||||||
|
else
|
||||||
|
term_font="$(gsettings get org.mate.terminal.profile:/org/mate/terminal/profiles/"${profile}"/ font)"
|
||||||
|
fi
|
||||||
|
term_font="$(trim_quotes "$term_font")"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
"mintty")
|
"mintty")
|
||||||
term_font="$(awk -F '=' '!/^($|#)/ && /Font/ {printf $2; exit}' "${HOME}/.minttyrc")"
|
term_font="$(awk -F '=' '!/^($|#)/ && /Font/ {printf $2; exit}' "${HOME}/.minttyrc")"
|
||||||
;;
|
;;
|
||||||
@@ -1756,7 +1784,7 @@ get_term_font() {
|
|||||||
|
|
||||||
"termite")
|
"termite")
|
||||||
[[ -f "${XDG_CONFIG_HOME}/termite/config" ]] && termite_config="${XDG_CONFIG_HOME}/termite/config"
|
[[ -f "${XDG_CONFIG_HOME}/termite/config" ]] && termite_config="${XDG_CONFIG_HOME}/termite/config"
|
||||||
term_font="$(awk -F '= ' '/\[options\]/ {opt=1} /^font/ {if(opt==1) a=$2; opt=0} END{print a}' "/etc/xdg/termite/config" "$termite_config")"
|
term_font="$(awk -F '= ' '/\[options\]/ {opt=1} /^\s*font/ {if(opt==1) a=$2; opt=0} END{print a}' "/etc/xdg/termite/config" "$termite_config")"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"urxvt" | "urxvtd" | "rxvt-unicode" | "xterm")
|
"urxvt" | "urxvtd" | "rxvt-unicode" | "xterm")
|
||||||
@@ -2192,7 +2220,29 @@ get_image_source() {
|
|||||||
|
|
||||||
get_wallpaper() {
|
get_wallpaper() {
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Linux" | "BSD" | "Solaris" | "MINIX" | "AIX")
|
"Mac OS X")
|
||||||
|
image="$(osascript -e 'tell application "System Events" to picture of current desktop')"
|
||||||
|
;;
|
||||||
|
|
||||||
|
"Windows")
|
||||||
|
case "$distro" in
|
||||||
|
"Windows XP")
|
||||||
|
case "$kernel_name" in
|
||||||
|
"CYGWIN"*) image="/cygdrive/c/Documents and Settings/${USER}" ;;
|
||||||
|
"MSYS2"* | "MINGW*") image="/c/Documents and Settings/${USER}" ;;
|
||||||
|
esac
|
||||||
|
image+="/Local Settings/Application Data/Microsoft"
|
||||||
|
image+="/Wallpaper1.bmp"
|
||||||
|
;;
|
||||||
|
|
||||||
|
"Windows"*)
|
||||||
|
image="$APPDATA/Microsoft/Windows/Themes"
|
||||||
|
image+="/TranscodedWallpaper.jpg"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
# Get DE if user has disabled the function.
|
# Get DE if user has disabled the function.
|
||||||
((de_run != 1)) && get_de
|
((de_run != 1)) && get_de
|
||||||
|
|
||||||
@@ -2223,28 +2273,6 @@ get_wallpaper() {
|
|||||||
image="${image/'file://'}"
|
image="${image/'file://'}"
|
||||||
image="$(trim_quotes "$image")"
|
image="$(trim_quotes "$image")"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Mac OS X")
|
|
||||||
image="$(osascript -e 'tell application "System Events" to picture of current desktop')"
|
|
||||||
;;
|
|
||||||
|
|
||||||
"Windows")
|
|
||||||
case "$distro" in
|
|
||||||
"Windows XP")
|
|
||||||
case "$kernel_name" in
|
|
||||||
"CYGWIN"*) image="/cygdrive/c/Documents and Settings/${USER}" ;;
|
|
||||||
"MSYS2"* | "MINGW*") image="/c/Documents and Settings/${USER}" ;;
|
|
||||||
esac
|
|
||||||
image+="/Local Settings/Application Data/Microsoft"
|
|
||||||
image+="/Wallpaper1.bmp"
|
|
||||||
;;
|
|
||||||
|
|
||||||
"Windows"*)
|
|
||||||
image="$APPDATA/Microsoft/Windows/Themes"
|
|
||||||
image+="/TranscodedWallpaper.jpg"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# If image is an xml file, don't use it.
|
# If image is an xml file, don't use it.
|
||||||
@@ -2502,7 +2530,7 @@ display_image() {
|
|||||||
printf "%b\n" "0;1;$xoffset;$yoffset;$width;$height;;;;;$image\n4;\n3;" |\
|
printf "%b\n" "0;1;$xoffset;$yoffset;$width;$height;;;;;$image\n4;\n3;" |\
|
||||||
"${w3m_img_path:-false}" -bg "$background_color" >/dev/null & 2>&1 || to_off "Image: w3m-img failed to display the image."
|
"${w3m_img_path:-false}" -bg "$background_color" >/dev/null & 2>&1 || to_off "Image: w3m-img failed to display the image."
|
||||||
|
|
||||||
zws=" "
|
zws="\xE2\x80\x8B\x20"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@@ -2709,11 +2737,11 @@ get_underline() {
|
|||||||
|
|
||||||
get_line_break() {
|
get_line_break() {
|
||||||
# Print it directly.
|
# Print it directly.
|
||||||
printf "%s\n" "${zws}"
|
printf "%b\n" "${zws}"
|
||||||
|
|
||||||
# Calculate info height.
|
# Calculate info height.
|
||||||
((++info_height))
|
((++info_height))
|
||||||
line_breaks+=$'\n'
|
line_breaks+="\n"
|
||||||
|
|
||||||
# Tell info() that we printed manually.
|
# Tell info() that we printed manually.
|
||||||
prin=1
|
prin=1
|
||||||
@@ -3301,6 +3329,11 @@ get_distro_colors() {
|
|||||||
ascii_file="ubuntu-gnome"
|
ascii_file="ubuntu-gnome"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"Ubuntu-MATE"*)
|
||||||
|
set_colors 2 7
|
||||||
|
ascii_file="ubuntu-mate"
|
||||||
|
;;
|
||||||
|
|
||||||
"ubuntu_old")
|
"ubuntu_old")
|
||||||
set_colors 1 7 3
|
set_colors 1 7 3
|
||||||
ascii_file="ubuntu_old"
|
ascii_file="ubuntu_old"
|
||||||
@@ -3967,6 +4000,7 @@ ASCII:
|
|||||||
Possible values: bar, infobar, barinfo, off
|
Possible values: bar, infobar, barinfo, off
|
||||||
|
|
||||||
IMAGE:
|
IMAGE:
|
||||||
|
--loop Redraw the image constantly until Ctrl+C is used. This fixes issues in some terminals emulators when using image mode.
|
||||||
--size 00px | --size 00% How to size the image.
|
--size 00px | --size 00% How to size the image.
|
||||||
Possible values: auto, 00px, 00%, none
|
Possible values: auto, 00px, 00%, none
|
||||||
--crop_mode mode Which crop mode to use
|
--crop_mode mode Which crop mode to use
|
||||||
@@ -4151,6 +4185,7 @@ get_args() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# Image options
|
# Image options
|
||||||
|
"--loop") image_loop="on" ;;
|
||||||
"--image_size" | "--size") image_size="$2" ;;
|
"--image_size" | "--size") image_size="$2" ;;
|
||||||
"--crop_mode") crop_mode="$2" ;;
|
"--crop_mode") crop_mode="$2" ;;
|
||||||
"--crop_offset") crop_offset="$2" ;;
|
"--crop_offset") crop_offset="$2" ;;
|
||||||
@@ -4255,6 +4290,9 @@ main() {
|
|||||||
# Show error messages.
|
# Show error messages.
|
||||||
[[ "$verbose" == "on" ]] && printf "%b" "$err" >&2
|
[[ "$verbose" == "on" ]] && printf "%b" "$err" >&2
|
||||||
|
|
||||||
|
# If `--loop` was used, constantly redraw the image.
|
||||||
|
while [[ "$image_loop" == "on" && "$image_backend" == "w3m" ]]; do display_image; sleep 1s; done
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3.
|
||||||
.TH NEOFETCH "1" "April 2017" "Neofetch 3.1.0" "User Commands"
|
.TH NEOFETCH "1" "April 2017" "Neofetch 3.1.0-git" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
Neofetch \- A fast, highly customizable system info script
|
Neofetch \- A fast, highly customizable system info script
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@@ -247,6 +247,9 @@ Hide the info text and only show the ascii logo.
|
|||||||
Possible values: bar, infobar, barinfo, off
|
Possible values: bar, infobar, barinfo, off
|
||||||
.SS "IMAGE:"
|
.SS "IMAGE:"
|
||||||
.TP
|
.TP
|
||||||
|
\fB\-\-loop\fR
|
||||||
|
Redraw the image constantly until Ctrl+C is used. This fixes issues in some terminals emulators when using image mode.
|
||||||
|
.TP
|
||||||
\fB\-\-size\fR 00px | \fB\-\-size\fR 00%
|
\fB\-\-size\fR 00px | \fB\-\-size\fR 00%
|
||||||
How to size the image.
|
How to size the image.
|
||||||
Possible values: auto, 00px, 00%, none
|
Possible values: auto, 00px, 00%, none
|
||||||
|
|||||||
Reference in New Issue
Block a user