Compare commits

...

50 Commits
1.9 ... 1.9.1

Author SHA1 Message Date
Dylan Araps
564b0f889e Docs: Change version 2016-11-04 18:45:02 +11:00
Dylan Araps
816931d652 Travis: Fix title 2016-11-04 17:52:37 +11:00
Dylan Araps
8d7322afc3 Travis: Don't install neofetch 2016-11-04 17:49:22 +11:00
Dylan Araps
040a73be08 Changelog 2016-11-04 17:46:57 +11:00
Dylan Araps
30ab0c7cb6 Travis: Use --config travis 2016-11-04 17:43:59 +11:00
Dylan Araps
e912d35b34 Remove --test 2016-11-04 17:42:32 +11:00
Dylan Araps
5585eaa8b8 General: If something can't be detected let the user know in verbose mode 2016-11-04 14:49:50 +11:00
Dylan Araps
971616f0c4 Changelog 2016-11-04 13:45:37 +11:00
Dylan Araps
4cea604b86 Termfont: Simpler awk commands 2016-11-04 13:44:37 +11:00
Dylan Araps
99f60211de Changelog 2016-11-04 12:59:06 +11:00
Dylan Araps
c02a77ea69 Ascii: [OpenBSD] Made ascii art thinner 2016-11-04 12:58:18 +11:00
Dylan Araps
af7e8c13ce Update Changelog.md 2016-11-03 12:48:30 +11:00
Dylan Araps
3a0c82ebc5 Merge branch 'master' of https://github.com/dylanaraps/neofetch 2016-11-03 11:14:59 +11:00
Dylan Araps
2b3940adb9 Memory: [OpenBSD] Fix OpenBSD memory usage - @Head-on-a-Stick (Closes #413) 2016-11-03 11:14:34 +11:00
Dylan Araps
d2e82bc245 Update Changelog.md 2016-11-03 07:34:16 +11:00
Dylan Araps
c1b35131d5 Merge pull request #412 from termux/termux-default-config
Android (Termux): Fix default config location
2016-11-03 07:29:22 +11:00
Fredrik Fornwall
7ebd6dacba Android (Termux): Fix default config location 2016-11-02 16:18:45 +01:00
Dylan Araps
2c20ec3a16 Changelog 2016-11-02 17:41:42 +11:00
Dylan Araps
bd0dd91973 General: Add support for BlankOn Linux 2016-11-02 17:40:50 +11:00
Dylan Araps
39371e7f05 Changelog 2016-11-02 17:18:19 +11:00
Dylan Araps
ba4b541167 Image: Fix cursor position in URxvt when using terminal padding 2016-11-02 17:17:09 +11:00
Dylan Araps
5cede165cf WM Theme: Use double quotes 2016-11-02 15:56:00 +11:00
Dylan Araps
60a0c6a32a Merge branch 'master' of https://github.com/dylanaraps/neofetch 2016-11-02 15:50:09 +11:00
Dylan Araps
e8ab7ea88d Remove stray newline 2016-11-02 15:49:52 +11:00
Dylan Araps
7cffacad51 Update Changelog.md 2016-11-02 14:42:39 +11:00
Dylan Araps
a75b79bd8e Update Changelog.md 2016-11-02 14:42:28 +11:00
Dylan Araps
2705f23248 Merge branch 'master' of https://github.com/dylanaraps/neofetch 2016-11-02 14:41:57 +11:00
Dylan Araps
0c28f8c3f6 WM Theme: Don't print Mutter (Budgie) wm theme 2016-11-02 14:41:39 +11:00
Dylan Araps
35b532dff8 Update README.md 2016-11-02 13:32:18 +11:00
Dylan Araps
8dc20896c6 Update README.md 2016-11-02 13:31:22 +11:00
Dylan Araps
a6949ffa91 Update Changelog.md 2016-11-02 13:30:10 +11:00
Dylan Araps
a687096bc2 Merge pull request #411 from konimex/master
Various updates for Android/Termux
2016-11-02 13:29:29 +11:00
Herdiansyah
5c1d5fec76 README: Added installation instructions for Android/Termux 2016-11-02 08:23:57 +07:00
Herdiansyah
ebf5f6345a Android (Termux): Fixed ASCII not appearing 2016-11-02 08:21:15 +07:00
Dylan Araps
651d38c949 Theme: Misc fixes 2016-11-02 10:16:16 +11:00
Dylan Araps
6853144380 Changelog 2016-11-02 10:11:27 +11:00
Dylan Araps
a44b757599 Merge branch 'master' of https://github.com/dylanaraps/neofetch 2016-11-02 10:10:54 +11:00
Dylan Araps
1505ed5d68 Theme: [Budgie] Fix incorrect GTK Theme/Icons 2016-11-02 10:10:40 +11:00
Dylan Araps
33d5009ba3 Readme: New screenshots 2016-11-02 09:57:48 +11:00
Dylan Araps
35e461f3c7 Update Changelog.md 2016-11-02 09:54:06 +11:00
Dylan Araps
af98285ea0 Update Changelog.md 2016-11-02 09:53:09 +11:00
Dylan Araps
013e9d6652 Termfont: [Linux] Fix whitespace issue 2016-11-02 09:52:46 +11:00
Dylan Araps
453a38d79f Images: Fix Division by 0 error. Closes #410 2016-11-02 09:44:25 +11:00
Dylan Araps
7b2dcea117 Termfont: [Termite] Fix incorrect font choses. Closes #409 2016-11-02 09:39:37 +11:00
Dylan Araps
462d4c594a prin: Fix bold not working, Add prin tests to travis 2016-11-02 00:54:52 +11:00
Dylan Araps
00f22df3c8 prin: Revert bold fix 2016-11-02 00:41:52 +11:00
Dylan Araps
6ada4c7fb8 prin: Fix bold not working, Fix color breakage. Closes #407 2016-11-02 00:37:54 +11:00
Dylan Araps
e0e0c3243c Changelog 2016-11-01 23:20:33 +11:00
Dylan Araps
260253d366 Ascii: Update Tails ascii art 2016-11-01 23:20:03 +11:00
Dylan Araps
a37a3eec31 Update docs 2016-11-01 17:57:08 +11:00
9 changed files with 195 additions and 230 deletions

View File

@@ -10,6 +10,4 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install screenresolution; fi
script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then PREFIX=/usr/local make install ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo make install ; fi
- time neofetch --ascii --config off --ascii_distro travis -v --test
- time ./neofetch --ascii --config travis --ascii_distro travis -v

View File

@@ -1,173 +1,68 @@
## Contributors
- **[@konimex](https://github.com/konimex)**
- **[@iandrewt](https://github.com/iandrewt)**
- **[@coypoop](https://github.com/coypoop)**
- **[@ncmprhnsbl](https://github.com/ncmprhnsbl)**
- **[@koreacomputercenter](https://github.com/koreacomputercenter)**
- **[@fornwall](https://github.com/fornwall)**
- **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)**
## Packages
- Neofetch is now in Termux`s repos.
## General
- Added new function called `checkoldflags` which informs users about deprecated config options.
- Change all `OS X` references to `macOS`. **[@iandrewt](https://github.com/iandrewt)**
- Fix corrupted text when long lines are cut-off.
- Don't dynamically place prompt in `image=off` mode.
- Cursor Position: Fix issues when using URxvt+Padding
- [Cursor Position] Fix cursor position in URxvt when using terminal padding.
- [Termux] Fix default ascii location. **[@konimex](https://github.com/konimex)**
- [Termux] Fix default config location. **[@fornwall](https://github.com/fornwall)**
- If a function fails to detect info, let the user know in verbose mode. (`-v`)
- Removed `--test` in favor of a separate config file. Travis.ci now uses `neofetch --config travis` instead of a hacked together arg.
## Operating System
![android](https://u.teknik.io/4XdJy.png)
- Added support for Android.
- Dependencies:
- Required: `bash` and `busybox`
- Note: I recommend installing `termux` from the Play Store or F-Droid. Termux provides you with a fully working Linux environment, doesn't require root acess and includes all dependencies.
- Added support for Bitrig. **[@konimex](https://github.com/konimex)**
- Added support for Sparky Linux.
- Added support for Porteus. **[@ncmprhnsbl](https://github.com/ncmprhnsbl)**
- Added support for Red Star OS. **[@koreacomputercenter](https://github.com/koreacomputercenter)**
## Packages
- Neofetch is now in Gentoo's official repos.
- Added support for BlankOn Linux.
## Images
**Fixed rendering issues in URxvt when using an XFT font.**
![scrot](https://i.sli.mg/6qp9Cg.png)
This was first thought to be an issue between URxvt and W3m-img and I apologize for immediately closing bug reports and dismissing comments about this.
I spent yesterday trying to fix this issue and found out that launching neofetch with `--bold off`
reduced the rendering problems. I did more digging and found out that removing all text formatting fixes the issue entirely. I later found out that adding a single unformatted character before the formatted text fixed the issue while keeping the formatting the same.
I opened up this PR https://github.com/dylanaraps/neofetch/pull/358 which added options to enable a border between the image and the text to fix the issue. **[@konimex](https://github.com/konimex)** later commented informing me that we could just use a `zero-width space` to fix the issue and that we didn't need a new function/args/ugly border. doh
The final fix was as simple as adding a zero-width space before the info, here's the commit.
https://github.com/dylanaraps/neofetch/commit/3e9c3d648cb4c6f0d5fe5f0b96f9e29429af39d9
**Removed hard dependency on `\033[14t`**
Neofetch no longer requires a terminal emulator that supports `\033[14t` this means that neofetch now works in Konsole. Instead of using the escape sequence users now have three options for getting the terminal size in pixels.
- `xdotool`
- `xwininfo` + `xprop`
- `xwininfo` + `xdpyinfo`
Neofetch will detect whatever combination you have insalled and use these programs.
Note: `\033[14t` is still supported, if images already work for you then you don't have to install anything else.
- [w3m-img] Draw the image twice to fix rendering issues in Konsole.
- [w3m-img] Fix cursor position when using `yoffset`.
- [w3m-img] Add `-bg` support with the new option `--bg_color`.
- `neofetch --bg_color blue` will make the background behind the image blue.
- Note: The background color is only visible behind transparent parts of the image.
- If the terminal width is found as `0`, fallback to ascii mode.
- Fix division by 0 error.
## Ascii
- Bold ascii art by default.
- Fixed incorrect prompt location when using `ascii_logo_size small`.
- Fixed incorrect colors used on light terminals.
- Update Void Linux ascii art. **[@ncmprhnsbl](https://github.com/ncmprhnsbl)**
- Update Solus ascii art.
- [Tails] Update ascii art.
- [OpenBSD] Made ascii art thinner
## Info
**Distro**<br \>
**Prin**<br \>
- Expanded `distro_shorthand` to macOS, BSD and Solaris. **[@konimex](https://github.com/konimex)**
- Removed `osx_buildversion` and `osx_codename` in favour of `distro_shorthand`. **[@konimex](https://github.com/konimex)**
- Fix color breakage.
- Fix bold not working.
**Desktop Environment**<br \>
- [Windows] Added support for showing DE.
- Windows 8 and above: `Modern UI/Metro`
- Windows 7 and below: `Aero`
**Terminal**<br \>
**Window Manager**<br \>
- Fix whitespace error.
**Terminal Font**<br \>
- [Termite] Fix incorrect Termite font chosen.
- [Termite] Simplify `awk` command.
- [xfce4-terminal] Simplify `awk` command.
**Theme**<br \>
- [Budgie] Fix incorrect GTK Theme/Icons
- [Windows] Added support for custom WMs/Shells.
- Neofetch now detects `blackbox`, `bugn`, `Windawesome`, `emerge` and `litestep`.
**Window Manager Theme**<br \>
- [Windows] Added support for Blackbox themes.
**CPU**<br \>
- Added `cpu_speed` which lets you hide/show the speed in the output.
- Expanded `cpu_cores` option by adding two new values, `logical` and `physical`.
- `logical`: Show all virtual cores (hyperthreaded).
- `physical`: Only show physical cores.
- [Linux] Added support for showing CPU temperature.
- Added new option called `cpu_temp`.
- Note: This is disabled by default and can be enabled by changing the value of `cpu_temp` in your config to `on`.
- [macOS] Print physical cores instead of hyper-threaded cores. **[@iandrewt](https://github.com/iandrewt)**
- [iOS] Rewrite CPU function.
**GPU**
- [iOS] Rewrite GPU function.
- [Linux] Rewrite GPU function.
- Neofetch also caches the info until reboot.
**Uptime**<br \>
- Rewrote uptime function to use seconds since boot instead of the `uptime` command.
- Every OS/Distro now has the pretty `uptime -p` output!
- Remove `up` from output.
**Resolution**<br \>
- [macOS] Add @2x label for retina resolutions. **[@iandrewt](https://github.com/iandrewt)**
- [Budgie (Mutter)] Don't print WM Theme.
**Memory**<br \>
- [Linux] Correctly calculate used memory.
- The output should now match `conky`, `htop` and etc.
- Source: https://github.com/KittyKatt/screenFetch/issues/386#issuecomment-249312716
- [NetBSD] Fix memory output for sizes over 4GB. **[@coypoop](https://github.com/coypoop)**
**Shell**<br \>
- Hide shell path by default.
- Show shell version by default.
**Battery**<br \>
- [Linux] Rewrote and simplified battery function.
- Removed `battery_shorthand`
- Removed `battery_num`
**Theme Font**<br \>
- [XFCE] Fixed incorrect font output.
**Color Blocks**<br \>
- Fixed `block_width` not working.
- Fixed `% s` appearing in color blocks when neofetch is run from `tty`
- Fixed `block_width` being off by one. A value of `2` made the blocks `3` wide instead of `2` wide.
**Terminal and Terminal Font**<br \>
- [Linux] Use `/proc/$PPID/comm` instead of parsing `ps`.
- Uppercase first letter of `termfont` output.
- Don't print broken output of busybox's `ps`.
- Remove path from output.
**Song**<br \>
- [macOS] Fix iTunes automatically opening. **[@iandrewt](https://github.com/iandrewt)**
- Added support for Audacious. **[@ncmprhnsbl](https://github.com/ncmprhnsbl)**
- Rewrote song function, it's now much faster/cleaner.
- [OpenBSD] Fixed used memory usage. **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)**

View File

@@ -44,6 +44,7 @@ Have a look at the wiki, I've updated/added some new pages!<br \>
- [Slackware](#slackware)
- [macOS](#macos)
- [iOS](#ios-1)
- [Android (Termux)](#android-termux)
- [Manual](#manual)
- [Post Install](#post-install)
- [Usage](#usage)
@@ -60,11 +61,10 @@ Have a look at the wiki, I've updated/added some new pages!<br \>
## Screenshots
![Linux](https://ipfs.pics/ipfs/QmRRYwcSRz1FHNx8VQiBixZq3qvBNk487fKGwUNTs7GQjA)
![Windows](https://ipfs.pics/ipfs/Qmf5GpmqnMRhEzC1qoQ2tM4699tEXLManZTs5pz4mWJbCg)
![macOS](https://ipfs.pics/ipfs/QmWA8XX6pFkEuLLcrq5JZBx1KFEUaXanTy1jMxzKVRpwaT)
![bsd](https://ipfs.pics/ipfs/QmSpyCGzSgYnyfbMetKqxy9cU3UFbneS3G8JrbdxkiNLgm)
![bsd](https://ipfs.pics/ipfs/QmeZhs3CwGtM8CSVoorA2d2CqLxRzbJkdD7aYxa4Dixsea)
![Linux](https://u.teknik.io/mhaDi.png)
![Windows](https://u.teknik.io/0WmmV.png)
![macOS](https://u.teknik.io/SGDlj.png)
![Linux](https://u.teknik.io/x6V8U.png)
<!-- }}} -->
@@ -206,6 +206,8 @@ Note: The cydia package installs these dependencies for you.
Note: I recommend installing `termux` from the Play Store or F-Droid. Termux provides you with a fully working Linux environment, doesn't require root acess and includes all dependencies.
Note2: Neofetch is in Termux's official repos.
<!-- }}} -->
@@ -233,6 +235,7 @@ https://github.com/dylanaraps/neofetch/wiki/Following-HEAD
- [Slackware](#slackware)
- [macOS](#mac-os-x)
- [iOS](##ios-1)
- [Android (Termux)](#android-termux)
- [Manual](#manual)
@@ -350,6 +353,11 @@ Download the files from [SlackBuilds](https://slackbuilds.org/repository/14.2/de
2. Install `neofetch` through cydia.
### Android (Termux)
You can install it using `apt install neofetch`
### Manual
1. Download the latest source at https://github.com/dylanaraps/neofetch

19
ascii/distro/blankon Normal file
View File

@@ -0,0 +1,19 @@
"\
${c2} \`./ohdNMMMMNmho+.\` ${c1} .+oo:\`
${c2} -smMMMMMMMMMMMMMMMMmy-\` ${c1}\`yyyyy+
${c2} \`:dMMMMMMMMMMMMMMMMMMMMMMd/\` ${c1}\`yyyyys
${c2} .hMMMMMMMNmhso/++symNMMMMMMMh- ${c1}\`yyyyys
${c2} -mMMMMMMms-\` -omMMMMMMN-${c1}.yyyyys
${c2}.mMMMMMMy. .yMMMMMMm:${c1}yyyyys
${c2}sMMMMMMy \`sMMMMMMh${c1}yyyyys
${c2}NMMMMMN: .NMMMMMN${c1}yyyyys
${c2}MMMMMMm. NMMMMMN${c1}yyyyys
${c2}hMMMMMM+ /MMMMMMN${c1}yyyyys
${c2}:NMMMMMN: :mMMMMMM+${c1}yyyyys
${c2} oMMMMMMNs- .sNMMMMMMs.${c1}yyyyys
${c2} +MMMMMMMNho:.\` \`.:ohNMMMMMMNo ${c1}\`yyyyys
${c2} -hMMMMMMMMNNNmmNNNMMMMMMMMh- ${c1}\`yyyyys
${c2} :yNMMMMMMMMMMMMMMMMMMNy:\` ${c1}\`yyyyys
${c2} .:sdNMMMMMMMMMMNds/. ${c1}\`yyyyyo
${c2} \`.:/++++/:.\` ${c1}:oys+.
"

View File

@@ -1,6 +1,6 @@
"\
${c3} _
(_)
${c3} _
(_)
${c1} | .
${c1} . |L /| . ${c3} _
${c1} _ . |\ _| \--+._/| . ${c3}(_)

View File

@@ -1,21 +1,21 @@
"\
${c1} \`\`
./yhNh
syy/Nshh \`:o/
N:dsNshh █ \`ohNMMd
N-/+Nshh \`yMMMMd
N-yhMshh yMMMMd
N-s:hshh █ yMMMMd so//.
N-oyNsyh yMMMMd d Mms.
N:hohhhd:. yMMMMd syMMM+
Nsyh+-..+y+- yMMMMd :mMM+
+hy- -ss/\`yMMMM \`+d+
:sy/. ./yNMMMMm \`\`
.+ys- \`:+hNMMMMMMy/\`
\`hNmmMMMMMMMMMMMMdo.
dMMMMMMMMMMMMMMMMMNh:
+hMMMMMMMMMMMMMMMMMmy.
-oNMMMMMMMMMMmy+.\`
\`:yNMMMds/.\`
.//\`
${c1} \`\`
./yhNh
syy/Nshh \`:o/
N:dsNshh █ \`ohNMMd
N-/+Nshh \`yMMMMd
N-yhMshh yMMMMd
N-s:hshh █ yMMMMd so//.
N-oyNsyh yMMMMd d Mms.
N:hohhhd:. yMMMMd syMMM+
Nsyh+-..+y+- yMMMMd :mMM+
+hy- -ss/\`yMMMM \`+d+
:sy/. ./yNMMMMm \`\`
.+ys- \`:+hNMMMMMMy/\`
\`hNmmMMMMMMMMMMMMdo.
dMMMMMMMMMMMMMMMMMNh:
+hMMMMMMMMMMMMMMMMMmy.
-oNMMMMMMMMMMmy+.\`
\`:yNMMMds/.\`
.//\`
"

54
config/travis Normal file
View File

@@ -0,0 +1,54 @@
#!/usr/bin/env bash
# vim:fdm=marker
#
# Neofetch config file for travis.ci
# https://github.com/dylanaraps/neofetch
printinfo() {
if [ "$TRAVIS_OS_NAME" ]; then
info linebreak
info linebreak
fi
info title
info underline
info "Model" model
info "OS" distro
info "Kernel" kernel
info "Uptime" uptime
info "Packages" packages
info "Shell" shell
info "Resolution" resolution
info "DE" de
info "WM" wm
info "WM Theme" wmtheme
info "Theme" theme
info "Icons" icons
info "Terminal" term
info "Terminal Font" termfont
info "CPU" cpu
info "GPU" gpu
info "Memory" memory
info "CPU Usage" cpu_usage
info "Disk" disk
info "Battery" battery
info "Font" font
info "Song" song
info "Local IP" localip
info "Public IP" publicip
info "Users" users
info "Birthday" birthday
info linebreak
info cols
info linebreak
}
refresh_rate="on"
shell_version="on"
cpu_display="infobar"
memory_display="infobar"
disk_display="infobar"
cpu_temp="on"

113
neofetch
View File

@@ -524,6 +524,7 @@ getde() {
*)
de="${XDG_CURRENT_DESKTOP/i3}"
de="${de/'X-'}"
de="${de/Budgie:GNOME/Budgie}"
;;
esac
@@ -578,21 +579,20 @@ getwmtheme() {
[ -z "$de" ] && getde
case "$wm" in
'BudgieWM') wmtheme="$(gsettings get org.gnome.desktop.wm.preferences theme)" ;;
'E16') wmtheme="$(awk -F "= " '/theme.name/ {print $2}' "$HOME/.e16/e_config--0.0.cfg")";;
'Sawfish') wmtheme="$(awk -F ")" '/\(quote default-frame-style/ {print $2}' "$HOME/.sawfish/custom")" ;;
"E16") wmtheme="$(awk -F "= " '/theme.name/ {print $2}' "$HOME/.e16/e_config--0.0.cfg")";;
"Sawfish") wmtheme="$(awk -F ")" '/\(quote default-frame-style/ {print $2}' "$HOME/.sawfish/custom")" ;;
'Cinnamon' | 'Muffin' | 'Mutter (Muffin)')
"Cinnamon" | "Muffin" | "Mutter (Muffin)")
detheme="$(gsettings get org.cinnamon.theme name)"
wmtheme="$(gsettings get org.cinnamon.desktop.wm.preferences theme)"
wmtheme="$detheme (${wmtheme})"
;;
'Compiz' | 'Mutter'* | 'GNOME Shell' | 'Gala')
"Compiz" | "Mutter" | "GNOME Shell" | "Gala")
if type -p gsettings >/dev/null 2>&1; then
wmtheme="$(gsettings get org.gnome.shell.extensions.user-theme name)"
[ -z "$wmtheme" ] && \
[ -z "${wmtheme//\'}" ] && \
wmtheme="$(gsettings get org.gnome.desktop.wm.preferences theme)"
elif type -p gconftool-2 >/dev/null 2>&1; then
@@ -600,7 +600,7 @@ getwmtheme() {
fi
;;
'Metacity'*)
"Metacity"*)
if [ "$de" == "Deepin" ]; then
wmtheme="$(gsettings get com.deepin.wrap.gnome.desktop.wm.preferences theme 2>/dev/null)"
@@ -609,7 +609,7 @@ getwmtheme() {
fi
;;
'E17' | 'Enlightenment')
"E17" | "Enlightenment")
if type -p eet >/dev/null 2>&1; then
wmtheme="$(eet -d "$HOME/.e/e/config/standard/e.cfg" config | awk '/value \"file\" string.*.edj/ {print $4}')"
wmtheme="${wmtheme##*/}"
@@ -617,17 +617,17 @@ getwmtheme() {
fi
;;
'Fluxbox')
"Fluxbox")
[ -f "$HOME/.fluxbox/init" ] && \
wmtheme="$(awk -F "/" '/styleFile/ {print $NF}' "$HOME/.fluxbox/init")"
;;
'IceWM'*)
"IceWM"*)
[ -f "$HOME/.icewm/theme" ] && \
wmtheme="$(awk -F "[\",/]" '!/#/ {print $2}' "$HOME/.icewm/theme")"
;;
'Openbox')
"Openbox")
if [ "$de" == "LXDE" ] && [ -f "${HOME}/.config/openbox/lxde-rc.xml" ]; then
ob_file="lxde-rc"
@@ -638,17 +638,17 @@ getwmtheme() {
wmtheme="$(awk -F "[<,>]" '/<theme/ {getline; print $3}' "$XDG_CONFIG_HOME/openbox/${ob_file}.xml")";
;;
'PekWM')
"PekWM")
[ -f "$HOME/.pekwm/config" ] && \
wmtheme="$(awk -F "/" '/Theme/ {gsub(/\"/,""); print $NF}' "$HOME/.pekwm/config")"
;;
'Xfwm4')
"Xfwm4")
[ -f "${HOME}/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml" ] && \
wmtheme="$(xfconf-query -c xfwm4 -p /general/theme)"
;;
'KWin'*)
"KWin"*)
kdeconfigdir
kde_config_dir="${kde_config_dir%/}"
@@ -660,7 +660,7 @@ getwmtheme() {
fi
;;
'Quartz Compositor')
"Quartz Compositor")
wmtheme="$(/usr/libexec/PlistBuddy -c "Print AppleAquaColorVariant" ~/Library/Preferences/.GlobalPreferences.plist)"
if [ -z "$wmtheme" ] || [ "$wmtheme" == "1" ]; then
wmtheme="Blue"
@@ -669,7 +669,7 @@ getwmtheme() {
fi
;;
*'Explorer')
*"Explorer")
path="/proc/registry/HKEY_CURRENT_USER/Software/Microsoft"
path+="/Windows/CurrentVersion/Themes/CurrentTheme"
@@ -678,7 +678,7 @@ getwmtheme() {
wmtheme="${wmtheme%.*}"
;;
'Blackbox' | "bbLean"*)
"Blackbox" | "bbLean"*)
path="$(wmic process get ExecutablePath | grep "blackbox")"
path="${path//'\'/'/'}"
@@ -1073,7 +1073,11 @@ getmemory() {
"NetBSD"*) memtotal="$(($(sysctl -n hw.physmem64) / 1024 / 1024))" ;;
*) memtotal="$(($(sysctl -n hw.physmem) / 1024 / 1024))" ;;
esac
memused="$((memtotal - memfree))"
case "$distro" in
"OpenBSD"*) memused="$(($(vmstat | awk 'END {printf $4}') / 1024))" ;;
*) memused="$((memtotal - memfree))" ;;
esac
;;
"Solaris")
@@ -1331,7 +1335,7 @@ getstyle() {
fi
;;
"Gnome"* | "Unity"* | "Budgie")
"Gnome"* | "Unity"* | "Budgie"*)
if type -p gsettings >/dev/null 2>&1; then
gtk3theme="$(gsettings get org.gnome.desktop.interface "$gsettings")"
gtk2theme="${gtk3theme}"
@@ -1472,8 +1476,8 @@ getterm() {
;;
"Linux")
parent="$(grep -F "PPid:" "/proc/${1:-$PPID}/status")"
name="$(< "/proc/${parent/PPid:[[:space:]]}/comm")"
parent="$(grep -i "PPid:" "/proc/${1:-$PPID}/status")"
name="$(< "/proc/$(trim "${parent/PPid:}")/comm")"
;;
*)
@@ -1516,11 +1520,11 @@ gettermfont() {
;;
"xfce4-terminal")
termfont="$(awk -F '=' '!/^($|\/\/)/ && /FontName/ {printf $2}' "${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc")"
termfont="$(awk -F '=' '/^FontName/ {a=$2} END{print a}' "${XDG_CONFIG_HOME}/xfce4/terminal/terminalrc")"
;;
"termite")
termfont="$(awk -F '= ' '!/^($|#|;)/ && /font/ {printf $2; exit}' "${XDG_CONFIG_HOME}/termite/config")"
termfont="$(awk -F '= ' '/^font/ {a=$2} END{print a}' "${XDG_CONFIG_HOME}/termite/config")"
;;
"mintty")
@@ -1926,6 +1930,9 @@ getascii() {
elif [ -f "/usr/local/share/neofetch/ascii/distro/${ascii/ *}" ]; then
ascii="/usr/local/share/neofetch/ascii/distro/${ascii/ *}"
elif [ -f "/data/data/com.termux/files/usr/share/neofetch/ascii/distro/${ascii/ *}" ]; then
ascii="/data/data/com.termux/files/usr/share/neofetch/ascii/distro/${ascii/ *}"
else
getscriptdir 2>/dev/null
@@ -2047,7 +2054,7 @@ getimage() {
fi
# If $img isn't a file fallback to ascii mode.
if [ ! -f "$img" ] || [ "$term_width" -le 10 ]; then
if [ ! -f "$img" ] || [ -z "$term_width" ] || [ "$term_width" -le 10 ]; then
image="ascii"
getascii
@@ -2302,7 +2309,10 @@ info() {
fi
# If the output is empty, don't print anything
[ -z "$output" ] && return
if [ -z "$output" ]; then
err "Info: Couldn't detect $subtitle"
return
fi
# Trim whitespace
output="$(trim "$output")"
@@ -2348,13 +2358,10 @@ info() {
# Prin {{{
prin() {
string="$1${2:+: $2}"
string="${1//$'\033[0m'}${2:+: $2}"
# If $2 doesn't exist we format $1 as info
if [ -z "$2" ]; then
subtitle_color="$info_color"
bold=
fi
[ -z "$2" ] && local subtitle_color="$info_color"
# Format the output
string="${string/:/${reset}${colon_color}:${info_color}}"
@@ -2406,6 +2413,10 @@ colors() {
setcolors 6 4
;;
"BlankOn"*)
setcolors 1 7
;;
"CentOS"*)
setcolors 3 2 4 5 7
;;
@@ -2708,9 +2719,13 @@ getdefaultconfig() {
elif [ -f "/usr/local/share/neofetch/config" ]; then
default_config="/usr/local/share/neofetch/config"
elif [ -f "/data/data/com.termux/files/usr/share/neofetch/config" ]; then
default_config="/data/data/com.termux/files/usr/share/neofetch/config"
else
getscriptdir
default_config="${script_dir}/config/config"
travis_config="${script_dir}/config/travis"
fi
if source "$default_config"; then
@@ -2730,6 +2745,11 @@ getuserconfig() {
source "$config_file"
err "Config: Sourced user config ($config_file)"
return
elif [ "$config_file" == "travis" ]; then
source "$travis_config"
err "Config: Sourced user config ($travis_config)"
return
fi
mkdir -p "$XDG_CONFIG_HOME/neofetch/"
@@ -2842,7 +2862,7 @@ dynamicprompt() {
# Calculate image height in terminal cells.
if [ "$image" != "ascii" ]; then
gettermpadding
lines="$(((height + ${border:-0} + ${yoffset:-0}) / font_height))"
lines="$(((height + (${border:-0} * 2) + ${yoffset:-0}) / font_height))"
else
lines="$((lines-=2))"
fi
@@ -3004,8 +3024,6 @@ usage() { cat << EOF
--config none Launch the script without a config file
--help Print this text and exit
--version Show neofetch version
--test Launch the script with all functions / options enabled.
This should only be used for testing purposes, ie Travis.CI.
-v Display error messages.
-vv Display a verbose log for error reporting.
@@ -3174,37 +3192,10 @@ getargs() {
*) config_file="$2"; config="on"; getuserconfig 2>/dev/null ;;
esac
;;
--test)
info=(title underline model distro kernel uptime packages shell resolution de wm wmtheme theme icons cpu cpu_usage gpu memory font disk battery song localip publicip users birthday term termfont)
refresh_rate="on"
shell_version="on"
cpu_display="infobar"
memory_display="infobar"
disk_display="infobar"
cpu_temp="on"
printinfo() {
if [ "$TRAVIS_OS_NAME" ]; then
info linebreak
info linebreak
fi
for func in "${info[@]}"; do
info "$(tr '[:lower:]' '[:upper:]' <<< "$func")" "$func"
done
info linebreak
info cols
info linebreak
printf "%b%s" "\033[$(tput lines)H"
}
;;
-v) verbose="on" ;;
-vv) set -x; verbose="on" ;;
--help) usage ;;
--version) printf "%s\n" "Neofetch 1.9"; exit ;;
--version) printf "%s\n" "Neofetch 1.9.1"; exit ;;
esac
shift

View File

@@ -1,4 +1,4 @@
.TH NEOFETCH "1" "June 2016" "1.8" "User Commands"
.TH NEOFETCH "1" "November 2016" "1.9.1" "User Commands"
.SH NAME
neofetch \- simple system information script