all repos — zenUtils @ 6084890e0d9dbfc638e26e2f07e2ab55b627e336

misc utilities for computing zen

update this and that, add ztabelle
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmDuAboACgkQO3+8IhRO
Y5ihBA/+NXWuNnD8Il+sVAmgIKiCE9SN2ZxB92zTPa5mvTNAXijV2i+8ADtZd60J
xVgzutUeHjxto+7JAZptFAzzc9mMv/zJZkEpWwiDtmcNrkCyvVWXidFNkai2Hw7D
HG6g9VLIsOIeRi5GkR8rTy+SlGdVfbpZd+BQeq6JytVfqMLT8G7fPsz+a47awGq0
UcL9QZ08rMqSrtJZhY4NmZoKbM530d1hUI9jagLAM1NLkMsqUObcwqmaM/U1PImR
61tjrNDIOPoGxDB32BJXBg/lUrMaeglt4ocxOVqaQnqXqJahcCmC5y3/NK1H1dwW
SvGUYdw3DOx6pvnzVdQtiLWVfBDXHimPn9aAur0u7PAQxbgn1w3rLg/r9hSx6hsz
3ukcmA/q+zaqxuLeR1wpxPiLQrzUOPkvQrvVYC+pVoaxZvrtM569hvxEaYpkdGyJ
OUNVeG7BTXDL1pvLzZO6tZBrhfBzDZ2xXwjk1ydExLh0UN6W1OoJo6lzYLuVFk7Y
Syb0HESjuK/ECYDLKhxjzXP490WqlO55V4r+bQn5Luu8dHzU9kfJxWKUmw0WWmXx
HR13agZNI0xytAib1fcSEBnqs3hESST+MjGrmXmboc5ACiUvLVJTIti98ScAmKix
/tjMqcdrRFDma+yuMptPis7JlY+RP1VQLEbDhezvaAB6AA/XzAM=
=O3sn
-----END PGP SIGNATURE-----
commit

6084890e0d9dbfc638e26e2f07e2ab55b627e336

parent

9b49fd553731418b49b542de822392d61f9fe4ff

4 files changed, 64 insertions(+), 10 deletions(-)

jump to
M logout.shlogout.sh

@@ -31,9 +31,9 @@ ;;

logout) if pgrep sddm-helper; then killall sddm-helper - elif [ "$SESH" = "kwin" ]; then + elif pgrep plasmashell; then killall plasmashell - elif [ "$SESH" = "ryudo" ]; then + elif pgrep ryudo; then pkill -9 -P $(pgrep ryudo) else killall -0 Xorg
M t2stats.sht2stats.sh

@@ -41,7 +41,7 @@ 0)

meter=" " ;; 1|2|3|4|5|6|7|8|9) - meter="[ " + meter=" " ;; 10|11|12|13|14|15|16|17|18|19) meter=" "
M transsetter.shtranssetter.sh

@@ -6,7 +6,7 @@ # Licensed under the MIT License -- do what you want with it.

# Copyleft 2021 Derek Stevens <drkste@zoho.com> termprog=Alacritty -geditor=kate +geditor=acme opacity=0.85 setter=$(which transset)

@@ -19,12 +19,12 @@ echo "we need transset or transset-df in PATH!"

exit 1 fi -if which xcompmgr > /dev/null; then - xcompmgr -n& -else - ehco "we need xcompmgr in PATH!" - exit 1 -fi +#if which xcompmgr > /dev/null; then +# xcompmgr -n& +#else +# ehco "we need xcompmgr in PATH!" +# exit 1 +#fi if ! which xshove > /dev/null; then echo "we need xshove in PATH!"
A ztabelle.sh

@@ -0,0 +1,54 @@

+#!/bin/sh + +if [ -z $2 ]; then + echo "usage:" + echo " $0 MONTH YEAR" + echo " Print report of tracked time for the given month to stdout" + exit 1 +fi + +month=$1 +year=$2 + +start=$(date -Is --date="0:00 ${month} 1 ${year}") + +case ${month} in + jan|Jan|january|January) nextMonth=feb;; + feb|Feb|february|February) nextMonth=mar;; + mar|Mar|march|March) nextMonth=apr;; + apr|Apr|april|April) nextMonth=may;; + may|May) nextMonth=jun;; + jun|Jun|june|June) nextMonth=july;; + jul|Jul|july|July) nextMonth=aug;; + aug|Aug|august|August) nextMonth=sep;; + sep|Sep|september|September) nextMonth=oct;; + oct|Oct|october|October) nextMonth=nov;; + nov|Nov|november|November) nextMonth=dec;; + dec|Dec|december|December) nextMonth=jan; year=$((year + 1));; +esac + +end=$(date -Is --date="0:00 ${nextMonth} 1 ${year}") + + +header1="=====TIMESHEET FOR $(echo ${start} | awk -F\- '{print $1"-"$2}')=====" +header2="=====COMPLETE LOG=====" + +echo ${header1} +echo + +zeit list --since ${start} --until ${end} --total --no-colors | tail -n2 + +for p in $(zeit list --since ${start} --until ${end} --only-projects-and-tasks --no-colors | grep ◆ | awk '{print $2}'); do + echo "${p}:" + echo "\t$(zeit list --since ${start} --until ${end} --project ${p} --total | tail -n2 | cut -f2- -d ' ')" +done + +echo +echo +echo ${header2} +echo + +for e in $(zeit list --since ${start} --until ${end} --no-colors | awk '{print $1}'); do + zeit entry ${e} --no-colors | awk NF + echo +done