diff options
author | epoch <epoch@hacking.allowed.org> | 2020-01-29 23:08:24 -0600 |
---|---|---|
committer | epoch <epoch@hacking.allowed.org> | 2020-01-29 23:08:24 -0600 |
commit | 48fff840926a57807c82e3e3252ddc2f8a204c82 (patch) | |
tree | addc2a20193ac3c0e530c50258e08aeeac1cecd9 | |
parent | 35443ee6097f86e174fe089ac3165e0071d7079d (diff) | |
download | hackvr-48fff840926a57807c82e3e3252ddc2f8a204c82.tar.gz hackvr-48fff840926a57807c82e3e3252ddc2f8a204c82.zip |
moved the deleteallexcept to a single spot
-rwxr-xr-x | share/hackvr/examples/calendar/calvr | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/share/hackvr/examples/calendar/calvr b/share/hackvr/examples/calendar/calvr index bd0bf17..29f14d5 100755 --- a/share/hackvr/examples/calendar/calvr +++ b/share/hackvr/examples/calendar/calvr @@ -74,7 +74,6 @@ stdbuf -oL grep -v '^#' | while true;do month=1 year=$[$year + 1] fi - printf "%s deleteallexcept %s\n" "$USER" "$USER" refresh="yep" fi if [ "$target" = "_prevmonth_" ];then @@ -83,12 +82,10 @@ stdbuf -oL grep -v '^#' | while true;do month=12 year=$[$year - 1] fi - printf "%s deleteallexcept %s\n" "$USER" "$USER" refresh="yep" fi if [ "$target" = "_MONTH_" ];then month="$(xmessage -buttons January:1,February:2,March:3,April:4,May:5,June:6,July:7,August:8,September:9,October:10,November:11,December:12 'pick a month';echo $?)" - printf "%s deleteallexcept %s\n" "$USER" "$USER" refresh="yep" fi if printf "%s\n" "$target" | grep '^_day_' 2>&1 >/dev/null;then @@ -109,7 +106,6 @@ stdbuf -oL grep -v '^#' | while true;do merp=notexists fi if [ "${derp}" != "${merp}" ];then - printf "%s deleteallexcept %s\n" "$USER" refresh="yep" fi fi @@ -117,4 +113,10 @@ stdbuf -oL grep -v '^#' | while true;do if [ "$action" = "quit" ];then exit fi + if [ "$refresh" ];then + ### I /might/ want to just make all of the calendar parts + ### start with _cal_* so I can deletegroup _cal_* + ### instead of nuking the world except the user. + printf "%s deleteallexcept %s\n" "$USER" "$USER" + fi done |