From c254ec552e9661e85c876872395614f72f6e94c2 Mon Sep 17 00:00:00 2001 From: Johannes Rothe Date: Sun, 20 May 2018 23:26:05 +0200 Subject: [PATCH] add script to show new mails in i3status --- config/i3/config | 3 +-- config/i3status/config | 1 - i3status_append.sh | 18 ++++++++++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100755 i3status_append.sh diff --git a/config/i3/config b/config/i3/config index 3e451f1..4a3607e 100644 --- a/config/i3/config +++ b/config/i3/config @@ -195,6 +195,5 @@ bindsym $mod+r mode "resize" # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) bar { - status_command i3status -# tray_output primary + status_command ~/src/dotfiles/i3status_append.sh } diff --git a/config/i3status/config b/config/i3status/config index e7fbaf7..b467a2e 100644 --- a/config/i3status/config +++ b/config/i3status/config @@ -8,7 +8,6 @@ # order += "disk /" # order += "run_watch DHCP" # order += "run_watch VPNC" - order += "path_exists VPN" order += "wireless wlp3s0" order += "ethernet enp0s31f6" order += "battery 0" diff --git a/i3status_append.sh b/i3status_append.sh new file mode 100755 index 0000000..7f3feb0 --- /dev/null +++ b/i3status_append.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# shell script to prepend i3status with more stuff + +eml(){ + maildirs="$HOME/Mail/magazino/INBOX/new/" + ml="$(find "$maildirs" -type f | wc -l)" + if [ $ml > 0 ]; then + echo "$ml" + else + echo "0" + fi +} + +i3status | while : +do + read line + echo "Mails $(eml) | $line" || exit 1 +done