Disk: Add new option to only show dir name in subtitle

This commit is contained in:
Dylan Araps 2017-04-02 06:58:48 +10:00
parent e562e73387
commit d742d9aa9c
3 changed files with 20 additions and 5 deletions

View file

@ -1806,6 +1806,10 @@ get_disk() {
# Subtitle.
case "$disk_subtitle" in
"name") disk_sub="${disk_info[0]}" ;;
"dir")
disk_sub="${disk_info[5]/*\/}"
[[ -z "$disk_sub" ]] && disk_sub="${disk_info[5]}"
;;
*) disk_sub="${disk_info[5]}" ;;
esac
@ -3844,12 +3848,15 @@ INFO:
NOTE: Multiple values can be given. (--disk_show '/' '/dev/sdc1')
--disk_subtitle name/mount What information to append to the Disk subtitle.
--disk_subtitle type What information to append to the Disk subtitle.
Takes: name, mount, dir
'name' shows the disk's name (sda1, sda2, etc)
'mount' shows the disk's mount point (/, /mnt/Local Disk, etc)
'dir' shows the basename of the disks's path. (/, Local Disk, etc)
--ip_host url URL to query for public IP
--song_shorthand on/off Print the Artist/Title on separate lines
--install_time on/off Enable/Disable showing the time in Install Date output.