mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-04 09:08:38 +00:00
Compare commits
50 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
564b0f889e | ||
|
816931d652 | ||
|
8d7322afc3 | ||
|
040a73be08 | ||
|
30ab0c7cb6 | ||
|
e912d35b34 | ||
|
5585eaa8b8 | ||
|
971616f0c4 | ||
|
4cea604b86 | ||
|
99f60211de | ||
|
c02a77ea69 | ||
|
af7e8c13ce | ||
|
3a0c82ebc5 | ||
|
2b3940adb9 | ||
|
d2e82bc245 | ||
|
c1b35131d5 | ||
|
7ebd6dacba | ||
|
2c20ec3a16 | ||
|
bd0dd91973 | ||
|
39371e7f05 | ||
|
ba4b541167 | ||
|
5cede165cf | ||
|
60a0c6a32a | ||
|
e8ab7ea88d | ||
|
7cffacad51 | ||
|
a75b79bd8e | ||
|
2705f23248 | ||
|
0c28f8c3f6 | ||
|
35b532dff8 | ||
|
8dc20896c6 | ||
|
a6949ffa91 | ||
|
a687096bc2 | ||
|
5c1d5fec76 | ||
|
ebf5f6345a | ||
|
651d38c949 | ||
|
6853144380 | ||
|
a44b757599 | ||
|
1505ed5d68 | ||
|
33d5009ba3 | ||
|
35e461f3c7 | ||
|
af98285ea0 | ||
|
013e9d6652 | ||
|
453a38d79f | ||
|
7b2dcea117 | ||
|
462d4c594a | ||
|
00f22df3c8 | ||
|
6ada4c7fb8 | ||
|
e0e0c3243c | ||
|
260253d366 | ||
|
a37a3eec31 |
@@ -10,6 +10,4 @@ before_install:
|
|||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install screenresolution; fi
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install screenresolution; fi
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then PREFIX=/usr/local make install ; fi
|
- time ./neofetch --ascii --config travis --ascii_distro travis -v
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo make install ; fi
|
|
||||||
- time neofetch --ascii --config off --ascii_distro travis -v --test
|
|
||||||
|
173
Changelog.md
173
Changelog.md
@@ -1,173 +1,68 @@
|
|||||||
## Contributors
|
## Contributors
|
||||||
|
|
||||||
- **[@konimex](https://github.com/konimex)**
|
- **[@konimex](https://github.com/konimex)**
|
||||||
- **[@iandrewt](https://github.com/iandrewt)**
|
- **[@fornwall](https://github.com/fornwall)**
|
||||||
- **[@coypoop](https://github.com/coypoop)**
|
- **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)**
|
||||||
- **[@ncmprhnsbl](https://github.com/ncmprhnsbl)**
|
|
||||||
- **[@koreacomputercenter](https://github.com/koreacomputercenter)**
|
## Packages
|
||||||
|
|
||||||
|
- Neofetch is now in Termux`s repos.
|
||||||
|
|
||||||
|
|
||||||
## General
|
## General
|
||||||
|
|
||||||
- Added new function called `checkoldflags` which informs users about deprecated config options.
|
- [Cursor Position] Fix cursor position in URxvt when using terminal padding.
|
||||||
- Change all `OS X` references to `macOS`. **[@iandrewt](https://github.com/iandrewt)**
|
- [Termux] Fix default ascii location. **[@konimex](https://github.com/konimex)**
|
||||||
- Fix corrupted text when long lines are cut-off.
|
- [Termux] Fix default config location. **[@fornwall](https://github.com/fornwall)**
|
||||||
- Don't dynamically place prompt in `image=off` mode.
|
- If a function fails to detect info, let the user know in verbose mode. (`-v`)
|
||||||
- Cursor Position: Fix issues when using URxvt+Padding
|
- Removed `--test` in favor of a separate config file. Travis.ci now uses `neofetch --config travis` instead of a hacked together arg.
|
||||||
|
|
||||||
|
|
||||||
## Operating System
|
## Operating System
|
||||||
|
|
||||||

|
- Added support for BlankOn Linux.
|
||||||
|
|
||||||
- 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.
|
|
||||||
|
|
||||||
|
|
||||||
## Images
|
## Images
|
||||||
|
|
||||||
**Fixed rendering issues in URxvt when using an XFT font.**
|
- Fix division by 0 error.
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
|
|
||||||
## Ascii
|
## Ascii
|
||||||
|
|
||||||
- Bold ascii art by default.
|
- [Tails] Update ascii art.
|
||||||
- Fixed incorrect prompt location when using `ascii_logo_size small`.
|
- [OpenBSD] Made ascii art thinner
|
||||||
- Fixed incorrect colors used on light terminals.
|
|
||||||
- Update Void Linux ascii art. **[@ncmprhnsbl](https://github.com/ncmprhnsbl)**
|
|
||||||
- Update Solus ascii art.
|
|
||||||
|
|
||||||
|
|
||||||
## Info
|
## Info
|
||||||
|
|
||||||
**Distro**<br \>
|
**Prin**<br \>
|
||||||
|
|
||||||
- Expanded `distro_shorthand` to macOS, BSD and Solaris. **[@konimex](https://github.com/konimex)**
|
- Fix color breakage.
|
||||||
- Removed `osx_buildversion` and `osx_codename` in favour of `distro_shorthand`. **[@konimex](https://github.com/konimex)**
|
- Fix bold not working.
|
||||||
|
|
||||||
**Desktop Environment**<br \>
|
|
||||||
|
|
||||||
- [Windows] Added support for showing DE.
|
**Terminal**<br \>
|
||||||
- Windows 8 and above: `Modern UI/Metro`
|
|
||||||
- Windows 7 and below: `Aero`
|
|
||||||
|
|
||||||
**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 \>
|
**Window Manager Theme**<br \>
|
||||||
|
|
||||||
- [Windows] Added support for Blackbox themes.
|
- [Budgie (Mutter)] Don't print WM Theme.
|
||||||
|
|
||||||
**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)**
|
|
||||||
|
|
||||||
**Memory**<br \>
|
**Memory**<br \>
|
||||||
|
|
||||||
- [Linux] Correctly calculate used memory.
|
- [OpenBSD] Fixed used memory usage. **[@Head-on-a-Stick](https://github.com/Head-on-a-Stick)**
|
||||||
- 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.
|
|
||||||
|
18
README.md
18
README.md
@@ -44,6 +44,7 @@ Have a look at the wiki, I've updated/added some new pages!<br \>
|
|||||||
- [Slackware](#slackware)
|
- [Slackware](#slackware)
|
||||||
- [macOS](#macos)
|
- [macOS](#macos)
|
||||||
- [iOS](#ios-1)
|
- [iOS](#ios-1)
|
||||||
|
- [Android (Termux)](#android-termux)
|
||||||
- [Manual](#manual)
|
- [Manual](#manual)
|
||||||
- [Post Install](#post-install)
|
- [Post Install](#post-install)
|
||||||
- [Usage](#usage)
|
- [Usage](#usage)
|
||||||
@@ -60,11 +61,10 @@ Have a look at the wiki, I've updated/added some new pages!<br \>
|
|||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
<!-- }}} -->
|
<!-- }}} -->
|
||||||
@@ -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.
|
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)
|
- [Slackware](#slackware)
|
||||||
- [macOS](#mac-os-x)
|
- [macOS](#mac-os-x)
|
||||||
- [iOS](##ios-1)
|
- [iOS](##ios-1)
|
||||||
|
- [Android (Termux)](#android-termux)
|
||||||
- [Manual](#manual)
|
- [Manual](#manual)
|
||||||
|
|
||||||
|
|
||||||
@@ -350,6 +353,11 @@ Download the files from [SlackBuilds](https://slackbuilds.org/repository/14.2/de
|
|||||||
2. Install `neofetch` through cydia.
|
2. Install `neofetch` through cydia.
|
||||||
|
|
||||||
|
|
||||||
|
### Android (Termux)
|
||||||
|
|
||||||
|
You can install it using `apt install neofetch`
|
||||||
|
|
||||||
|
|
||||||
### Manual
|
### Manual
|
||||||
|
|
||||||
1. Download the latest source at https://github.com/dylanaraps/neofetch
|
1. Download the latest source at https://github.com/dylanaraps/neofetch
|
||||||
|
19
ascii/distro/blankon
Normal file
19
ascii/distro/blankon
Normal 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+.
|
||||||
|
"
|
@@ -1,6 +1,6 @@
|
|||||||
"\
|
"\
|
||||||
${c3} _
|
${c3} _
|
||||||
(_)
|
(_)
|
||||||
${c1} | .
|
${c1} | .
|
||||||
${c1} . |L /| . ${c3} _
|
${c1} . |L /| . ${c3} _
|
||||||
${c1} _ . |\ _| \--+._/| . ${c3}(_)
|
${c1} _ . |\ _| \--+._/| . ${c3}(_)
|
||||||
|
@@ -1,21 +1,21 @@
|
|||||||
"\
|
"\
|
||||||
${c1} \`\`
|
${c1} \`\`
|
||||||
./yhNh
|
./yhNh
|
||||||
syy/Nshh \`:o/
|
syy/Nshh \`:o/
|
||||||
N:dsNshh █ \`ohNMMd
|
N:dsNshh █ \`ohNMMd
|
||||||
N-/+Nshh \`yMMMMd
|
N-/+Nshh \`yMMMMd
|
||||||
N-yhMshh yMMMMd
|
N-yhMshh yMMMMd
|
||||||
N-s:hshh █ yMMMMd so//.
|
N-s:hshh █ yMMMMd so//.
|
||||||
N-oyNsyh yMMMMd d Mms.
|
N-oyNsyh yMMMMd d Mms.
|
||||||
N:hohhhd:. yMMMMd syMMM+
|
N:hohhhd:. yMMMMd syMMM+
|
||||||
Nsyh+-..+y+- yMMMMd :mMM+
|
Nsyh+-..+y+- yMMMMd :mMM+
|
||||||
+hy- -ss/\`yMMMM \`+d+
|
+hy- -ss/\`yMMMM \`+d+
|
||||||
:sy/. ./yNMMMMm \`\`
|
:sy/. ./yNMMMMm \`\`
|
||||||
.+ys- \`:+hNMMMMMMy/\`
|
.+ys- \`:+hNMMMMMMy/\`
|
||||||
\`hNmmMMMMMMMMMMMMdo.
|
\`hNmmMMMMMMMMMMMMdo.
|
||||||
dMMMMMMMMMMMMMMMMMNh:
|
dMMMMMMMMMMMMMMMMMNh:
|
||||||
+hMMMMMMMMMMMMMMMMMmy.
|
+hMMMMMMMMMMMMMMMMMmy.
|
||||||
-oNMMMMMMMMMMmy+.\`
|
-oNMMMMMMMMMMmy+.\`
|
||||||
\`:yNMMMds/.\`
|
\`:yNMMMds/.\`
|
||||||
.//\`
|
.//\`
|
||||||
"
|
"
|
||||||
|
54
config/travis
Normal file
54
config/travis
Normal 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
113
neofetch
@@ -524,6 +524,7 @@ getde() {
|
|||||||
*)
|
*)
|
||||||
de="${XDG_CURRENT_DESKTOP/i3}"
|
de="${XDG_CURRENT_DESKTOP/i3}"
|
||||||
de="${de/'X-'}"
|
de="${de/'X-'}"
|
||||||
|
de="${de/Budgie:GNOME/Budgie}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@@ -578,21 +579,20 @@ getwmtheme() {
|
|||||||
[ -z "$de" ] && getde
|
[ -z "$de" ] && getde
|
||||||
|
|
||||||
case "$wm" in
|
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")";;
|
||||||
'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")" ;;
|
||||||
'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)"
|
detheme="$(gsettings get org.cinnamon.theme name)"
|
||||||
wmtheme="$(gsettings get org.cinnamon.desktop.wm.preferences theme)"
|
wmtheme="$(gsettings get org.cinnamon.desktop.wm.preferences theme)"
|
||||||
wmtheme="$detheme (${wmtheme})"
|
wmtheme="$detheme (${wmtheme})"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'Compiz' | 'Mutter'* | 'GNOME Shell' | 'Gala')
|
"Compiz" | "Mutter" | "GNOME Shell" | "Gala")
|
||||||
if type -p gsettings >/dev/null 2>&1; then
|
if type -p gsettings >/dev/null 2>&1; then
|
||||||
wmtheme="$(gsettings get org.gnome.shell.extensions.user-theme name)"
|
wmtheme="$(gsettings get org.gnome.shell.extensions.user-theme name)"
|
||||||
|
|
||||||
[ -z "$wmtheme" ] && \
|
[ -z "${wmtheme//\'}" ] && \
|
||||||
wmtheme="$(gsettings get org.gnome.desktop.wm.preferences theme)"
|
wmtheme="$(gsettings get org.gnome.desktop.wm.preferences theme)"
|
||||||
|
|
||||||
elif type -p gconftool-2 >/dev/null 2>&1; then
|
elif type -p gconftool-2 >/dev/null 2>&1; then
|
||||||
@@ -600,7 +600,7 @@ getwmtheme() {
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'Metacity'*)
|
"Metacity"*)
|
||||||
if [ "$de" == "Deepin" ]; then
|
if [ "$de" == "Deepin" ]; then
|
||||||
wmtheme="$(gsettings get com.deepin.wrap.gnome.desktop.wm.preferences theme 2>/dev/null)"
|
wmtheme="$(gsettings get com.deepin.wrap.gnome.desktop.wm.preferences theme 2>/dev/null)"
|
||||||
|
|
||||||
@@ -609,7 +609,7 @@ getwmtheme() {
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'E17' | 'Enlightenment')
|
"E17" | "Enlightenment")
|
||||||
if type -p eet >/dev/null 2>&1; then
|
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="$(eet -d "$HOME/.e/e/config/standard/e.cfg" config | awk '/value \"file\" string.*.edj/ {print $4}')"
|
||||||
wmtheme="${wmtheme##*/}"
|
wmtheme="${wmtheme##*/}"
|
||||||
@@ -617,17 +617,17 @@ getwmtheme() {
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'Fluxbox')
|
"Fluxbox")
|
||||||
[ -f "$HOME/.fluxbox/init" ] && \
|
[ -f "$HOME/.fluxbox/init" ] && \
|
||||||
wmtheme="$(awk -F "/" '/styleFile/ {print $NF}' "$HOME/.fluxbox/init")"
|
wmtheme="$(awk -F "/" '/styleFile/ {print $NF}' "$HOME/.fluxbox/init")"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'IceWM'*)
|
"IceWM"*)
|
||||||
[ -f "$HOME/.icewm/theme" ] && \
|
[ -f "$HOME/.icewm/theme" ] && \
|
||||||
wmtheme="$(awk -F "[\",/]" '!/#/ {print $2}' "$HOME/.icewm/theme")"
|
wmtheme="$(awk -F "[\",/]" '!/#/ {print $2}' "$HOME/.icewm/theme")"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'Openbox')
|
"Openbox")
|
||||||
if [ "$de" == "LXDE" ] && [ -f "${HOME}/.config/openbox/lxde-rc.xml" ]; then
|
if [ "$de" == "LXDE" ] && [ -f "${HOME}/.config/openbox/lxde-rc.xml" ]; then
|
||||||
ob_file="lxde-rc"
|
ob_file="lxde-rc"
|
||||||
|
|
||||||
@@ -638,17 +638,17 @@ getwmtheme() {
|
|||||||
wmtheme="$(awk -F "[<,>]" '/<theme/ {getline; print $3}' "$XDG_CONFIG_HOME/openbox/${ob_file}.xml")";
|
wmtheme="$(awk -F "[<,>]" '/<theme/ {getline; print $3}' "$XDG_CONFIG_HOME/openbox/${ob_file}.xml")";
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'PekWM')
|
"PekWM")
|
||||||
[ -f "$HOME/.pekwm/config" ] && \
|
[ -f "$HOME/.pekwm/config" ] && \
|
||||||
wmtheme="$(awk -F "/" '/Theme/ {gsub(/\"/,""); print $NF}' "$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" ] && \
|
[ -f "${HOME}/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml" ] && \
|
||||||
wmtheme="$(xfconf-query -c xfwm4 -p /general/theme)"
|
wmtheme="$(xfconf-query -c xfwm4 -p /general/theme)"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'KWin'*)
|
"KWin"*)
|
||||||
kdeconfigdir
|
kdeconfigdir
|
||||||
kde_config_dir="${kde_config_dir%/}"
|
kde_config_dir="${kde_config_dir%/}"
|
||||||
|
|
||||||
@@ -660,7 +660,7 @@ getwmtheme() {
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'Quartz Compositor')
|
"Quartz Compositor")
|
||||||
wmtheme="$(/usr/libexec/PlistBuddy -c "Print AppleAquaColorVariant" ~/Library/Preferences/.GlobalPreferences.plist)"
|
wmtheme="$(/usr/libexec/PlistBuddy -c "Print AppleAquaColorVariant" ~/Library/Preferences/.GlobalPreferences.plist)"
|
||||||
if [ -z "$wmtheme" ] || [ "$wmtheme" == "1" ]; then
|
if [ -z "$wmtheme" ] || [ "$wmtheme" == "1" ]; then
|
||||||
wmtheme="Blue"
|
wmtheme="Blue"
|
||||||
@@ -669,7 +669,7 @@ getwmtheme() {
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*'Explorer')
|
*"Explorer")
|
||||||
path="/proc/registry/HKEY_CURRENT_USER/Software/Microsoft"
|
path="/proc/registry/HKEY_CURRENT_USER/Software/Microsoft"
|
||||||
path+="/Windows/CurrentVersion/Themes/CurrentTheme"
|
path+="/Windows/CurrentVersion/Themes/CurrentTheme"
|
||||||
|
|
||||||
@@ -678,7 +678,7 @@ getwmtheme() {
|
|||||||
wmtheme="${wmtheme%.*}"
|
wmtheme="${wmtheme%.*}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'Blackbox' | "bbLean"*)
|
"Blackbox" | "bbLean"*)
|
||||||
path="$(wmic process get ExecutablePath | grep "blackbox")"
|
path="$(wmic process get ExecutablePath | grep "blackbox")"
|
||||||
path="${path//'\'/'/'}"
|
path="${path//'\'/'/'}"
|
||||||
|
|
||||||
@@ -1073,7 +1073,11 @@ getmemory() {
|
|||||||
"NetBSD"*) memtotal="$(($(sysctl -n hw.physmem64) / 1024 / 1024))" ;;
|
"NetBSD"*) memtotal="$(($(sysctl -n hw.physmem64) / 1024 / 1024))" ;;
|
||||||
*) memtotal="$(($(sysctl -n hw.physmem) / 1024 / 1024))" ;;
|
*) memtotal="$(($(sysctl -n hw.physmem) / 1024 / 1024))" ;;
|
||||||
esac
|
esac
|
||||||
memused="$((memtotal - memfree))"
|
|
||||||
|
case "$distro" in
|
||||||
|
"OpenBSD"*) memused="$(($(vmstat | awk 'END {printf $4}') / 1024))" ;;
|
||||||
|
*) memused="$((memtotal - memfree))" ;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Solaris")
|
"Solaris")
|
||||||
@@ -1331,7 +1335,7 @@ getstyle() {
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Gnome"* | "Unity"* | "Budgie")
|
"Gnome"* | "Unity"* | "Budgie"*)
|
||||||
if type -p gsettings >/dev/null 2>&1; then
|
if type -p gsettings >/dev/null 2>&1; then
|
||||||
gtk3theme="$(gsettings get org.gnome.desktop.interface "$gsettings")"
|
gtk3theme="$(gsettings get org.gnome.desktop.interface "$gsettings")"
|
||||||
gtk2theme="${gtk3theme}"
|
gtk2theme="${gtk3theme}"
|
||||||
@@ -1472,8 +1476,8 @@ getterm() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
"Linux")
|
"Linux")
|
||||||
parent="$(grep -F "PPid:" "/proc/${1:-$PPID}/status")"
|
parent="$(grep -i "PPid:" "/proc/${1:-$PPID}/status")"
|
||||||
name="$(< "/proc/${parent/PPid:[[:space:]]}/comm")"
|
name="$(< "/proc/$(trim "${parent/PPid:}")/comm")"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
@@ -1516,11 +1520,11 @@ gettermfont() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
"xfce4-terminal")
|
"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")
|
"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")
|
"mintty")
|
||||||
@@ -1926,6 +1930,9 @@ getascii() {
|
|||||||
elif [ -f "/usr/local/share/neofetch/ascii/distro/${ascii/ *}" ]; then
|
elif [ -f "/usr/local/share/neofetch/ascii/distro/${ascii/ *}" ]; then
|
||||||
ascii="/usr/local/share/neofetch/ascii/distro/${ascii/ *}"
|
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
|
else
|
||||||
getscriptdir 2>/dev/null
|
getscriptdir 2>/dev/null
|
||||||
|
|
||||||
@@ -2047,7 +2054,7 @@ getimage() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# If $img isn't a file fallback to ascii mode.
|
# 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"
|
image="ascii"
|
||||||
getascii
|
getascii
|
||||||
|
|
||||||
@@ -2302,7 +2309,10 @@ info() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# If the output is empty, don't print anything
|
# 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
|
# Trim whitespace
|
||||||
output="$(trim "$output")"
|
output="$(trim "$output")"
|
||||||
@@ -2348,13 +2358,10 @@ info() {
|
|||||||
# Prin {{{
|
# Prin {{{
|
||||||
|
|
||||||
prin() {
|
prin() {
|
||||||
string="$1${2:+: $2}"
|
string="${1//$'\033[0m'}${2:+: $2}"
|
||||||
|
|
||||||
# If $2 doesn't exist we format $1 as info
|
# If $2 doesn't exist we format $1 as info
|
||||||
if [ -z "$2" ]; then
|
[ -z "$2" ] && local subtitle_color="$info_color"
|
||||||
subtitle_color="$info_color"
|
|
||||||
bold=
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Format the output
|
# Format the output
|
||||||
string="${string/:/${reset}${colon_color}:${info_color}}"
|
string="${string/:/${reset}${colon_color}:${info_color}}"
|
||||||
@@ -2406,6 +2413,10 @@ colors() {
|
|||||||
setcolors 6 4
|
setcolors 6 4
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"BlankOn"*)
|
||||||
|
setcolors 1 7
|
||||||
|
;;
|
||||||
|
|
||||||
"CentOS"*)
|
"CentOS"*)
|
||||||
setcolors 3 2 4 5 7
|
setcolors 3 2 4 5 7
|
||||||
;;
|
;;
|
||||||
@@ -2708,9 +2719,13 @@ getdefaultconfig() {
|
|||||||
elif [ -f "/usr/local/share/neofetch/config" ]; then
|
elif [ -f "/usr/local/share/neofetch/config" ]; then
|
||||||
default_config="/usr/local/share/neofetch/config"
|
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
|
else
|
||||||
getscriptdir
|
getscriptdir
|
||||||
default_config="${script_dir}/config/config"
|
default_config="${script_dir}/config/config"
|
||||||
|
travis_config="${script_dir}/config/travis"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if source "$default_config"; then
|
if source "$default_config"; then
|
||||||
@@ -2730,6 +2745,11 @@ getuserconfig() {
|
|||||||
source "$config_file"
|
source "$config_file"
|
||||||
err "Config: Sourced user config ($config_file)"
|
err "Config: Sourced user config ($config_file)"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
elif [ "$config_file" == "travis" ]; then
|
||||||
|
source "$travis_config"
|
||||||
|
err "Config: Sourced user config ($travis_config)"
|
||||||
|
return
|
||||||
fi
|
fi
|
||||||
mkdir -p "$XDG_CONFIG_HOME/neofetch/"
|
mkdir -p "$XDG_CONFIG_HOME/neofetch/"
|
||||||
|
|
||||||
@@ -2842,7 +2862,7 @@ dynamicprompt() {
|
|||||||
# Calculate image height in terminal cells.
|
# Calculate image height in terminal cells.
|
||||||
if [ "$image" != "ascii" ]; then
|
if [ "$image" != "ascii" ]; then
|
||||||
gettermpadding
|
gettermpadding
|
||||||
lines="$(((height + ${border:-0} + ${yoffset:-0}) / font_height))"
|
lines="$(((height + (${border:-0} * 2) + ${yoffset:-0}) / font_height))"
|
||||||
else
|
else
|
||||||
lines="$((lines-=2))"
|
lines="$((lines-=2))"
|
||||||
fi
|
fi
|
||||||
@@ -3004,8 +3024,6 @@ usage() { cat << EOF
|
|||||||
--config none Launch the script without a config file
|
--config none Launch the script without a config file
|
||||||
--help Print this text and exit
|
--help Print this text and exit
|
||||||
--version Show neofetch version
|
--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.
|
-v Display error messages.
|
||||||
-vv Display a verbose log for error reporting.
|
-vv Display a verbose log for error reporting.
|
||||||
|
|
||||||
@@ -3174,37 +3192,10 @@ getargs() {
|
|||||||
*) config_file="$2"; config="on"; getuserconfig 2>/dev/null ;;
|
*) config_file="$2"; config="on"; getuserconfig 2>/dev/null ;;
|
||||||
esac
|
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" ;;
|
-v) verbose="on" ;;
|
||||||
-vv) set -x; verbose="on" ;;
|
-vv) set -x; verbose="on" ;;
|
||||||
--help) usage ;;
|
--help) usage ;;
|
||||||
--version) printf "%s\n" "Neofetch 1.9"; exit ;;
|
--version) printf "%s\n" "Neofetch 1.9.1"; exit ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
shift
|
shift
|
||||||
|
@@ -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
|
.SH NAME
|
||||||
neofetch \- simple system information script
|
neofetch \- simple system information script
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user