Underlining now works for all the info

This commit is contained in:
Dylan 2016-04-02 12:52:21 +11:00
parent caf507e8b6
commit ca3ab8e47c
3 changed files with 16 additions and 3 deletions

13
1.7.md
View File

@ -22,6 +22,19 @@ prin "Subtitle: Text goes here"
prin "Subtitle" "Text goes here"
```
**Underline**<br \>
- Underlining is no longer hardcoded to title length meaning you can now<br \>
underline any part of the output and the length will match.
- `$underline` was renamed to `$underline_enabled`.
```sh
# OLD Variable
underline="on"
# NEW Variable
underline_enabled="on"
```
**Desktop Environment**<br \>
- [ Linux ] Fallback to using `xprop` if `$XDG_CURRENT_DESKTOP` is empty.
- Use `$de` instead of `$XDG_CURRENT_DESKTOP` for wallpaper and theme detection.

View File

@ -229,7 +229,7 @@ bold="on"
# Enable/Disable Underline
# --underline on/off
underline="on"
underline_enabled="on"
# Underline character
# --underline_char char

View File

@ -253,7 +253,7 @@ bold="on"
# Enable/Disable Underline
# --underline on/off
underline="on"
underline_enabled="on"
# Underline character
# --underline_char char
@ -2266,7 +2266,7 @@ stdout () {
# Underline {{{
getunderline () {
case "$underline" in
case "$underline_enabled" in
"on")
underline=$(printf %"$length"s)
underline=${underline// /$underline_char}