This repository has been archived on 2019-02-28. You can view files and clone it, but cannot push or open issues or pull requests.
simple-i3blocks/modules/datetime.sh

11 lines
265 B
Bash
Executable File

if [[ "$BLOCK_INSTANCE" =~ "pm" ]]; then
FULL=$(date '+%A %-d.%-m.%Y W%V, %-I:%M:%S%p')
SHORT=$(date '+%-I:%M%p')
else
FULL=$(date '+%A %-d.%-m.%Y W%V, %-H:%M:%S')
SHORT=$(date '+%-H:%M')
fi
[[ "$LONG" ]] && echo $FULL || echo $SHORT
echo $SHORT