summaryrefslogtreecommitdiff
path: root/.local/bin/blocklets/calendar
diff options
context:
space:
mode:
authorDavid Luevano <55825613+luevano@users.noreply.github.com>2020-02-12 02:37:21 -0700
committerDavid Luevano <55825613+luevano@users.noreply.github.com>2020-02-12 02:37:21 -0700
commitb769e5c08da0d6b4e2cc62d9c5b2ea988f78f79c (patch)
treeedb94997a7361c3fd2655e5b72d6417c46554064 /.local/bin/blocklets/calendar
parenta536b007955556c873ec3155cf1df031a426c125 (diff)
Debug for no booting pc
Diffstat (limited to '.local/bin/blocklets/calendar')
-rwxr-xr-x.local/bin/blocklets/calendar41
1 files changed, 0 insertions, 41 deletions
diff --git a/.local/bin/blocklets/calendar b/.local/bin/blocklets/calendar
deleted file mode 100755
index eb8e210..0000000
--- a/.local/bin/blocklets/calendar
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /bin/sh
-
-WIDTH=${WIDTH:-200}
-HEIGHT=${HEIGHT:-200}
-DATEFMT=${DATEFMT:-"+%a %d.%m.%Y %H:%M:%S"}
-SHORTFMT=${SHORTFMT:-"+%H:%M:%S"}
-
-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|2|3)
-
- # the position of the upper left corner of the popup
- # The size is hardcoded for a 1080p monitor.
- posX=$((1899 - $WIDTH))
- posY=$((35))
-
- 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")"