11 lines
244 B
Bash
Executable file
11 lines
244 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [ -z "$LABEL" ]; then
|
|
LABEL='New: '
|
|
fi
|
|
|
|
nb_new=$(find -files0-from ~/.config/i3blocks/newmail_maildirs -type d -name new -not -empty -execdir ls '{}' \+ | wc -l)
|
|
|
|
if [ "$nb_new" -gt 0 ]; then
|
|
echo "${LABEL}${nb_new}"
|
|
fi
|