First of all, there is no way to add a shell script to i3status, it explicitly say so in the
i3status manpage: "there is no module to run arbitrary scripts or commands"
That being said, you can add i3status to a shell script.
For that you do not need to (read: must not) add a
Gmail section to your
i3status.conf. (The sections need to be of a specific type like
wireless and sometimes require an additional argument like
wlan0. They cannot be arbitrarily named (
Instead you have to edit your
~/.i3/config and set
status_command in the
bar section to call
checkmail.sh instead of
i3status. For example
checkmail.sh will need to be closer to the example in the
i3status manpage in order to work:
i3status | while :
echo "GMAIL $gmail | $line" || exit 1
Note the space between
: which is really needed. The
read line will read the output of
i3status into the parameter
line so that it can then be combined with the output of
You may also want to have a look at py3status which is an i3status-wrapper that allows for user-made extensions.