I was using from time ago this extension for Gnome named Argos which allows to create useful data views using scripts written in whatever language of choice available, bash included.

So far I had just a simple extension writing a UNICODE character, but with the suggestion of my colleague Javi Ramírez, I decided to use the motivational idea to write a simple script to calculate how much you’ve earned so far in the day and show that information at a glance on your menu bar.

File is available here, and must be named like showmethemoney.1s.sh inside your argos folder.

Content is very simple:

#!/usr/bin/env bash
# Author: Pablo Iranzo Gómez ([email protected])
# Description: Script to calculate earned money so far in the day
# Adjust DAILY to the daily income, adjust DAYSTART hour and DAYEND hour to your working schedule

# Customize to suit your details
DAYSTART="8:00"
DAYEND="17:00"
DAILY=1000
SYMBOL="€"



URL="github.com/p-e-w/argos"
DIR=$(dirname "$0")

EARNED=""
DAILYTOTAL=$(echo "scale=4; $DAILY/(9*60*60)"| bc)
UNIXSTART=$(date --date="${DAYSTART}" +"%s")
UNIXNOW=$(date +"%s")
UNIXEND=$(date --date="${DAYEND}" +"%s")

if [[ ${UNIXNOW} -gt ${UNIXEND} ]]; then
    EARNED=${DAILY}
elif [[ ${UNIXNOW} -gt ${UNIXSTART} ]]; then
    EARNED=$(echo "scale=2; $DAILYTOTAL * (${UNIXNOW}-${UNIXSTART})" | bc)
else
    EARNED="0"
fi

STRING="💰 ${EARNED}${SYMBOL} 💰"

echo "$STRING | refresh=true"
echo "---"
echo "$URL | iconName=help-faq-symbolic href='https://$URL'"
echo "$DIR | iconName=folder-symbolic href='file://$DIR'"

It checks if day has started or it’s over and if in between, it calculates the amount based on Unix epoch.

For more details about developing them, check argos link above!

Enjoy! (and if you do, you can Buy Me a Coffee )