Add i3blocks script "newmail"
This commit is contained in:
parent
2057f424dd
commit
7c91dd7b67
3 changed files with 20 additions and 0 deletions
|
@ -47,6 +47,10 @@ BASE_COLOR=#ffffff
|
|||
UPDATE_COLOR=#ffffff
|
||||
LABEL=<span foreground='#0088cc'> </span>
|
||||
|
||||
[newmail]
|
||||
interval=30
|
||||
LABEL=<span foreground='#8cff8a'> </span>
|
||||
|
||||
[arch_linux_news]
|
||||
interval=once
|
||||
|
||||
|
|
15
roles/i3/files/newmail
Executable file
15
roles/i3/files/newmail
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -z "$MAILBOX_DIR" ]; then
|
||||
MAILBOX_DIR=~/.local/share/mail/
|
||||
fi
|
||||
|
||||
if [ -z "$LABEL" ]; then
|
||||
LABEL='New: '
|
||||
fi
|
||||
|
||||
nb_new=$(find "$MAILBOX_DIR" -type d -name new -not -empty -execdir ls '{}' \+ | wc -l)
|
||||
|
||||
if [ "$nb_new" -gt 0 ]; then
|
||||
echo "${LABEL}${nb_new}"
|
||||
fi
|
|
@ -142,6 +142,7 @@
|
|||
- {src: 'battery', dest: '~/.config/i3blocks/scripts/battery'}
|
||||
- {src: 'free_disk_space', dest: '~/.config/i3blocks/scripts/free_disk_space'}
|
||||
- {src: 'pub-ip', dest: '~/.config/i3blocks/scripts/pub-ip'}
|
||||
- {src: 'newmail', dest: '~/.config/i3blocks/scripts/newmail'}
|
||||
- {src: 'clitip_wallpaper.sh', dest: '~/.local/bin/clitip_wallpaper.sh'}
|
||||
- {src: 'xkcd_wallpaper.sh', dest: '~/.local/bin/xkcd_wallpaper.sh'}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue