diff options
| author | epoch <epoch@hacking.allowed.org> | 2020-01-30 01:11:21 -0600 | 
|---|---|---|
| committer | epoch <epoch@hacking.allowed.org> | 2020-01-30 01:11:21 -0600 | 
| commit | a6703a9a095589dbc24d866f43b9ebe12900abe2 (patch) | |
| tree | ed07e7bd3154a9fe369e5253890f380541e9dab3 /share/hackvr/examples/calendar | |
| parent | 6a0446904ba495c0d4987a5e9b70143484bf6dcf (diff) | |
| download | hackvr-a6703a9a095589dbc24d866f43b9ebe12900abe2.tar.gz hackvr-a6703a9a095589dbc24d866f43b9ebe12900abe2.zip | |
put gaps between the days and made them not distance-based shading
Diffstat (limited to 'share/hackvr/examples/calendar')
| -rwxr-xr-x | share/hackvr/examples/calendar/calvr | 20 | 
1 files changed, 11 insertions, 9 deletions
| diff --git a/share/hackvr/examples/calendar/calvr b/share/hackvr/examples/calendar/calvr index 29f14d5..451203a 100755 --- a/share/hackvr/examples/calendar/calvr +++ b/share/hackvr/examples/calendar/calvr @@ -30,7 +30,7 @@ stdbuf -oL grep -v '^#' | while true;do    if [ "$refresh" ];then      unset refresh      first_dow="$(date -d $month/1/$year +%w)" -    monthname="$(date -d $month/$day/$year +%B)" +    monthname="$(date -d $month/1/$year +%B)"      dow=$first_dow      row=0      d=1 @@ -42,16 +42,16 @@ stdbuf -oL grep -v '^#' | while true;do      while [ "$d" -le "$days_in_month" ];do  #      printf "%s %s : %s\n" "$row" "$dow" "$d"        if [ -f ~/.local/var/cal/${year}_${month}_${d} ];then -        color=4 +        color=$[4+16]        else -        color=5 +        color=$[5+16]        fi        printf "%s addshape %s 4  %s %s 0  %s %s 0  %s %s 0  %s %s 0\n" \               "_day_${d}_" "${color}" \ -             "$[$dow*$cw]"     "$[-1*$row*$ch + $yoff]" \ -             "$[$dow*$cw+$cw]" "$[-1*$row*$ch + $yoff]" \ -             "$[$dow*$cw+$cw]" "$[-1*$row*$ch+$ch + $yoff]" \ -             "$[$dow*$cw]"     "$[-1*$row*$ch+$ch + $yoff]" +             "$[$dow*$cw]"       "$[-1*$row*$ch + $yoff]" \ +             "$[$dow*$cw+$cw-1]" "$[-1*$row*$ch + $yoff]" \ +             "$[$dow*$cw+$cw-1]" "$[-1*$row*$ch+$ch-1 + $yoff]" \ +             "$[$dow*$cw]"       "$[-1*$row*$ch+$ch-1 + $yoff]"        printf "%s\n" "${d}" | makelabel.sh "_day_${d}_" "$[$dow*$cw + 1]" "$[-1*$row*$ch + $yoff + 1]" 0        d=$[$d+1]        dow=$[$dow + 1] @@ -97,8 +97,10 @@ stdbuf -oL grep -v '^#' | while true;do          derp=notexists        fi        x-terminal-emulator -e nano "${file}" -      if [ ! -s "${file}" ];then -        rm "${file}" +      if [ -e "${file}" ];then +        if [ ! -s "${file}" ];then +          rm "${file}" +        fi        fi        if [ -e "${file}" ];then          merp=exists | 
