take mount location and icon as argument
This commit is contained in:
parent
4ffa3fecad
commit
e32a4258a8
|
@ -1,9 +1,12 @@
|
|||
#!/bin/sh
|
||||
# $1 should be drive mountpoint, otherwise assumed /.
|
||||
# $2 should be an icon, otherwise is used.
|
||||
|
||||
reset="\033[0m"
|
||||
big="\033[11m"
|
||||
big="\033[12m"
|
||||
defaulticon=""
|
||||
|
||||
location=${1:-/}
|
||||
[ -d "$location" ] || exit
|
||||
printf "%b" "$big$reset $(df -H "$location" | awk ' /[0-9]/ {print $3 "/" $2}')\n"
|
||||
[ -z "$2" ] && icon="$defaulticon" || icon="$2"
|
||||
printf "%b" "$big$icon$reset $(df -H "$location" | awk ' /[0-9]/ {print $3 "/" $2}')\n"
|
||||
|
|
Loading…
Reference in New Issue