diff --git a/config/config b/config/config index 979bc0c0..7fe75e6d 100644 --- a/config/config +++ b/config/config @@ -316,6 +316,21 @@ public_ip_host="http://ident.me" # disk_show=('/') +# Disk subtitle. +# What to append to the Disk subtitle. +# +# Default: 'mount' +# Values: 'mount', 'name' +# Flag: --disk_subtitle +# +# Example: +# name: 'Disk (/dev/sda1): 74G / 118G (66%)' +# 'Disk (/dev/sdb2): 74G / 118G (66%)' +# +# mount: 'Disk (/): 74G / 118G (66%)' +# 'Disk (/mnt/Local Disk): 74G / 118G (66%)' +disk_subtitle="mount" + # Song diff --git a/neofetch b/neofetch index 72d57bd2..f108a626 100755 --- a/neofetch +++ b/neofetch @@ -1642,6 +1642,12 @@ get_disk() { disk="${disk_info[2]/i} / ${disk_info[1]/i} (${disk_perc}%)" + # Subtitle + case "$disk_subtitle" in + "name") disk_sub="${disk_info[0]}" ;; + *) disk_sub="${disk_info[5]}" ;; + esac + # Bar. case "$disk_display" in "bar") disk="$(bar "$disk_perc" "100")" ;; @@ -1651,7 +1657,7 @@ get_disk() { esac # Append '(disk mount point)' to the subtitle. - prin "${subtitle} (${disk_info[5]})" "$disk" + prin "${subtitle} (${disk_sub})" "$disk" done } @@ -3552,6 +3558,13 @@ INFO: Takes: '/', '/dev/sdXX', '/path/to/mount point' NOTE: Multiple values can be given. (--disk_show '/' '/dev/sdc1') + + --disk_subtitle name/mount What information to append to the Disk subtitle. + + 'name' shows the disk's name (sda1, sda2, etc) + + 'mount' shows the disk's mount point (/, /mnt/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. @@ -3716,6 +3729,7 @@ get_args() { [[ "$cpu_temp" == "on" ]] && cpu_temp="C" ;; + "--disk_subtitle") disk_subtitle="$2" ;; "--disk_show") unset disk_show for arg in "$@"; do diff --git a/neofetch.1 b/neofetch.1 index 5e6fbd36..d2fbdc5f 100644 --- a/neofetch.1 +++ b/neofetch.1 @@ -96,6 +96,13 @@ Takes: '/', '/dev/sdXX', '/path/to/mount point' .IP NOTE: Multiple values can be given. (\fB\-\-disk_show\fR '/' '/dev/sdc1') .TP +\fB\-\-disk_subtitle\fR name/mount +What information to append to the Disk subtitle. +.IP +\&'name' shows the disk's name (sda1, sda2, etc) +.IP +\&'mount' shows the disk's mount point (/, \fI\,/mnt/Local\/\fP Disk, etc) +.TP \fB\-\-ip_host\fR url URL to query for public IP .TP