Last active
May 16, 2021 03:10
-
-
Save wilbeibi/57e63d59ee8446d579e879c8324ba36e to your computer and use it in GitHub Desktop.
dropbox ignore hammerspoon config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Ignore generated target/ in certain Dropbox folders. | |
function igonreWater(paths, flags) | |
for idx, path in pairs(paths) do | |
if path:sub(-6) == "target" and flags[idx].itemIsDir == true and flags[idx].itemRenamed == true and flags[idx].itemXattrMod ~= true then | |
print("Ignoring" .. path) | |
hs.execute(string.format("xattr -w com.dropbox.ignored 1 '%s'", path)) | |
end | |
end | |
end | |
local dropboxWatcher = hs.pathwatcher.new(os.getenv("HOME") .. "/Dropbox/blabla/RustRepos/", igonreWater):start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment