Added 'song_shorthand' which prints the Artist and Title on seperate lines
This commit is contained in:
parent
9aac9cedee
commit
ba2c66daa7
5
1.3.md
5
1.3.md
|
@ -3,3 +3,8 @@
|
|||
### OS
|
||||
|
||||
- Added support for `BunsenLabs`.
|
||||
|
||||
### Info
|
||||
|
||||
**Song**<br \>
|
||||
- Added `song_shorthand` which prints the Artist/Title on seperate lines.
|
||||
|
|
|
@ -257,6 +257,7 @@ alias fetch2="fetch \
|
|||
--battery_num num Which battery to display, default value is 'all'
|
||||
--battery_shorthand on/off Whether or not each battery gets its own line/title
|
||||
--ip_host url Url to ping for public IP
|
||||
--song_shorthand on/off Print the Artist/Title on seperate lines
|
||||
--birthday_shorthand on/off Shorten the output of birthday
|
||||
--birthday_time on/off Enable/Disable showing the time in birthday output
|
||||
|
||||
|
|
|
@ -140,6 +140,13 @@ battery_shorthand="off"
|
|||
public_ip_host="http://ident.me"
|
||||
|
||||
|
||||
# Song
|
||||
|
||||
# Print the Artist and Title on seperate lines
|
||||
# --song_shorthand on/off
|
||||
song_shorthand="off"
|
||||
|
||||
|
||||
# Birthday
|
||||
|
||||
# Whether to show a long pretty output
|
||||
|
|
23
fetch
23
fetch
|
@ -158,6 +158,13 @@ battery_shorthand="off"
|
|||
public_ip_host="http://ident.me"
|
||||
|
||||
|
||||
# Song
|
||||
|
||||
# Print the Artist and Title on seperate lines
|
||||
# --song_shorthand on/off
|
||||
song_shorthand="off"
|
||||
|
||||
|
||||
# Birthday
|
||||
|
||||
# Whether to show a long pretty output
|
||||
|
@ -1123,6 +1130,20 @@ getsong () {
|
|||
song="Stopped"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Display Artist and song on seperate lines.
|
||||
if [ "$song_shorthand" == "on" ]; then
|
||||
artist="${song/ -*}"
|
||||
song=${song/*- }
|
||||
|
||||
if [ "$song" != "$artist" ]; then
|
||||
prin "Artist: ${artist}"
|
||||
prin "Song: ${song}"
|
||||
else
|
||||
prin "${subtitle}: ${song}"
|
||||
fi
|
||||
unset song
|
||||
fi
|
||||
}
|
||||
|
||||
# }}}
|
||||
|
@ -2277,6 +2298,7 @@ usage () { cat << EOF
|
|||
--battery_num num Which battery to display, default value is 'all'
|
||||
--battery_shorthand on/off Whether or not each battery gets its own line/title
|
||||
--ip_host url Url to ping for public IP
|
||||
--song_shorthand on/off Print the Artist/Title on seperate lines
|
||||
--birthday_shorthand on/off Shorten the output of birthday
|
||||
--birthday_time on/off Enable/Disable showing the time in birthday output
|
||||
|
||||
|
@ -2382,6 +2404,7 @@ while [ "$1" ]; do
|
|||
--battery_num) battery_num="$2" ;;
|
||||
--battery_shorthand) battery_shorthand="$2" ;;
|
||||
--ip_host) public_ip_host="$2" ;;
|
||||
--song_shorthand) song_shorthand="$2" ;;
|
||||
--birthday_shorthand) birthday_shorthand="$2" ;;
|
||||
--birthday_time) birthday_time="$2" ;;
|
||||
--disable)
|
||||
|
|
Reference in New Issue