disk: Added --disk_subtitle=none. Closes #1386

This commit is contained in:
Dylan Araps 2020-01-23 01:00:16 +02:00
parent 74914899d8
commit 39d7188f4a
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 11 additions and 3 deletions

View File

@ -419,7 +419,7 @@ disk_show=('/')
# What to append to the Disk subtitle. # What to append to the Disk subtitle.
# #
# Default: 'mount' # Default: 'mount'
# Values: 'mount', 'name', 'dir' # Values: 'mount', 'name', 'dir', 'none'
# Flag: --disk_subtitle # Flag: --disk_subtitle
# #
# Example: # Example:
@ -433,6 +433,10 @@ disk_show=('/')
# dir: 'Disk (/): 74G / 118G (66%)' # dir: 'Disk (/): 74G / 118G (66%)'
# 'Disk (Local Disk): 74G / 118G (66%)' # 'Disk (Local Disk): 74G / 118G (66%)'
# 'Disk (Videos): 74G / 118G (66%)' # 'Disk (Videos): 74G / 118G (66%)'
#
# none: 'Disk: 74G / 118G (66%)'
# 'Disk: 74G / 118G (66%)'
# 'Disk: 74G / 118G (66%)'
disk_subtitle="mount" disk_subtitle="mount"
@ -3383,6 +3387,8 @@ get_disk() {
disk_sub=${disk_sub:-${disk_info[5]}} disk_sub=${disk_sub:-${disk_info[5]}}
;; ;;
none) ;;
*) *)
disk_sub=${disk_info[5]} disk_sub=${disk_info[5]}
;; ;;
@ -3397,7 +3403,7 @@ get_disk() {
# Append '(disk mount point)' to the subtitle. # Append '(disk mount point)' to the subtitle.
if [[ "$subtitle" ]]; then if [[ "$subtitle" ]]; then
prin "$subtitle ($disk_sub)" "$disk" prin "$subtitle${disk_sub:+ ($disk_sub)}" "$disk"
else else
prin "$disk_sub" "$disk" prin "$disk_sub" "$disk"
fi fi
@ -4615,7 +4621,7 @@ INFO:
NOTE: Multiple values can be given. (--disk_show '/' '/dev/sdc1') NOTE: Multiple values can be given. (--disk_show '/' '/dev/sdc1')
--disk_subtitle type What information to append to the Disk subtitle. --disk_subtitle type What information to append to the Disk subtitle.
Takes: name, mount, dir Takes: name, mount, dir, none
'name' shows the disk's name (sda1, sda2, etc) 'name' shows the disk's name (sda1, sda2, etc)
@ -4623,6 +4629,8 @@ INFO:
'dir' shows the basename of the disks's path. (/, Local Disk, etc) 'dir' shows the basename of the disks's path. (/, Local Disk, etc)
'none' shows only 'Disk' or the configured title.
--ip_host url URL to query for public IP --ip_host url URL to query for public IP
--ip_timeout int Public IP timeout (in seconds). --ip_timeout int Public IP timeout (in seconds).
--song_format format Print the song data in a specific format (see config file). --song_format format Print the song data in a specific format (see config file).