Added zoom and keyboard
This commit is contained in:
@ -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")"
|
||||
|
Reference in New Issue
Block a user