vitor Posted April 14, 2023 Share Posted April 14, 2023 56 minutes ago, octothorpe said: Although its contents are frequently updated, the file looks in the Finder as if it hasn't been touched in the 5+ years I've been using Alfred. Technically it’s a folder. It’s a bundle so you can right-click → Show Package Contents. Do you want to try a few terminal commands? In the following, replace /PATH/TO/ALFRED_PREFERENCES with the correct path on your machine. You can do it easily by dragging and dropping the Alfred.alfredpreferences into the terminal’s window. Mind the spaces! 56 minutes ago, octothorpe said: Is there any way to have Alfred game this logic a bit and make it clear when it's modify Alfred.alfredpreferences? Assuming iCloud Drive uses the folder’s modification date for that, you can: touch /PATH/TO/ALFRED_PREFERENCES Or you can do do it to every file and folder in the Preferences: find /PATH/TO/ALFRED_PREFERENCES -print0 | xargs -0 touch Those simply change the modification and access times, nothing else is modified. There are other things we can try, but one thing at a time. If that works let me know and I can e.g. make you a small self-contained file which will run the command every day at a specified time. I’ll need to know the full path to your Alfred.alfredpreferences and the time you’d want it to run. octothorpe 1 Link to comment
octothorpe Posted May 2, 2023 Share Posted May 2, 2023 (edited) @vitor This is all very interesting and I'll try it when I have some time to futz around. Thanks much for writing it up and offering to help. In the meantime, I would very much suggest that Alfred by default move its prefs somewhere besides the Documents folder. Any Mac user who has their Documents and Desktop folders set to iCloud Drive, and has Optimize Storage set, may well have their Alfred prefs go missing from time to time. These are two very common iCloud settings. Edited May 2, 2023 by octothorpe Link to comment
vitor Posted May 2, 2023 Share Posted May 2, 2023 17 minutes ago, octothorpe said: I would very much suggest that Alfred by default move its prefs somewhere besides the Documents folder. They’re not in the Documents folder. The default location is ~/Library/Application Support/Alfred/Alfred.alfredpreferences. Link to comment
octothorpe Posted May 2, 2023 Share Posted May 2, 2023 3 hours ago, vitor said: The default location is ~/Library/Application Support/Alfred/Alfred.alfredpreferences. OH! I stand corrected then. Thanks Link to comment
Rory Posted June 4, 2023 Share Posted June 4, 2023 On 4/14/2023 at 1:37 PM, vitor said: Technically it’s a folder. It’s a bundle so you can right-click → Show Package Contents. Do you want to try a few terminal commands? In the following, replace /PATH/TO/ALFRED_PREFERENCES with the correct path on your machine. You can do it easily by dragging and dropping the Alfred.alfredpreferences into the terminal’s window. Mind the spaces! Assuming iCloud Drive uses the folder’s modification date for that, you can: touch /PATH/TO/ALFRED_PREFERENCES Or you can do do it to every file and folder in the Preferences: find /PATH/TO/ALFRED_PREFERENCES -print0 | xargs -0 touch Those simply change the modification and access times, nothing else is modified. There are other things we can try, but one thing at a time. If that works let me know and I can e.g. make you a small self-contained file which will run the command every day at a specified time. I’ll need to know the full path to your Alfred.alfredpreferences and the time you’d want it to run. I have been running into the same situation and just updated the folder date with the touch command. I'll report back if that doesn't solve it but honestly may forget to if nothing goes wrong. no news is good news 🤷♂️ Link to comment
Romz Posted June 9, 2023 Share Posted June 9, 2023 On 4/14/2023 at 7:37 PM, vitor said: Those simply change the modification and access times, nothing else is modified. There are other things we can try, but one thing at a time. Another thing that may be worth trying is using the `brctl` command, which allows to download a local copy of iCloud Drive documents at a specific path. BRCTL(1) General Commands Manual BRCTL(1) NAME brctl – Manage the CloudDocs daemon SYNOPSIS brctl 〈command〉 [command-options and arguments] DESCRIPTION brctl understands the following commands: (…) download 〈path〉 download a local copy of the document at this path Combined with a launch script or a cron task, this could be able to ensure that the Alfred preferences folder is always available locally? (even when optimised storage is enabled) Link to comment
vitor Posted June 9, 2023 Share Posted June 9, 2023 @Romz That would be something like find '/PATH/TO/ALFRED_PREFERENCES' -type f -exec brctl download {} \; because brctl doesn’t work well with folders so we have to tell it to download each individual file. But avoiding eviction should be more effective (and possibly more efficient, as the touch command is doing very little) than frequent downloads. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now