mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-14 04:32:12 +00:00
Fix linewrap option now working in screen/tmux
This commit is contained in:
9
fetch.sh
9
fetch.sh
@@ -535,6 +535,10 @@ clear
|
||||
# Hide the terminal cursor while we print the info
|
||||
tput civis
|
||||
|
||||
# Disable line wrap
|
||||
# Checks to see if we're in a tmux/screen session.
|
||||
[ $linewrap == "off" ] && printf '\e[?7l'
|
||||
|
||||
# Print the title and underline
|
||||
printf "%s\n" "$pad$b$title_color$title$clear"
|
||||
[ $underline == "on" ] && printf "%s\n" "$pad$colon_color$uline$clear"
|
||||
@@ -546,9 +550,6 @@ printinfo () {
|
||||
printf "%s\n" "$info_color$2$clear"
|
||||
}
|
||||
|
||||
# Disable line wrap
|
||||
[ $linewrap == "off" ] && tput rmam
|
||||
|
||||
printinfo "$title_os" "$os"
|
||||
printinfo "$title_kernel" "$kernel"
|
||||
printinfo "$title_uptime" "$uptime"
|
||||
@@ -564,7 +565,7 @@ printf "\n"
|
||||
[ $color_blocks == "on" ] && printf "$pad$(printcols)"
|
||||
|
||||
# Enable line wrap again
|
||||
[ $linewrap == "off" ] && tput smam
|
||||
[ $linewrap == "off" ] && printf '\e[?7h'
|
||||
|
||||
# If w3mimgviewer is found Display the image
|
||||
if type -p /usr/lib/w3m/w3mimgdisplay >/dev/null 2>&1; then
|
||||
|
||||
Reference in New Issue
Block a user