Skip to content

Instantly share code, notes, and snippets.

@wilbeibi
Last active May 16, 2021 03:10
Show Gist options
  • Save wilbeibi/57e63d59ee8446d579e879c8324ba36e to your computer and use it in GitHub Desktop.
Save wilbeibi/57e63d59ee8446d579e879c8324ba36e to your computer and use it in GitHub Desktop.

Revisions

  1. wilbeibi revised this gist May 16, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion init.lua
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    -- 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 then
    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
  2. wilbeibi revised this gist May 14, 2021. No changes.
  3. wilbeibi revised this gist May 14, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion init.lua
    Original file line number Diff line number Diff line change
    @@ -8,4 +8,4 @@ function igonreWater(paths, flags)
    end
    end

    local dropboxWatcher = hs.pathwatcher.new(os.getenv("HOME") .. "/Dropbox/some/RustRepos/", igonreWater):start()
    local dropboxWatcher = hs.pathwatcher.new(os.getenv("HOME") .. "/Dropbox/blabla/RustRepos/", igonreWater):start()
  4. wilbeibi created this gist May 14, 2021.
    11 changes: 11 additions & 0 deletions init.lua
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    -- 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 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/some/RustRepos/", igonreWater):start()