#!/bin/bash # this is a simple bash script / blocklet for i3blocks # that will open a new termite instance with 'cal' when clicked datefmt='+%a %Y-%m-%d %H:%M:%S' while getopts "f:" opt; do case $opt in f) datefmt="$OPTARG" ;; esac done case "$BLOCK_BUTTON" in 1|2|3) exec termite -e "bash -c 'cal -Y'" --hold & disown esac date "$datefmt"