Fix merge conflicts

This commit is contained in:
Dylan Araps 2016-10-04 08:39:00 +11:00
commit 06281daed8
6 changed files with 66 additions and 27 deletions

View File

@ -14,16 +14,8 @@ suggesting a new feature then just a description will suffice.
## Verbose log ## Verbose log
**Neofetch 1.6** 1. Run `neofetch -vv 2> neofetchlog`
2. Upload the contents of `neofetchlog` to pastebin, gist or equivalent.
1. Add `set -x` to a new line near the top of the script.
2. Run `neofetch 2> neofetchlog`
3. Upload the contents of `neofetchlog` to pastebin, gist or equivalent.
**Neofetch 1.7 and newer**
2. Run `neofetch -vv 2> neofetchlog`
3. Upload the contents of `neofetchlog` to pastebin, gist or equivalent.

32
1.9.md
View File

@ -1,6 +1,7 @@
# Neofetch 1.9 # Neofetch 1.9
### Info
## Info
**GPU**<br \> **GPU**<br \>
@ -9,3 +10,32 @@
**DE**<br \> **DE**<br \>
- Added Cinnamon version number to output. - Added Cinnamon version number to output.
**WM Theme**<br \>
- Fix GNOME showing wrong WM Theme.
**Battery**<br \>
- Fixed battery not appearing when set to `all`.
**Terminal Font**<br \>
- [Termite] Ignore lines starting with `;`.
## Images
**General**<br \>
- Added a tiny delay before running w3m-img which suprisingly fixed all flickering issues in VTE based terminals. See [#349](https://github.com/dylanaraps/neofetch/pull/349)
**Wallpaper**<br \>
- Fix wallpapers with spaces in the filename from not showing up.
## Ascii
- Added logo mode which only displays the ascii art.
- Adds two new identical flags `--logo` and `-L`.

View File

@ -454,6 +454,7 @@ alias neofetch2="neofetch \
--ascii_logo_size Size of ascii logo. --ascii_logo_size Size of ascii logo.
Supported distros: Arch, Gentoo, Crux, OpenBSD. Supported distros: Arch, Gentoo, Crux, OpenBSD.
--ascii_bold on/off Whether or not to bold the ascii logo. --ascii_bold on/off Whether or not to bold the ascii logo.
--logo | -L Hide the info text and only show the ascii logo.
Screenshot: Screenshot:
--scrot /path/to/img Take a screenshot, if path is left empty the screen- --scrot /path/to/img Take a screenshot, if path is left empty the screen-

View File

@ -48,7 +48,6 @@ printinfo () {
info linebreak info linebreak
info cols info cols
info linebreak
} }
@ -266,7 +265,7 @@ block_height=1
progress_char_elapsed="-" progress_char_elapsed="-"
progress_char_total="=" progress_char_total="="
# Progress vorder # Progress border
# --progress_border on/off # --progress_border on/off
progress_border="on" progress_border="on"

View File

