aboutsummaryrefslogtreecommitdiff
path: root/.config/i3blocks/scripts/myCalendar
blob: d1557ba85595a0e846b6832c1cd25607cb5d7267 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/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"