Dotfiles for my tiling window manager + terminal workflow.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#! /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 posX=$(($BLOCK_X - $WIDTH / 2)) posY=$(($BLOCK_Y - $HEIGHT))
i3-msg -q "exec yad --calendar \ --width=$WIDTH --height=$HEIGHT \ --undecorated --fixed \ --no-buttons \ --posx=$posX --posy=$posY \ > /dev/null" # --close-on-unfocus \ esac . "/home/$USER/.cache/wal/colors.sh" echo "$LABEL$(date "$DATEFMT")" echo "$LABEL$(date "$SHORTFMT")" echo "$color7"
|