summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-03 23:04:23 +0200
committerPaul Buetow <paul@buetow.org>2026-02-03 23:04:23 +0200
commit68b54e819e881230ee1514f66e786810bde5c1cf (patch)
treeaf28a5ec029adb2ad3bd98c6a9f4a9e2986d8c37
parentebaa5b489e8f5dc967718914cfd2a8ad328cd306 (diff)
Update ai.fish stat handling
-rw-r--r--dotfiles/fish/conf.d/ai.fish8
1 files changed, 6 insertions, 2 deletions
diff --git a/dotfiles/fish/conf.d/ai.fish b/dotfiles/fish/conf.d/ai.fish
index 8e8b0c8..0d8de59 100644
--- a/dotfiles/fish/conf.d/ai.fish
+++ b/dotfiles/fish/conf.d/ai.fish
@@ -7,8 +7,12 @@ function ai::cursor_agent
touch $last_updated_file
else
set current_time (date +%s)
- set file_time (stat -f %m $last_updated_file)
- set time_diff (math $current_time - $file_time)
+ if test (uname) = Darwin
+ set file_time (stat -f %m $last_updated_file 2>/dev/null)
+ else
+ set file_time (stat -c %Y $last_updated_file 2>/dev/null)
+ end
+ set time_diff (math "$current_time - $file_time")
if test $time_diff -gt 86400
cursor-agent update
touch $last_updated_file