Changed calendar to firefox.
This commit is contained in:
@ -1,7 +1,5 @@
|
||||
#! /bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
WIDTH=${WIDTH:-200}
|
||||
HEIGHT=${HEIGHT:-200}
|
||||
DATEFMT=${DATEFMT:-"+%a %d.%m.%Y %H:%M:%S"}
|
||||
SHORTFMT=${SHORTFMT:-"+%H:%M:%S"}
|
||||
|
||||
@ -12,8 +10,8 @@ while getopts ":f:W:H:" opt; do
|
||||
W) WIDTH="$OPTARG" ;;
|
||||
H) HEIGHT="$OPTARG" ;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
exit 1
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
exit 1
|
||||
;;
|
||||
:)
|
||||
echo "Option -$OPTARG requires an argument." >&2
|
||||
@ -23,18 +21,11 @@ while getopts ":f:W:H:" opt; do
|
||||
done
|
||||
|
||||
case "$BLOCK_BUTTON" in
|
||||
1|2|3)
|
||||
|
||||
# the position of the upper left corner of the popup
|
||||
posX=$(($BLOCK_X - $WIDTH / 2))
|
||||
posY=$(($BLOCK_Y - $HEIGHT))
|
||||
|
||||
i3-msg -q "exec yad --calendar \
|
||||
--width=$WIDTH --height=$HEIGHT \
|
||||
--undecorated --fixed \
|
||||
--close-on-unfocus --no-buttons \
|
||||
--posx=$posX --posy=$posY \
|
||||
> /dev/null"
|
||||
1|2|3)
|
||||
# Focus Thunderbird and open calendar
|
||||
i3-msg -q [class="Thunderbird" instance="Mail"] focus; \
|
||||
sleep 0.005; \
|
||||
xdotool key --clearmodifiers --delay 5 ctrl+shift+c
|
||||
esac
|
||||
echo "$LABEL$(date "$DATEFMT")"
|
||||
echo "$LABEL$(date "$SHORTFMT")"
|
||||
|
Reference in New Issue
Block a user