summaryrefslogtreecommitdiff
path: root/ar
diff options
context:
space:
mode:
Diffstat (limited to 'ar')
-rw-r--r--ar/.config/shell/aliasrc14
-rw-r--r--ar/.config/zsh/keymaps.zsh4
-rwxr-xr-xar/.local/bin/cron/crontog5
-rwxr-xr-xar/.local/bin/statusbar/sb-clock14
-rwxr-xr-xar/.local/bin/statusbar/sb-ecrypt2
5 files changed, 21 insertions, 18 deletions
diff --git a/ar/.config/shell/aliasrc b/ar/.config/shell/aliasrc
index 5cd7580..3b2b693 100644
--- a/ar/.config/shell/aliasrc
+++ b/ar/.config/shell/aliasrc
@@ -490,13 +490,13 @@ alias sps="source ${XDG_CONFIG_HOME:-${HOME}/.config}/shell/profile"
alias szs="source ${XDG_CONFIG_HOME:-${HOME}/.config}/zsh/.zshrc"
alias ylogh='ylog -s hidden -c us | grep $(LC_TIME=C date +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "'
-alias ylogi='ylog -s hidden -c us | grep $(LC_TIME=C date -d "1 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "'
+alias ylogH='ylog -s hidden -c us | grep $(LC_TIME=C date -d "1 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "'
alias ylogp='ylog -s peertube | grep $(LC_TIME=C date +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "'
alias ylogP='ylog -s peertube | grep $(LC_TIME=C date -d "1 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "'
-alias ylogt='ylog -s diary -c us | grep $(LC_TIME=C date +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "'
-alias ylogT='ylog -s recordings -c us | grep $(LC_TIME=C date +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "'
-alias ylogy='ylog -s diary -c us | grep $(LC_TIME=C date -d "1 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "'
-alias ylogY='ylog -s recordings -c us | grep $(LC_TIME=C date -d "1 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "'
-alias ylogr='ylog -s diary -c us | grep $(LC_TIME=C date -d "2 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "'
-alias ylogR='ylog -s recordings -c us | grep $(LC_TIME=C date -d "2 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "'
+alias ylogd='ylog -s diary -c us | grep $(LC_TIME=C date +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "'
+alias ylogD='ylog -s diary -c us | grep $(LC_TIME=C date -d "1 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "'
+alias ylogt='ylog -s diary -c us | grep $(LC_TIME=C date -d "2 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "'
+alias ylogr='ylog -s recordings -c us | grep $(LC_TIME=C date +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "'
+alias ylogR='ylog -s recordings -c us | grep $(LC_TIME=C date -d "1 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "'
+alias ylogT='ylog -s recordings -c us | grep $(LC_TIME=C date -d "2 days ago" +%d/%b) | grep -E "[0-9]{2}:[0-9]{2}:[0-9]{2} "'
alias ylogu='ylog -s diary -c us'
diff --git a/ar/.config/zsh/keymaps.zsh b/ar/.config/zsh/keymaps.zsh
index 038e20d..560509c 100644
--- a/ar/.config/zsh/keymaps.zsh
+++ b/ar/.config/zsh/keymaps.zsh
@@ -327,12 +327,12 @@ else
bindkey -s '^X^G' '^urgafiles '
bindkey -s '^X^L' '^ugloac\n'
bindkey -s '^X^N' '^ulastfiles -l\n'
- bindkey -s '^X^O' '^uylogy\n'
+ bindkey -s '^X^O' '^uylogD\n'
bindkey -s '^X^Q' '^ufpkill\n'
bindkey -s '^X^R' '^ufgst\n'
bindkey -s '^X^T' '^ugitstagedfiles\n'
bindkey -s '^X^U' '^ugitupdate\n'
- bindkey -s '^X^]' '^uylogt\n'
+ bindkey -s '^X^]' '^uylogd\n'
bindkey -s '^X^_' '^ufzffns\n'
bindkey -s '^X^X^B' '^urbackup\n'
bindkey -s '^X^X^P' '^upcyr\n'
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}"
diff --git a/ar/.local/bin/statusbar/sb-clock b/ar/.local/bin/statusbar/sb-clock
index 6aa1bb4..ddfa28b 100755
--- a/ar/.local/bin/statusbar/sb-clock
+++ b/ar/.local/bin/statusbar/sb-clock
@@ -5,14 +5,14 @@ calendar="🗓"
hour=$(date '+%I')
minute=$(date '+%M')
-# Cache crontab check for 5 minutes
-crontab_cache="${XDG_CACHE_HOME:-${HOME}/.cache}/statusbar/has_crontab"
+# Cache cron daemon check for 5 minutes
+crontab_cache="${XDG_CACHE_HOME:-${HOME}/.cache}/crontab/cronjobs"
if [ ! -f "$crontab_cache" ] || [ $(($(date +%s) - $(stat -c %Y "$crontab_cache" 2>/dev/null || echo 0))) -gt 300 ]; then
- mkdir -p "${XDG_CACHE_HOME:-${HOME}/.cache}/statusbar"
- if crontab -l 2>/dev/null | grep -q '^[^#[:space:]]'; then
- echo "1" > "$crontab_cache"
+ mkdir -p "${XDG_CACHE_HOME:-${HOME}/.cache}/crontab"
+ if crontab -l 2>/dev/null | grep -qv '^#\|^$'; then
+ echo "1" >"$crontab_cache"
else
- echo "0" > "$crontab_cache"
+ echo "0" >"$crontab_cache"
fi
fi
@@ -60,7 +60,7 @@ moonfile="${XDG_DATA_HOME:-${HOME}/.local/share}/wallpapers/moonphase"
# Cache location for 24 hours
if [ ! -s "$locationfile" ] || [ $(($(date +%s) - $(stat -c %Y "$locationfile" 2>/dev/null || echo 0))) -gt 86400 ]; then
mkdir -p "${XDG_CACHE_HOME:-${HOME}/.cache}/statusbar"
- curl -s --max-time 2 http://ip-api.com/json | jq -r '[.regionName, .countryCode] | join(",")' > "$locationfile" 2>/dev/null &
+ curl -s --max-time 2 http://ip-api.com/json | jq -r '[.regionName, .countryCode] | join(",")' >"$locationfile" 2>/dev/null &
fi
location=$(cat "$locationfile" 2>/dev/null || echo "")
diff --git a/ar/.local/bin/statusbar/sb-ecrypt b/ar/.local/bin/statusbar/sb-ecrypt
index f07b994..9ba6e26 100755
--- a/ar/.local/bin/statusbar/sb-ecrypt
+++ b/ar/.local/bin/statusbar/sb-ecrypt
@@ -7,4 +7,4 @@ case $BLOCK_BUTTON in
6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
-mount | grep -q "$HOME/Private" && echo "🔑" || echo "🔒"
+mount | grep -q "$HOME/Secret" && echo "🔑" || echo "🔒"