#!/bin/sh manageCalcurse() { if pgrep "calcurse" > /dev/null; then pkill "calcurse" else "$TERMINAL" -e "calcurse" fi } manageNotifications() { dunstctl history-pop } case "$1" in 1) manageCalcurse ;; 3) manageNotifications ;; esac