diff options
Diffstat (limited to 'ar/.local/bin/cron/crontog')
| -rwxr-xr-x | ar/.local/bin/cron/crontog | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ar/.local/bin/cron/crontog b/ar/.local/bin/cron/crontog index ccabe61..68fcd5a 100755 --- a/ar/.local/bin/cron/crontog +++ b/ar/.local/bin/cron/crontog @@ -6,7 +6,7 @@ cron_file="${XDG_CONFIG_HOME:-$HOME/.config}/crons" # Check if there are any active cronjobs -if crontab -l 2>/dev/null | grep -q '^[^#[:space:]]'; then +if crontab -l 2>/dev/null | grep -qv '^#\|^$'; then # If active cronjobs are found, save and disable them ln -sf "${XDG_DOTFILES_DIR:-${HOME}/.dotfiles}/$(whereami)/.config/crons" "${XDG_CONFIG_HOME:-${HOME}/.config}/crons" crontab -r @@ -22,5 +22,8 @@ else fi fi +# Invalidate sb-clock cache so icon updates immediately +rm -f "${XDG_CACHE_HOME:-${HOME}/.cache}/crontab/cronjobs" + # Notify status bar to update pkill -RTMIN+2 "${STATUSBAR:-dwmblocks}" |
