summaryrefslogtreecommitdiff
path: root/.local/bin/blocks/calendar
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/blocks/calendar')
-rwxr-xr-x.local/bin/blocks/calendar40
1 files changed, 0 insertions, 40 deletions
diff --git a/.local/bin/blocks/calendar b/.local/bin/blocks/calendar
deleted file mode 100755
index a35cf65..0000000
--- a/.local/bin/blocks/calendar
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-
-LABEL=${LABEL:"+"}
-DATEFMT=${DATEFMT:-"+%a %d.%m.%Y %H:%M:%S"}
-SHORTFMT=${SHORTFMT:-"+%H:%M:%S"}
-WIDTH=${WIDTH:-200}
-HEIGHT=${HEIGHT:-200}
-
-OPTIND=1
-while getopts ":f:W:H:" opt; do
- case $opt in
- f) DATEFMT="$OPTARG" ;;
- W) WIDTH="$OPTARG" ;;
- H) HEIGHT="$OPTARG" ;;
- \?)
- echo "Invalid option: -$OPTARG" >&2
- exit 1
- ;;
- :)
- echo "Option -$OPTARG requires an argument." >&2
- exit 1
- ;;
- esac
-done
-
-case "$BLOCK_BUTTON" in 1)
- # Position of the upper left corner of the popup.
- posX=$(($BLOCK_X - $WIDTH/2))
- posY=$(($BLOCK_Y + 20))
-
- i3-msg -q "exec yad --calendar \
- --width=$WIDTH --height=$HEIGHT \
- --undecorated --fixed \
- --close-on-unfocus --no-buttons \
- --posx=$posX --posy=$posY \
- > /dev/null"
-esac
-
-echo "$LABEL $(date "$DATEFMT")"
-echo "$LABEL $(date "$SHORTFMT")"