Fixed merge conflicts

This commit is contained in:
Dylan 2016-03-13 08:55:35 +11:00
commit 80e91fdaa5
9 changed files with 529 additions and 76 deletions

37
1.5.md Normal file
View file

@ -0,0 +1,37 @@
# Neofetch 1.5
- Changed default gap size to `2`.
- Fixed bug where `i3` would show up as both a DE and a WM.
### OS
- Added support for `SteamOS`.
### Packages
- Neofetch is now packaged for `Fedora` and `Fedora` based distros. Thanks **[@konimex](https://github.com/konimex)**.
- Added installation instructions for RHEL and CentOS. Thanks **[@konimex](https://github.com/konimex)**.
- Added stable package to the AUR. **[neofetch](https://aur.archlinux.org/packages/neofetch/)**
### Info
**Disk Usage**<br \>
- Only display usage of local disks.
**CPU**<br \>
- Add `cpu_shorthand` to shorten the output of CPU. Thanks **[@iandrewt](https://github.com/iandrewt)**
- Takes these values: `name`, `speed`, `tiny`, `on`, `off`
**GPU**<br \>
- Added new `tiny` option to `gpu_shorthand` to further shorten the GPU output. Thanks **[@iandrewt](https://github.com/iandrewt)**
**Birthday**<br \>
- Fixed the birthday function on OS X, it apparently wasn't working from the start. Thanks **[@iandrewt](https://github.com/iandrewt)**
**Song**<br \>
- [ OSX ] Added Spotify support to song. Thanks **[@iandrewt](https://github.com/iandrewt)**
- [ OSX ] Added Itunes support to song. Thanks **[@iandrewt](https://github.com/iandrewt)**
### Ascii
- Kaos: Update ascii logo to the new logo.

View file

@ -10,12 +10,15 @@ all:
install:
$(INSTALL_DIR) $(DESTDIR)$(PREFIX)/bin
$(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/neofetch/ascii/distro
$(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/man/man1
$(INSTALL_PROG) neofetch $(DESTDIR)$(PREFIX)/bin/neofetch
$(INSTALL_FILE) neofetch.1 $(DESTDIR)$(PREFIX)/share/man/man1/neofetch.1
$(INSTALL_PROG) config/config $(DESTDIR)$(PREFIX)/share/neofetch/config
$(INSTALL_PROG) ascii/distro/* $(DESTDIR)$(PREFIX)/share/neofetch/ascii/distro
uninstall:
$(RM) $(DESTDIR)$(PREFIX)/bin/neofetch
$(RM) $(DESTDIR)$(PREFIX)/share/man/man1/neofetch.1
$(RM) -r $(DESTDIR)$(PREFIX)/share/neofetch

View file

@ -18,6 +18,14 @@ your distro's logo or any ascii art of your choice!
- [Features](#features)
- [Dependencies](#dependencies)
- [Installation](#installation)
- [Arch Linux](#arch)
- [Gentoo / Funtoo](#gentoo--funtoo)
- [CRUX](#crux)
- [Debian / Ubuntu](#debian--ubuntu)
- [Fedora](#fedora)
- [RHEL / CentOS](#rhel--centos)
- [Mac OS X](#mac-os-x)
- [Others](#others)
- [Post Install](#post-install)
- [Usage](#usage)
- [Frequently Asked Questions](#frequently-asked-questions)
@ -66,6 +74,7 @@ your distro's logo or any ascii art of your choice!
### Required dependencies:
- `Bash 3.0+`
- Alpine Linux: You also need `ncurses`.
- `xprop` \[1\]
- `procps-ng`
- Not required on OS X
@ -112,9 +121,19 @@ how you can workaround them.
https://github.com/dylanaraps/neofetch/wiki/Following-HEAD
- [Arch Linux](#arch)
- [Gentoo / Funtoo](#gentoo--funtoo)
- [CRUX](#crux)
- [Debian / Ubuntu](#debian--ubuntu)
- [Fedora](#fedora)
- [RHEL / CentOS](#rhel--centos)
- [Mac OS X](#mac-os-x)
- [Others](#others)
### Arch
1. Install **[neofetch-git](https://aur.archlinux.org/packages/neofetch-git/)** from the aur.
1. Install **[neofetch](https://aur.archlinux.org/packages/neofetch/)** or **[neofetch-git](https://aur.archlinux.org/packages/neofetch-git/)** from the aur.
### Gentoo / Funtoo
@ -134,12 +153,13 @@ https://github.com/dylanaraps/neofetch/wiki/Following-HEAD
1. Install git and the git ports(8) driver
- `sudo prt-get depinst git`
2. Add the 3rd party repo
- `sudo wget -O /etc/ports/arcetera.git https://git.io/vgNJ6`
- `sudo wget -O /etc/ports/arcetera.git https://arcetera.moe/sync`
3. Sync the repos
- `sudo ports -u`
4. Install the package
- `sudo prt-get depinst neofetch`
### Debian / Ubuntu
1. Add the 3rd party repo
@ -152,6 +172,28 @@ https://github.com/dylanaraps/neofetch/wiki/Following-HEAD
- `sudo apt-get install neofetch`
### Fedora
1. Make sure you have installed `dnf-plugins-core`
- `sudo dnf install dnf-plugins-core`
2. Enable COPR repository
- `sudo dnf copr enable konimex/neofetch`
3. Install the package
- `sudo dnf install neofetch`
### RHEL / CentOS
1. Change your working directory to `/etc/yum.repos.d`
- `cd /etc/yum.repos.d`
2. Fetch the repo file
- `wget https://copr.fedorainfracloud.org/coprs/konimex/neofetch/repo/epel-7/konimex-neofetch-epel-7.repo`
3. Install the package
- `sudo yum install neofetch`
### Mac OS X
1. Install `neofetch` with Homebrew
- `brew install neofetch`
### Others
1. Download the latest source at https://github.com/dylanaraps/neofetch
@ -247,9 +289,11 @@ alias fetch2="fetch \
Possible values: current, min, max, bios,
scaling_current, scaling_min, scaling_max
NOTE: This only support Linux with cpufreq.
--cpu_shorthand type Shorten the output of CPU
Possible values: name, speed, tiny, on, off
--kernel_shorthand on/off Shorten the output of kernel
--uptime_shorthand on/off Shorten the output of uptime (tiny, on, off)
--gpu_shorthand on/off Shorten the output of GPU
--gpu_shorthand on/off Shorten the output of GPU (tiny, on, off)
--gtk_shorthand on/off Shorten output of gtk theme/icons
--gtk2 on/off Enable/Disable gtk2 theme/icons output
--gtk3 on/off Enable/Disable gtk3 theme/icons output
@ -261,13 +305,13 @@ alias fetch2="fetch \
--song_shorthand on/off Print the Artist/Title on seperate lines
--birthday_shorthand on/off Shorten the output of birthday
--birthday_time on/off Enable/Disable showing the time in birthday output
--birthday_format format Format the birthday output. (Uses 'date' cmd format)
Text Colors:
--colors x x x x x x Changes the text colors in this order:
title, @, underline, subtitle, colon, info
Text Formatting:
--underline_char char Character to use when underlineing title
--colors x x x x x x Changes the text colors in this order:
title, @, underline, subtitle, colon, info
--underline_char char Character to use when underlining title
--line_wrap on/off Enable/Disable line wrapping
--bold on/off Enable/Disable bold text
--prompt_height num Set this to your prompt height to fix issues with
@ -323,7 +367,7 @@ alias fetch2="fetch \
Ascii:
--ascii value Where to get the ascii from, Possible values:
distro, /path/to/ascii
--ascii_color num Color to print the ascii art
--ascii_colors x x x x x x Colors to print the ascii art
--ascii_distro distro Which Distro\'s ascii art to print
@ -331,9 +375,7 @@ alias fetch2="fetch \
--stdout info info Launch fetch in stdout mode which prints the info
in a plain-text format that you can use with
lemonbar etc.
--stdout_title on/off Hide/Show the title in stdout mode.
--stdout_separator string String to use as a separator in stdout mode.
--stdout_subtitles on/off Hide/Show the subtitles in stdout mode.
Screenshot:
@ -358,11 +400,11 @@ alias fetch2="fetch \
#### How do I enable screenfetch mode?
Launching the script with `--ascii distro` or setting `ascii="distro"` and `image="ascii"` <br \>
Launching the script with `--ascii` or setting `ascii="distro"` and `image="ascii"` <br \>
inside the config file will launch the script in "screenfetch mode". The script will<br \>
display your distro's ascii next to the info, exactly like screenfetch.
**NOTE:** If you don't have `w3m-img` or `imagemagick` installed screenfetch mode will be<br \>
**NOTE:** If you **don't** have `w3m-img` or `imagemagick` installed screenfetch mode will be<br \>
used automatically
![arch](http://i.imgur.com/uCMjgf6.png)
@ -454,7 +496,7 @@ Thanks to:
- [Screenfetch](https://github.com/KittyKatt/screenFetch):
- I've used some snippets as a base for a few functions in this script.
- I've used the ascii art from here.
- Most of the ascii art.
- [ufetch](https://github.com/jschx/ufetch): Tiny ascii logos
- [@metakirby5](https://github.com/metakirby5): Providing great feedback as well as ideas for the script.
- [@jrgz](https://github.com/jrgz): Helping me test the Mac OS X version.

19
ascii/distro/alpine Normal file
View file

@ -0,0 +1,19 @@
"\
${c1} \`---------------------\`
\`-----------------------\`
.-------------------------.
.---------------------------.
\`-----------..------------------\`
\`----------.\` \`.----\`\`-----------\`
---------.\` \`.. \`.---------
-------.\` \`..\` \`\`\` \`.-------
-----.\` \`.----.\` \`..\` \`.-----
---.\` \`.\` ------.\` \`..\` \`.---
---..\`..--.\`--------.\`\`..--.\`\`.----
\`---------------------------------\`
\`-------------------------------\`
.---------------------------.
.-------------------------.
\`-----------------------\`
\`---------------------\`
"

View file

@ -1,18 +1,18 @@
"\
${c1}████████ ████████
██████ ██████
████ ████
█ █
${c1} █ ${c2} ████████ ████████
${c1} █ ${c2} ██████ ██████
${c1} █ ${c2} ████ ████
${c1} █ ${c2} █ █
${c1} █ ${c2} █
${c1} ${c3}███████ ███████
${c1} ${c3} █████ █████${c2} █
${c1} █${c3} ███ ███ ${c2} █
${c1} █ ${c3} █ ${c2} █
${c1} █ ${c3}█ ${c2} █
${c1} █ ${c3}█ ${c2} █
${c1} ..
..... ..OSSAAAAAAA..
.KKKKSS. .SSAAAAAAAAAAA.
.KKKKKSO. .SAAAAAAAAAA...
KKKKKKS. .OAAAAAAAA.
KKKKKKS. .OAAAAAA.
KKKKKKS. .SSAA..
.KKKKKS..OAAAAAAAAAAAA........
DKKKKO.=AA=========A===AASSSO..
AKKKS.==========AASSSSAAAAAASS.
.=KKO..========ASS.....SSSSASSSS.
.KK. .ASS..O.. =SSSSAOSS:
.OK. .ASSSSSSSO...=A.SSA.
.K ..SSSASSSS.. ..SSA.
.SSS.AAKAKSSKA.
.SSS....S..
"

20
ascii/distro/steamos Normal file
View file

@ -0,0 +1,20 @@
"\
${c2} .,,,,.
.,'onNMMMMMNNnn',.
.'oNMANKMMMMMMMMMMMNNn'.
.'ANMMMMMMMXKNNWWWPFFWNNMNn.
;NNMMMMMMMMMMNWW'' ,.., 'WMMM,
;NMMMMV+##+VNWWW' .+;'':+, 'WMW,
,VNNWP+${c1}######${c2}+WW, ${c1}+: ${c2}:+, +MMM,
'${c1}+#############, +. ,+' ${c2}+NMMM
${c1} '*#########*' '*,,*' ${c2}.+NMMMM.
${c1} \`'*###*' ,.,;###${c2}+WNM,
${c1} .,;;, .;##########${c2}+W
${c1},',. '; ,+##############'
'###+. :,. .,; ,###############'
'####.. \`'' .,###############'
'#####+++################'
'*##################*'
''*##########*''
''''''
"

View file

@ -35,7 +35,6 @@ printinfo () {
# info "Font" font
# info "Disk" disk
# info "Resolution" resolution
# info "Battery" battery
# info "Local IP" localip
# info "Public IP" publicip
@ -46,6 +45,7 @@ printinfo () {
info linebreak
info cols
info linebreak
info linebreak
}
@ -93,11 +93,16 @@ shell_version="off"
# scaling_current, scaling_min, scaling_max
speed_type="max"
# CPU shorthand
# Decice to show name only, speed only, or short info
# --cpu_shorthand name, speed, tiny, on, off
cpu_shorthand="off"
# GPU
# Shorten output of the getgpu funcion
# --gpu_shorthand on/off
# --gpu_shorthand on/off/tiny
gpu_shorthand="on"
@ -158,6 +163,11 @@ birthday_shorthand="off"
# --birthday_time on/off
birthday_time="on"
# Date format to use when printing birthday
# --birthday_format "format"
birthday_format="+%a %d %b %Y %l:%M %p"
# Color Blocks
# Color block range
@ -296,7 +306,7 @@ image_size="auto"
# Right gap between image and text
# --gap num
gap=4
gap=2
# Image offsets
# --xoffset px
@ -356,6 +366,14 @@ scrot_dir="$HOME/Pictures"
scrot_name="neofetch-%Y-%m-%d-%H:%M.png"
# }}}
# Stdout options {{{
# Separator for stdout mode
# --stdout_separator string
stdout_separator=" "
# }}}
# Config Options {{{

172
neofetch
View file

@ -5,7 +5,7 @@
# https://github.com/dylanaraps/neofetch
#
# Required Dependencies:
# Bash 4.0+
# Bash 3.0+
# xprop
# [Linux / BSD / Windows] Uptime detection: procps or procps-ng
#
@ -13,7 +13,8 @@
# Displaying Images: w3m + w3m-img
# Image Cropping: ImageMagick
# [ Linux / BSD ] Wallpaper Display: feh, nitrogen or gsettings
# [ Linux / BSD ] Current Song: mpc or cmus
# [ Linux / BSD ] Current Song: mpc, cmus, moc
# [ Linux ] Current Song: spotify
# [ Linux / BSD ] Resolution detection: xorg-xdpyinfo
#
# Created by Dylan Araps
@ -26,6 +27,7 @@ SYS_LOCALE="$LANG"
export LC_ALL=C
export LANG=C
# Config Options {{{
@ -55,7 +57,6 @@ printinfo () {
# info "Font" gtkfont
# info "Disk" disk
# info "Resolution" resolution
# info "Battery" battery
# info "Song" song
# info "Local IP" localip
@ -66,6 +67,7 @@ printinfo () {
info linebreak
info cols
info linebreak
info linebreak
}
@ -123,7 +125,7 @@ cpu_display="off"
# GPU
# Shorten output of the getgpu funcion
# --gpu_shorthand on/off
# --gpu_shorthand on/off/tiny
gpu_shorthand="on"
@ -184,6 +186,11 @@ birthday_shorthand="off"
# --birthday_time on/off
birthday_time="on"
# Date format to use when printing birthday
# --birthday_format "format"
birthday_format="%a %d %b %Y %l:%M %p"
# Color Blocks
# Color block range
@ -320,7 +327,7 @@ image_size="auto"
# Right gap between image and text
# --gap num
gap=4
gap=2
# Image offsets
# --xoffset px
@ -381,6 +388,14 @@ scrot_dir="$HOME/Pictures"
scrot_name="neofetch-%Y-%m-%d-%H:%M.png"
# }}}
# Stdout options {{{
# Separator for stdout mode
# --stdout_separator string
stdout_separator=" "
# }}}
# Config Options {{{
@ -520,7 +535,7 @@ getuptime () {
case "$os" in
"Linux")
case "$distro" in
"Puppy Linux"* | "Quirky Werewolf"* | "Precise Puppy"*)
"Puppy Linux"* | "Quirky Werewolf"* | "Precise Puppy"* | "Alpine Linux"*)
uptime=$(uptime | awk -F ':[0-9]{2}+ |(, ){1}+' '{printf $2}')
uptime=${uptime/ / }
;;
@ -644,6 +659,9 @@ getpackages () {
elif type -p nix-env >/dev/null 2>&1; then
packages="$(ls -d -1 /nix/store/*/ | wc -l)"
elif type -p apk >/dev/null 2>&1; then
packages="$(apk info | wc -l)"
elif type -p pacman-g2 >/dev/null 2>&1; then
packages="$(pacman-g2 -Q | wc -l)"
@ -744,7 +762,7 @@ getshell () {
# Desktop Environment {{{
getde () {
[ "$XDG_CURRENT_DESKTOP" ] && de="$XDG_CURRENT_DESKTOP"
[ "$XDG_CURRENT_DESKTOP" != "i3" ] && de="$XDG_CURRENT_DESKTOP"
}
# }}}
@ -955,7 +973,8 @@ getgpu () {
gpu=${gpu/Intel Corporation }
gpu=${gpu/Haswell-??? }
gpu=${gpu/?th Gen }
gpu=${gpu/Core Processor }
gpu=${gpu/Core }
gpu=${gpu/Processor }
gpu=${gpu/ Mobile}
gpu=${gpu/ Express}
gpu=${gpu/Sky }
@ -971,6 +990,7 @@ getgpu () {
gpu=${gpu/Seymour}
gpu=${gpu/Richland}
gpu=${gpu/Pitcairn}
gpu=${gpu/Hawaii}
gpu=${gpu/ OEM}
gpu=${gpu/ Cape Verde}
gpu=${gpu/ \[}
@ -1029,17 +1049,27 @@ getgpu () {
;;
esac
if [ "$gpu_shorthand" == "on" ]; then
gpu=${gpu// Rev\. ?}
gpu=${gpu//AMD*\/ATI\]/AMD}
gpu=${gpu// Tahiti}
gpu=${gpu// PRO}
gpu=${gpu// OEM}
gpu=${gpu// Mars}
gpu=${gpu// Series}
gpu=${gpu// Controller}
gpu=${gpu/\/*}
fi
case "$gpu_shorthand" in
"on" | "tiny")
gpu=${gpu// Rev\. ?}
gpu=${gpu//AMD*\/ATI\]/AMD}
gpu=${gpu// Tahiti}
gpu=${gpu// PRO}
gpu=${gpu// OEM}
gpu=${gpu// Mars}
gpu=${gpu// Series}
gpu=${gpu// Controller}
gpu=${gpu/\/*}
case "$gpu_shorthand" in
"tiny")
gpu=${gpu/Graphics }
gpu=${gpu/GeForce }
gpu=${gpu/Radeon }
;;
esac
;;
esac
gpu="${gpu}${count}"
}
@ -1150,6 +1180,29 @@ getsong () {
song="$(mocp -Q "%artist - %song" 2>/dev/null)"
state="$(mocp -Q "%state" 2>/dev/null)"
elif pgrep "spotify" >/dev/null 2>&1; then
case "$os" in
"Linux")
# This command is way too long
song="$(\
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 \
org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' |\
awk -F 'string "' '/string|array/ {printf "%s",$2; next}{print ""}' |\
awk -F '"' '/artist|title/ {printf $2 " - "}'
)"
song=${song% - }
song=${song/'('*}
song=${song//'['*}
;;
esac
elif [ -n "$(ps aux | awk '!(/awk/ || /Helper/) && /iTunes/')" ]; then
song="$(osascript -e 'tell application "iTunes" to artist of current track as string & " - " name of current track as string')"
state="$(osascript -e 'tell application "iTunes" to player state as string')"
elif [ -n "$(ps aux | awk '!(/awk/) && /spotify/')" ]; then
song="$(osascript -e 'tell application "Spotify" to artist of current track as string & " - " & name of current track as string')"
state="$(osascript -e 'tell application "Spotify" to player state as string')"
else
song="Unknown"
fi
@ -1159,7 +1212,7 @@ getsong () {
song="Paused"
;;
"stopped" | "STOP" | "")
"stopped" | "STOP")
song="Stopped"
;;
esac
@ -1276,7 +1329,7 @@ getstyle () {
fi
;;
"Cinnamon")
*"Cinnamon")
if type -p gsettings >/dev/null 2>&1; then
gtk3theme=$(gsettings get org.cinnamon.desktop.interface $gsettings)
gtk3theme=${gtk3theme//"'"}
@ -1407,12 +1460,12 @@ getfont () {
getdisk () {
# df flags
case "$os" in
"Linux" | "Windows") df_flags="-h --total" ;;
"Mac OS X") df_flags="-H /" ;;
"Linux" | "Windows") df_flags="-h -l --total" ;;
"Mac OS X") df_flags="-H / -l" ;;
*"BSD")
case "$os" in
"FreeBSD") df_flags="-h -c" ;;
"FreeBSD") df_flags="-h -c -l" ;;
*) disk="Unknown"; return ;;
esac
;;
@ -1594,12 +1647,27 @@ getbirthday () {
case "$os" in
"Linux")
birthday="$(ls -alct --full-time / | awk '/lost\+found/ {printf $6 " " $7}')"
date_cmd="$(date -d"$birthday" "+%a %d %b %Y %l:%M %p")"
date_cmd="$(date -d"$birthday" +"$birthday_format")"
;;
"Mac OS X")
birthday="$(ls -alctT /var/log/CDIS.custom | awk '{printf $6 " " $7 " " $9 " " $8}')"
date_cmd="$(date -j -f "%b %d %Y" "$birthday" "+%a %d %b %Y %l:%M %p")"
birthday="$(ls -lUT /var/log/install.log | awk '{printf $6 " " $7 " " $9 " " $8}')"
# Split the string into Date + time
time=${birthday/*???? }
birthday=${birthday/$time}
case "${time/:*}" in
0? | 10 | 11)
time+=" AM"
;;
*)
time+=" PM"
;;
esac
birthday+="$time"
birthday_shorthand="on"
;;
*"BSD")
@ -1611,7 +1679,7 @@ getbirthday () {
"FreeBSD"*)
birthday="$(ls -alctT /etc/hostid | awk '{printf $6 " " $7 " " $9 " " $8}')"
date_cmd="$(date -j -f "%b %d %Y" "$birthday" "+%a %d %b %Y %l:%M %p")"
date_cmd="$(date -j -f "%b %d %Y" "$birthday" +"$birthday_format")"
;;
"NetBSD"*)
@ -1627,7 +1695,7 @@ getbirthday () {
"Windows")
birthday="$(ls -alct --full-time /cygdrive/c/Windows/explorer.exe | awk '{printf $8 " " $9}')"
date_cmd="$(date -d"$birthday" "+%a %d %b %Y %l:%M %p")"
date_cmd="$(date -d"$birthday" +"$birthday_format")"
;;
*)
@ -1637,13 +1705,11 @@ getbirthday () {
esac
# Strip seconds from time output
birthday=${birthday%:*}
birthday=${birthday/:?? / }
# Pretty output
if [ "$birthday_shorthand" == "off" ]; then
birthday="$date_cmd"
birthday=${birthday/ / }
fi
[ "$birthday_shorthand" == "off" ] && \
birthday="${date_cmd/ / }"
# Toggle showing the time
[ "$birthday_time" == "off" ] && \
@ -2060,16 +2126,25 @@ prin () {
# Stdout {{{
stdout () {
# Read args early for the separator
stdout_separator_flag="$(awk -F '--stdout_separator ' '{printf $2}' <<< "${args[@]}")"
stdout_separator_flag=${stdout_separator_flag/ '--'*}
[ ! -z "$stdout_separator_flag" ] && \
stdout_separator="$stdout_separator_flag"
for func in "${args[@]}"; do
case "$func" in
"--"*) break ;;
*)
"get$func" 2>/dev/null
eval output="\$$func"
printf "%s" "$output "
stdout+="${output}${stdout_separator}"
;;
esac
done
printf "%s" "${stdout%%${stdout_separator}}"
exit
}
@ -2102,7 +2177,7 @@ colors () {
setcolors 3 2 4 5 7
;;
"CRUX"* | "Chakra"* | "gNewSense"* | "SailfishOS"*)
"CRUX"* | "Chakra"* | "gNewSense"* | "SailfishOS"* | "Alpine"*)
setcolors 4 5 7
;;
@ -2124,7 +2199,7 @@ colors () {
setcolors 7 4 1
;;
"Gentoo"* | "Funtoo"*)
"Gentoo"* | "Funtoo"* | "SteamOS"*)
setcolors 7 5
;;
@ -2237,6 +2312,10 @@ setcolors () {
fi
}
color () {
printf "%b%s" "\033[38;5;${1}m"
}
# }}}
@ -2372,9 +2451,11 @@ usage () { cat << EOF
Possible values: current, min, max, bios,
scaling_current, scaling_min, scaling_max
NOTE: This only support Linux with cpufreq.
--cpu_shorthand type Shorten the output of CPU
Possible values: name, speed, tiny, on, off
--kernel_shorthand on/off Shorten the output of kernel
--uptime_shorthand on/off Shorten the output of uptime (tiny, on, off)
--gpu_shorthand on/off Shorten the output of GPU
--gpu_shorthand on/off Shorten the output of GPU (tiny, on, off)
--gtk_shorthand on/off Shorten output of gtk theme/icons
--gtk2 on/off Enable/Disable gtk2 theme/icons output
--gtk3 on/off Enable/Disable gtk3 theme/icons output
@ -2386,13 +2467,13 @@ usage () { cat << EOF
--song_shorthand on/off Print the Artist/Title on seperate lines
--birthday_shorthand on/off Shorten the output of birthday
--birthday_time on/off Enable/Disable showing the time in birthday output
--birthday_format format Format the birthday output. (Uses 'date' cmd format)
Text Colors:
--colors x x x x x x Changes the text colors in this order:
title, @, underline, subtitle, colon, info
Text Formatting:
--underline_char char Character to use when underlineing title
--colors x x x x x x Changes the text colors in this order:
title, @, underline, subtitle, colon, info
--underline_char char Character to use when underlining title
--line_wrap on/off Enable/Disable line wrapping
--bold on/off Enable/Disable bold text
--prompt_height num Set this to your prompt height to fix issues with
@ -2448,7 +2529,7 @@ usage () { cat << EOF
Ascii:
--ascii value Where to get the ascii from, Possible values:
distro, /path/to/ascii
--ascii_color num Color to print the ascii art
--ascii_colors x x x x x x Colors to print the ascii art
--ascii_distro distro Which Distro's ascii art to print
@ -2456,6 +2537,7 @@ usage () { cat << EOF
--stdout info info Launch neofetch in stdout mode which prints the info
in a plain-text format that you can use with
lemonbar etc.
--stdout_separator string String to use as a separator in stdout mode.
Screenshot:
@ -2488,6 +2570,7 @@ while [ "$1" ]; do
--speed_type) speed_type="$2" ;;
--kernel_shorthand) kernel_shorthand="$2" ;;
--uptime_shorthand) uptime_shorthand="$2" ;;
--cpu_shorthand) cpu_shorthand="$2" ;;
--gpu_shorthand) gpu_shorthand="$2" ;;
--gtk_shorthand) gtk_shorthand="$2" ;;
--gtk2) gtk2="$2" ;;
@ -2500,6 +2583,7 @@ while [ "$1" ]; do
--song_shorthand) song_shorthand="$2" ;;
--birthday_shorthand) birthday_shorthand="$2" ;;
--birthday_time) birthday_time="$2" ;;
--birthday_format) birthday_format="$2" ;;
--disable)
for func in "$@"; do
case "$func" in
@ -2601,7 +2685,7 @@ while [ "$1" ]; do
unset -f bar
case "$2" in
"--"* | "") echo "--stdout requires at least one argument"; exit ;;
*) shift; args=("$@"); config="off" stdout ;;
*) shift; args=("$@"); config="off"; stdout ;;
esac
;;

230
neofetch.1 Normal file
View file

@ -0,0 +1,230 @@
.TH NEOFETCH "1" "March 2016" "1.5" "User Commands"
.SH NAME
neofetch \- simple system information script
.SH SYNOPSIS
.B neofetch \fR[Optional Flags]
.SH DESCRIPTION
neofetch is a script that gathers information about your system and prints
it to the terminal next to an image, a distro's logo or any ASCII art of
your choice.
.SH OPTIONS
.TP
.B \--disable 'infoname'
Allows you to disable an info line from appearing in the output.
.br
NOTE: You can supply multiple args. eg.
.br
\'neofetch --disable cpu gpu disk shell\'
.TP
.B \--osx_buildversion 'on/off'
Hide/Show Mac OS X build version.
.TP
.B \--os_arch 'on/off'
Hide/Show Windows architecture.
.TP
.B \--speed_type 'type'
Change the type of cpu speed to display.
.br
Possible values: current, min, max, bios,
scaling_current, scaling_min, scaling_max
.br
NOTE: This only support Linux with cpufreq.
.TP
.B \--cpu_shorthand 'type'
Shorten the output of CPU
.br
Possible values: name, speed, tiny, on, off
.TP
.B \--kernel_shorthand 'on/off'
Shorten the output of kernel
.TP
.B \--uptime_shorthand 'on/off'
Shorten the output of uptime (tiny, on, off)
.TP
.B \--gpu_shorthand 'on/off'
Shorten the output of GPU (tiny, on, off)
.TP
.B \--gtk_shorthand 'on/off'
Shorten output of gtk theme/icons
.TP
.B \--gtk2 'on/off'
Enable/Disable GTK2 theme/icons output
.TP
.B \--gtk3 'on/off'
Enable/Disable gtk3 theme/icons output
.TP
.B \--shell_path 'on/off'
Enable/Disable showing \$SHELL path
.TP
.B \--shell_version 'on/off'
Enable/Disable showing \$SHELL version
.TP
.B \--battery_num 'num'
Which battery to display, default value is 'all'
.TP
.B \--battery_shorthand 'on/off'
Whether or not each battery gets its own line/title
.TP
.B \--ip_host 'url'
URL to ping for public IP
.TP
.B \--song_shorthand 'on/off'
Print the Artist/Title on seperate lines
.TP
.B \--birthday_shorthand 'on/off'
Shorten the output of birthday
.TP
.B \--birthday_time 'on/off'
Enable/Disable showing the time in birthday output
.TP
.B \--birthday_format 'format'
Format the birthday output. (Uses 'date' cmd format)
.SH TEXT FORMATTING
.TP
.B \--colors x x x x x x
Changes the text colors in this order:
title, @, underline, subtitle, colon, info
.B \--underline_char 'char'
Character to use when underlining title
.TP
.B \--line_wrap 'on/off'
Enable/Disable line wrapping
.TP
.B \--bold 'on/off'
Enable/Disable bold text
.TP
.B \--prompt_height 'num'
Set this to your prompt height to fix issues
with the text going off screen at the top
.SH COLOR BLOCKS
.TP
.B \--color_blocks 'on/off'
Enable/Disable the color blocks
.TP
.B \--block_width 'num'
Width of color blocks
.TP
.B \--block_range 'start' 'end'
Range of colors to print as blocks
.SH IMAGE
.TP
.B \--image 'type'
Image source. Where and what image we display.
.br
Possible values: wall, shuffle, ascii, /path/to/img, off
.TP
.B \--size 'size'
Size to make the image, takes pixels or a percentage.
.TP
.B \--image_backend 'w3m/iterm2'
Which program to use to draw images.
.TP
.B \--shuffle_dir 'path'
Which directory to shuffle for an image.
.TP
.B \--image_position 'left/right'
Where to display the image: (Left/Right)
.TP
.B \--crop_mode 'mode'
Which crop mode to use
.br Takes the values: normal, fit, fill
.TP
.B \--crop_offset 'value'
Change the crop offset for normal mode.
.br
Possible values: northwest, north, northeast,
west, center, east, southwest, south, southeast
.TP
.B \--xoffset 'value'
How close the image will be to the left edge of the
window in pixel. This only works with w3m.
.TP
.B \--yoffset 'value'
How close the image will be to the top edge
of the window. This only works with w3m.
.TP
.B \--gap 'num'
Gap between image and text.
.br
NOTE: --gap can take a negative value which
will move the text closer to the left side.
.TP
.B \--clean
Remove all cropped images
.SH ASCII
.TP
.B \--ascii 'value'
Where to get the ASCII from
.br
Possible values: distro, /path/to/ascii
.TP
.B \--ascii_colors x x x x x x
Colors to print the ASCII art
.TP
.B \--ascii_distro 'distro'
Which Distro\'s ASCII art to print
.SH STDOUT
.TP
.B \--stdout info info
Launch fetch in stdout mode which prints the info in
a plain-text format that you can use with lemonbar etc.
.TP
.B \--stdout_separator 'string'
String to use as a separator in stdout mode.
.SH SCREENSHOT
.TP
.B \--scrot 'path'
Take a screenshot, if path is left empty the screenshot
function will use \$scrot_dir and \$scrot_name.
.TP
.B \--scrot_cmd 'cmd'
Screenshot program to launch
.SH OTHER
.TP
.B \--config 'path'
Specify a path to a custom config file
.TP
.B \--config none
Launch the script without a config file
.TP
.B \--help
.SH "SEE ALSO"
http://github.com/dylanaraps/neofetch
.SH BUGS
Report bugs to <https://github.com/dylanaraps/neofetch/issues>
.SH LICENSE
The MIT License (MIT)
Copyright (c) 2016 Dylan Araps
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom
the Software is furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
.SH AUTHOR
Created by Dylan Araps.