Merge remote-tracking branch 'dylanaraps/master'
This commit is contained in:
commit
461da47497
3 changed files with 41 additions and 27 deletions
8
1.6.md
8
1.6.md
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
Thanks to the following people for contributing this release.
|
Thanks to the following people for contributing this release.
|
||||||
|
|
||||||
|
- **[@iandrewt](https://github.com/iandrewt)**
|
||||||
- **[@dawidd6](https://github.com/dawidd6)**
|
- **[@dawidd6](https://github.com/dawidd6)**
|
||||||
- **[@onodera-punpun](https://github.com/onodera-punpun)**
|
- **[@onodera-punpun](https://github.com/onodera-punpun)**
|
||||||
|
|
||||||
|
@ -11,3 +12,10 @@ Thanks to the following people for contributing this release.
|
||||||
|
|
||||||
**OS**<br \>
|
**OS**<br \>
|
||||||
- [ CRUX ] Also print the CRUX version. **[@onodera-punpun](https://github.com/onodera-punpun)**
|
- [ CRUX ] Also print the CRUX version. **[@onodera-punpun](https://github.com/onodera-punpun)**
|
||||||
|
|
||||||
|
**Public IP**<br \>
|
||||||
|
- Mad public IP function fasterby using `dig`. **[@iandrewt](https://github.com/iandrewt)**
|
||||||
|
|
||||||
|
|
||||||
|
### Scrot
|
||||||
|
- Fixed scrot function not using user defined options.
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
# Speed up script by not using unicode
|
# Speed up script by not using unicode
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
export LANG=c
|
export LANG=C
|
||||||
export LANGUAGE=C
|
export LANGUAGE=C
|
||||||
|
|
||||||
# Info Options {{{
|
# Info Options {{{
|
||||||
|
@ -260,11 +260,9 @@ progress_color_total="8"
|
||||||
# barinfo: The bar is displayed before the info.
|
# barinfo: The bar is displayed before the info.
|
||||||
# off: Only the info is displayed.
|
# off: Only the info is displayed.
|
||||||
#
|
#
|
||||||
# --cpu_displau bar/infobar/barinfo/off
|
|
||||||
# --memory_display bar/infobar/barinfo/off
|
# --memory_display bar/infobar/barinfo/off
|
||||||
# --battery_display bar/infobar/barinfo/off
|
# --battery_display bar/infobar/barinfo/off
|
||||||
# --disk_display bar/infobar/barinfo/off
|
# --disk_display bar/infobar/barinfo/off
|
||||||
cpu_display="off"
|
|
||||||
memory_display="off"
|
memory_display="off"
|
||||||
battery_display="off"
|
battery_display="off"
|
||||||
disk_display="off"
|
disk_display="off"
|
||||||
|
@ -368,12 +366,12 @@ scrot_cmd="scrot -c -d 3"
|
||||||
# Scrot dir
|
# Scrot dir
|
||||||
# Where to save the screenshots
|
# Where to save the screenshots
|
||||||
# --scrot_dir /path/to/screenshot/folder
|
# --scrot_dir /path/to/screenshot/folder
|
||||||
scrot_dir="$HOME/Pictures"
|
scrot_dir="$HOME/Pictures/"
|
||||||
|
|
||||||
# Scrot filename
|
# Scrot filename
|
||||||
# What to name the screenshots
|
# What to name the screenshots
|
||||||
# --scrot_name str
|
# --scrot_name str
|
||||||
scrot_name="neofetch-%Y-%m-%d-%H:%M.png"
|
scrot_name="neofetch-$(date +%F-%T).png"
|
||||||
|
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
52
neofetch
52
neofetch
|
@ -55,7 +55,7 @@ printinfo () {
|
||||||
info "GPU" gpu
|
info "GPU" gpu
|
||||||
info "Memory" memory
|
info "Memory" memory
|
||||||
|
|
||||||
# info "Font" gtkfont
|
# info "Font" font
|
||||||
# info "Disk" disk
|
# info "Disk" disk
|
||||||
# info "Battery" battery
|
# info "Battery" battery
|
||||||
# info "Song" song
|
# info "Song" song
|
||||||
|
@ -388,12 +388,12 @@ scrot_cmd="scrot -c -d 3"
|
||||||
# Scrot dir
|
# Scrot dir
|
||||||
# Where to save the screenshots
|
# Where to save the screenshots
|
||||||
# --scrot_dir /path/to/screenshot/folder
|
# --scrot_dir /path/to/screenshot/folder
|
||||||
scrot_dir="$HOME/Pictures"
|
scrot_dir="$HOME/Pictures/"
|
||||||
|
|
||||||
# Scrot filename
|
# Scrot filename
|
||||||
# What to name the screenshots
|
# What to name the screenshots
|
||||||
# --scrot_name str
|
# --scrot_name str
|
||||||
scrot_name="neofetch-%Y-%m-%d-%H:%M.png"
|
scrot_name="neofetch-$(date +%F-%T).png"
|
||||||
|
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
@ -589,23 +589,23 @@ getuptime () {
|
||||||
days=$((uptime / 86400))
|
days=$((uptime / 86400))
|
||||||
|
|
||||||
# Format the output like Linux's "uptime -p" cmd.
|
# Format the output like Linux's "uptime -p" cmd.
|
||||||
case "$mins" in
|
if [ "$mins" == 1 ]; then
|
||||||
0) ;;
|
uptime="up $mins minute"
|
||||||
1) uptime="up $mins minute" ;;
|
elif [ "$mins" != 0 ]; then
|
||||||
*) uptime="up $mins minutes" ;;
|
uptime="up $mins minutes"
|
||||||
esac
|
fi
|
||||||
|
|
||||||
case "$hours" in
|
if [ "$hours" == 1 ]; then
|
||||||
0) ;;
|
uptime="up $hours hour, ${uptime/up }"
|
||||||
1) uptime="up $hours hour, ${uptime/up }" ;;
|
elif [ "$mins" != 0 ]; then
|
||||||
*) uptime="up $hours hours, ${uptime/up }" ;;
|
uptime="up $hours hours, ${uptime/up }"
|
||||||
esac
|
fi
|
||||||
|
|
||||||
case "$days" in
|
if [ "$days" == 1 ]; then
|
||||||
0) ;;
|
uptime="up $days day, ${uptime/up }"
|
||||||
1) uptime="up $days day, ${uptime/up }" ;;
|
elif [ "$days" != 0 ]; then
|
||||||
*) uptime="up $days days, ${uptime/up }" ;;
|
uptime="up $days days, ${uptime/ up}"
|
||||||
esac
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Windows")
|
"Windows")
|
||||||
|
@ -1659,7 +1659,10 @@ getlocalip () {
|
||||||
}
|
}
|
||||||
|
|
||||||
getpublicip () {
|
getpublicip () {
|
||||||
if type -p curl >/dev/null 2>&1; then
|
if type -p dig >/dev/null 2>&1; then
|
||||||
|
publicip="$(dig +short myip.opendns.com @resolver1.opendns.com)"
|
||||||
|
|
||||||
|
elif type -p curl >/dev/null 2>&1; then
|
||||||
publicip="$(curl -w '\n' "$public_ip_host")"
|
publicip="$(curl -w '\n' "$public_ip_host")"
|
||||||
|
|
||||||
elif type -p wget >/dev/null 2>&1; then
|
elif type -p wget >/dev/null 2>&1; then
|
||||||
|
@ -2052,9 +2055,8 @@ getimage () {
|
||||||
img="$thumbnail_dir/$imgname"
|
img="$thumbnail_dir/$imgname"
|
||||||
}
|
}
|
||||||
|
|
||||||
scrot_path="$scrot_dir/$scrot_name"
|
|
||||||
takescrot () {
|
takescrot () {
|
||||||
$scrot_cmd "$scrot_path"
|
$scrot_cmd "${scrot_dir}${scrot_name}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
@ -2721,7 +2723,13 @@ while [ "$1" ]; do
|
||||||
--ascii_logo_size) ascii_logo_size="$2" ;;
|
--ascii_logo_size) ascii_logo_size="$2" ;;
|
||||||
|
|
||||||
# Screenshot
|
# Screenshot
|
||||||
--scrot | -s) scrot="on"; [ "$2" ] && scrot_path="$2" ;;
|
--scrot | -s)
|
||||||
|
scrot="on"
|
||||||
|
if [ "$2" ]; then
|
||||||
|
scrot_name="${2##*/}"
|
||||||
|
scrot_dir="${2/$scrot_name}"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
--scrot_cmd) scrot_cmd="$2" ;;
|
--scrot_cmd) scrot_cmd="$2" ;;
|
||||||
|
|
||||||
# Stdout
|
# Stdout
|
||||||
|
|
Loading…
Reference in a new issue