mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-14 12:37:16 +00:00
Added '--underline on/off' and '' to toggle it
This commit is contained in:
@@ -196,6 +196,10 @@ line_wrap="on"
|
||||
# --bold on/off
|
||||
bold="on"
|
||||
|
||||
# Enable/Disable Underline
|
||||
# --underline on/off
|
||||
underline="on"
|
||||
|
||||
# Underline character
|
||||
# --underline_char char
|
||||
underline_char="-"
|
||||
|
||||
14
fetch
14
fetch
@@ -216,6 +216,10 @@ line_wrap="on"
|
||||
# --bold on/off
|
||||
bold="on"
|
||||
|
||||
# Enable/Disable Underline
|
||||
# --underline on/off
|
||||
underline="on"
|
||||
|
||||
# Underline character
|
||||
# --underline_char char
|
||||
underline_char="-"
|
||||
@@ -1827,8 +1831,13 @@ prin () {
|
||||
# Underline {{{
|
||||
|
||||
getunderline () {
|
||||
underline=$(printf %"$length"s)
|
||||
underline=${underline// /$underline_char}
|
||||
case "$underline" in
|
||||
"on")
|
||||
underline=$(printf %"$length"s)
|
||||
underline=${underline// /$underline_char}
|
||||
;;
|
||||
"off") underline="" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# }}}
|
||||
@@ -2087,6 +2096,7 @@ while [ "$1" ]; do
|
||||
--info_color) info_color=$2 ;;
|
||||
|
||||
# Text Formatting
|
||||
--underline) underline="$2" ;;
|
||||
--underline_char) underline_char="$2" ;;
|
||||
--line_wrap) line_wrap="$2" ;;
|
||||
--bold) bold="$2" ;;
|
||||
|
||||
Reference in New Issue
Block a user