Swap out tput stuff for ansi escape codes
This commit is contained in:
parent
78dd4b6991
commit
f46aaf8672
1 changed files with 8 additions and 9 deletions
17
fetch
17
fetch
|
@ -226,6 +226,7 @@ w3m_img_path="/usr/lib/w3m/w3mimgdisplay"
|
||||||
split_size=2
|
split_size=2
|
||||||
|
|
||||||
# Image position
|
# Image position
|
||||||
|
# Only works with the w3m backend
|
||||||
# --image_position left/right
|
# --image_position left/right
|
||||||
image_position="left"
|
image_position="left"
|
||||||
|
|
||||||
|
@ -911,6 +912,7 @@ getgtk () {
|
||||||
# Check for gtk2 theme
|
# Check for gtk2 theme
|
||||||
if [ -f "$HOME/.gtkrc-2.0" ]; then
|
if [ -f "$HOME/.gtkrc-2.0" ]; then
|
||||||
gtk2theme=$(grep "^[^#]*$name" $HOME/.gtkrc-2.0)
|
gtk2theme=$(grep "^[^#]*$name" $HOME/.gtkrc-2.0)
|
||||||
|
|
||||||
elif [ -f "/etc/gtk-2.0/gtkrc" ]; then
|
elif [ -f "/etc/gtk-2.0/gtkrc" ]; then
|
||||||
gtk2theme=$(grep "^[^#]*$name" /etc/gtk-2.0/gtkrc)
|
gtk2theme=$(grep "^[^#]*$name" /etc/gtk-2.0/gtkrc)
|
||||||
fi
|
fi
|
||||||
|
@ -919,8 +921,10 @@ getgtk () {
|
||||||
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 gtk-theme)"
|
gtk3theme="$(gsettings get org.gnome.desktop.interface gtk-theme)"
|
||||||
gtk3theme=${gtk3theme//\'}
|
gtk3theme=${gtk3theme//\'}
|
||||||
|
|
||||||
elif [ -f "$HOME/.config/gtk-3.0/settings.ini" ]; then
|
elif [ -f "$HOME/.config/gtk-3.0/settings.ini" ]; then
|
||||||
gtk3theme=$(grep "^[^#]*$name" $HOME/.config/gtk-3.0/settings.ini)
|
gtk3theme=$(grep "^[^#]*$name" $HOME/.config/gtk-3.0/settings.ini)
|
||||||
|
|
||||||
else
|
else
|
||||||
gtk3theme=$(grep "^[^#]*$name" /etc/gtk-3.0/settings.ini)
|
gtk3theme=$(grep "^[^#]*$name" /etc/gtk-3.0/settings.ini)
|
||||||
fi
|
fi
|
||||||
|
@ -941,6 +945,7 @@ getgtk () {
|
||||||
# Check to see if gtk2 and gtk3 theme are identical
|
# Check to see if gtk2 and gtk3 theme are identical
|
||||||
if [ "$gtk2theme" ] && [ "$gtk2theme" == "$gtk3theme" ]; then
|
if [ "$gtk2theme" ] && [ "$gtk2theme" == "$gtk3theme" ]; then
|
||||||
gtktheme="$gtk2theme [GTK2/3]"
|
gtktheme="$gtk2theme [GTK2/3]"
|
||||||
|
|
||||||
elif [ -z "$gtk2theme" ] && [ -z "$gtk3theme" ]; then
|
elif [ -z "$gtk2theme" ] && [ -z "$gtk3theme" ]; then
|
||||||
gtktheme="None"
|
gtktheme="None"
|
||||||
fi
|
fi
|
||||||
|
@ -1462,17 +1467,11 @@ colors
|
||||||
bold
|
bold
|
||||||
|
|
||||||
# Move the cursor to the top and display the info
|
# Move the cursor to the top and display the info
|
||||||
tput cup 0
|
printf "\e[0H"
|
||||||
printinfo
|
printinfo
|
||||||
|
|
||||||
# Move the cursor to the bottom
|
# Move the cursor to the bottom and Show the cursor
|
||||||
case "$os" in
|
printf "\e[${lines}H\e[${prompt_height}A\e[?25h"
|
||||||
"BSD") tput DO $lines ;;
|
|
||||||
*) tput cup $lines ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Show the cursor
|
|
||||||
printf "\e[${prompt_height}A\e[?25h"
|
|
||||||
|
|
||||||
# Enable line wrap again
|
# Enable line wrap again
|
||||||
[ "$line_wrap" == "off" ] && printf "\e[?7h"
|
[ "$line_wrap" == "off" ] && printf "\e[?7h"
|
||||||
|
|
Loading…
Reference in a new issue