@ -561,6 +561,9 @@ getwmtheme() {
'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)"
[ -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
@ -1551,7 +1554,7 @@ getterm() {
esac esac
case "${name// }" in case "${name// }" in
"${SHELL/*\/}" | *"sh" | "tmux" | "screen") getterm "$parent" ;; "${SHELL/*\/}" | *"sh" | "tmux"* | "screen") getterm "$parent" ;;
"login" | "init") term="$(tty)"; term="${term/*\/}" ;; "login" | "init") term="$(tty)"; term="${term/*\/}" ;;
"ruby" | "1" | "systemd" | "sshd"* | "python"*) unset term ;; "ruby" | "1" | "systemd" | "sshd"* | "python"*) unset term ;;
"gnome-terminal-") term="gnome-terminal" ;; "gnome-terminal-") term="gnome-terminal" ;;
@ -1588,7 +1591,7 @@ gettermfont() {
;; ;;
"termite") "termite")
termfont="$(awk -F '= ' '!/^($|#)/ && /font/ {printf $2; exit}' "${XDG_CONFIG_HOME}/termite/config")" termfont="$(awk -F '= ' '!/^($|#|;)/ && /font/ {printf $2; exit}' "${XDG_CONFIG_HOME}/termite/config")"
;; ;;
"mintty") "mintty")
@ -1685,8 +1688,8 @@ getbattery() {
*) index="$battery_num" ;; *) index="$battery_num" ;;
esac esac
batteries=($(cat "/sys/class/power_supply/BAT$battery_num/capacity")) batteries=("$(cat /sys/class/power_supply/BAT$battery_num/capacity)")
battery_state=($(cat "/sys/class/power_supply/BAT${battery_num}/status")) battery_state=("$(cat /sys/class/power_supply/BAT${battery_num}/status)")
# Get the subtitle and reassign it so it doesn't change. # Get the subtitle and reassign it so it doesn't change.
title="$subtitle" title="$subtitle"
@ -1944,6 +1947,7 @@ getwallpaper() {
# Strip quotes etc from the path. # Strip quotes etc from the path.
img="${img/'file://'}" img="${img/'file://'}"
img="${img//\'}" img="${img//\'}"
img="${img//\%20/ }"
fi fi
;; ;;
@ -2253,6 +2257,9 @@ displayimage() {
if [ "$image" != "ascii" ]; then if [ "$image" != "ascii" ]; then
case "$image_backend" in case "$image_backend" in
"w3m") "w3m")
# Add a tiny delay to fix issues with images not
# appearing in specific terminal emulators.
sleep 0.05
printf "%b%s\n" "0;1;$xoffset;$yoffset;$width;$height;;;;;$img\n4;\n3;" |\ printf "%b%s\n" "0;1;$xoffset;$yoffset;$width;$height;;;;;$img\n4;\n3;" |\
$w3m_img_path 2>/dev/null || padding="\033[0C" $w3m_img_path 2>/dev/null || padding="\033[0C"
;; ;;
@ -2841,13 +2848,18 @@ dynamicprompt() {
# If the info is higher than the ascii/image place the prompt # If the info is higher than the ascii/image place the prompt
# based on the info height instead of the ascii/image height. # based on the info height instead of the ascii/image height.
if [ "${lines:-0}" -lt "${info_height:-0}" ]; then if [ "${lines:-0}" -lt "${info_height:-0}" ]; then
lines="$((info_height - lines - 2))" lines="0"
else else
lines="$((lines - info_height - 2))" lines="$((lines - info_height - 4))"
fi fi
# Set the prompt location # Set the prompt location
[ "$image" != "off" ] && printf "\033[${lines/-*/0}B" [ "$image" != "off" ] && printf "\033[${lines/-*/0}B"
# Add some padding if the lines are above 0
if [ "$lines" -gt 0 ]; then
printf "\n\n"
fi
} }
# }}} # }}}
@ -2971,6 +2983,7 @@ usage() { cat << EOF
--ascii_logo_size Size of ascii logo. --ascii_logo_size Size of ascii logo.
Supported distros: Arch, Gentoo, Crux, OpenBSD. Supported distros: Arch, Gentoo, Crux, OpenBSD.
--ascii_bold on/off Whether or not to bold the ascii logo. --ascii_bold on/off Whether or not to bold the ascii logo.
--logo | -L Hide the info text and only show the ascii logo.
Screenshot: Screenshot:
--scrot | -s /path/to/img Take a screenshot, if path is left empty the screen- --scrot | -s /path/to/img Take a screenshot, if path is left empty the screen-
@ -3093,7 +3106,7 @@ getargs() {
case "$2" in "--"* | "") image="ascii" ;; esac case "$2" in "--"* | "") image="ascii" ;; esac
;; ;;
--size) image_size="$2" ;; --image_size | --size) image_size="$2" ;;
--crop_mode) crop_mode="$2" ;; --crop_mode) crop_mode="$2" ;;
--crop_offset) crop_offset="$2" ;; --crop_offset) crop_offset="$2" ;;
--xoffset) xoffset="$2" ;; --xoffset) xoffset="$2" ;;
@ -3130,6 +3143,11 @@ getargs() {
--ascii_logo_size) ascii_logo_size="$2" ;; --ascii_logo_size) ascii_logo_size="$2" ;;
--ascii_bold) ascii_bold="$2" ;; --ascii_bold) ascii_bold="$2" ;;
--logo | -L)
image="ascii"
printinfo() { info linebreak; }
;;
# Screenshot # Screenshot
--scrot | -s) --scrot | -s)
@ -3231,10 +3249,6 @@ main() {
# Reset horizontal cursor position # Reset horizontal cursor position
printf "\033[9999999D" printf "\033[9999999D"
# Move cursor to top of ascii art
[ "$image" != "ascii" ] && [ "$image" != "off" ] && \
printf "\033[0H"
# Print the info # Print the info
printinfo printinfo
dynamicprompt dynamicprompt

View File

@ -75,10 +75,10 @@ Enable/Disable GTK2 theme/icons output
Enable/Disable gtk3 theme/icons output Enable/Disable gtk3 theme/icons output
.TP .TP
.B \--shell_path 'on/off' .B \--shell_path 'on/off'
Enable/Disable showing \$SHELL path Enable/Disable showing $SHELL path
.TP .TP
.B \--shell_version 'on/off' .B \--shell_version 'on/off'
Enable/Disable showing \$SHELL version Enable/Disable showing $SHELL version
.TP .TP
.B \--battery_num 'num' .B \--battery_num 'num'
Which battery to display, default value is 'all' Which battery to display, default value is 'all'
@ -230,6 +230,9 @@ Possible values: small, normal
.TP .TP
.B \--ascii_bold 'on/off' .B \--ascii_bold 'on/off'
Whether or not to bold the ascii logo. Whether or not to bold the ascii logo.
.TP
.B \--logo | -L
Hide the info text and only show the ascii logo.
.SH SCREENSHOT .SH SCREENSHOT
.TP .TP