aboutsummaryrefslogtreecommitdiff
path: root/.config/i3blocks/scripts/rofi-calendar
blob: e1f12d097cdeea768f723c93d2fdbcfaf39d4778 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#! /bin/sh

blockdate=$(date '+%a. %d. %b. %Y')

case "$BLOCK_BUTTON" in
    1|2|3) date=$(date '+%A, %d. %B')
export TERM=xterm
cal --color=always \
    | sed 's/\x1b\[[7;]*m/\<b\>\<u\>/g' \
    | sed 's/\x1b\[[27;]*m/\<\/u\>\<\/b\>/g' \
    | tail -n +2 \
    | rofi \
        -dmenu \
        -markup-rows \
        -no-fullscreen \
        -font "Monospace 6" \
        -hide-scrollbar \
        -bw 2 \
        -m -3 \
        -theme-str '#window {anchor:northeast; location: southeast;}' \
        -eh 1 \
        -width -22 \
        -no-custom \
	-no-config \
        -p "$date" > /dev/null 
    esac
echo $blockdate
date '+%d.%m.%Y'