Added zoom and keyboard

This commit is contained in:
2020-11-11 10:44:24 +01:00
parent 27703c6949
commit 598fcc41f9
7 changed files with 175 additions and 8 deletions

View File

@ -4,11 +4,9 @@ DATEFMT=${DATEFMT:-"+%a %d.%m.%Y %H:%M:%S"}
SHORTFMT=${SHORTFMT:-"+%H:%M:%S"}
OPTIND=1
while getopts ":f:W:H:" opt; do
while getopts ":f:" opt; do
case $opt in
f) DATEFMT="$OPTARG" ;;
W) WIDTH="$OPTARG" ;;
H) HEIGHT="$OPTARG" ;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
@ -22,10 +20,16 @@ done
case "$BLOCK_BUTTON" in
1|2|3)
# Focus Thunderbird and open calendar
i3-msg -q [class="Thunderbird" instance="Mail"] focus; \
sleep 0.005; \
# Try to focus Thunderbird
i3-msg -q [class="Thunderbird" instance="Mail"] focus
if [ $? == 2 ]
then
# Open Thunderbird if it was not open
i3-msg -q "exec thunderbird -mail -calendar"
else
# Open calendar
xdotool key --clearmodifiers --delay 5 ctrl+shift+c
fi
esac
echo "$LABEL$(date "$DATEFMT")"
echo "$LABEL$(date "$SHORTFMT")"