show the number of unread mail in i3bar
This commit is contained in:
parent
264d10b02d
commit
d66a19b62e
5 changed files with 28 additions and 0 deletions
3
bin/.local/bin/update-mail-count
Executable file
3
bin/.local/bin/update-mail-count
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
fd -t f . "$HOME/.cache/mail/waarp/INBOX/new/" | wc -l > "$HOME/.cache/mail/waarp.unreadcount"
|
|
@ -22,6 +22,7 @@ order += "battery all"
|
|||
order += "volume master"
|
||||
order += "load"
|
||||
order += "cpu_usage"
|
||||
order += "read_file unreadmail"
|
||||
order += "tztime local"
|
||||
|
||||
wireless _first_ {
|
||||
|
@ -70,3 +71,9 @@ disk "/" {
|
|||
disk "/home" {
|
||||
format = " %avail (%percentage_avail)"
|
||||
}
|
||||
|
||||
read_file unreadmail {
|
||||
path = "/home/bca/.cache/mail/waarp.unreadcount"
|
||||
format = " %content"
|
||||
Max_characters = 10
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
/home/bca/.config/systemd/user/update-mail-count.timer
|
6
systemd/.config/systemd/user/update-mail-count.service
Normal file
6
systemd/.config/systemd/user/update-mail-count.service
Normal file
|
@ -0,0 +1,6 @@
|
|||
[Unit]
|
||||
Description=Update mail count for display in i3status
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/home/bca/.local/bin/update-mail-count
|
11
systemd/.config/systemd/user/update-mail-count.timer
Normal file
11
systemd/.config/systemd/user/update-mail-count.timer
Normal file
|
@ -0,0 +1,11 @@
|
|||
[Unit]
|
||||
Description=mail count timer
|
||||
|
||||
[Timer]
|
||||
OnBootSec=1m
|
||||
OnUnitActiveSec=1m
|
||||
Persistent=true
|
||||
Unit=update-mail-count.service
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Loading…
Add table
Reference in a new issue