Skip to content

Instantly share code, notes, and snippets.

@mhmatthewhugley
Forked from martin-braun/.stglobalignore
Last active September 25, 2023 17:08
Show Gist options
  • Save mhmatthewhugley/019e608e843e3a97559a84e546393246 to your computer and use it in GitHub Desktop.
Save mhmatthewhugley/019e608e843e3a97559a84e546393246 to your computer and use it in GitHub Desktop.
syncthing ignore file(s) .stglobalignore and .stignore also BatteryOptimizationWhitelistCommand
$RECYCLE.BIN
$WINDOWS.~BT
(?d).DS_Store
(?d)Thumbs.db
(?d)Thumbs.db:encryptable
(?d)ehthumbs.db
(?d)ehthumbs_vista.db
(?i)desktop.ini
*.!Sync
*.Cache
*.SyncOld
*.SyncPart
*.SyncTemp
*.bak
*.bts
*.crdownload
*.git
*.icloud
*.lnk
*.lock
*.log
*.old
*.part
*.shm
*.sqlite*
*.stackdump
*.svn
*.swp
*.sync
*.tmp
*.wal
*CACHE*
*S*Conflict*
*Temporary*
*cache*
*inaccessible*
*s*conflict*
*~
.#*
.*.swp
.AppleDB
.AppleDesktop
.AppleDouble
.DocumentRevisions-V100
.LSOverride
.Prullenbak
.Shared
.Spotlight-V100
.SyncArchive
.SyncID
.SyncIgnore
.TemporaryItems
.Trash*
.Trashes
.VolumeIcon.icns
._*
.apdisk
.com.apple.timemachine.donotpresent
.escheck.tmp
.fseventsd
.gvfs
.local/share/trash
.svn
.sync
.thumbnails
.trash*
.~lock.
@eaDir
LOST.DIR
Network Trash Folder
System*Volume*
TEMP
Temp
Trash*
a_writable
asset-cache
captcha_tmp
checkouts
data/searchIndex
dev/
files_trashbin/
forms.json
lost+found
nobackup
pagefile.sys
proc/
run/
searchIndex
selinux/
staging.*
sys/
templates_c
thumbnails
tmp/
tmp_uploads
trash
var/lib/lxcfs/
~$*
#include .stglobalignore
dumpsys deviceidle whitelist +com.github.catfriend1.syncthingandroid +com.github.catfriend1.syncthingandroid.debug
// These prevent SyncThing from trying to sync data that's locked, constantly changing, going to be thrown out, unimportant, etc.
// Lots of conflicts/issues disappeared using these ignores, but do check to prevent major disappointment!
// *.log and *cache* are in there, just so you know.. but firefox' startupCache and offlineCache will be synced.
// Decided to stop categorizing these. Sorting them Lexicographically from now on. Ignores are case sensitive.
// https://gist.github.com/martin-braun/d6ef61d3abf1338450f3771c7500f4b6
// https://tools.knowledgewalls.com/online-lexicographic-ascending-or-descending-sort
.stglobalignore:
$RECYCLE.BIN
$WINDOWS.~BT
(?d).DS_Store
(?d)Thumbs.db
(?d)Thumbs.db:encryptable
(?d)ehthumbs.db
(?d)ehthumbs_vista.db
(?i)desktop.ini
*.!Sync
*.Cache
*.SyncOld
*.SyncPart
*.SyncTemp
*.bak
*.bts
*.crdownload
*.git
*.icloud
*.lnk
*.lock
*.log
*.old
*.part
*.shm
*.sqlite*
*.stackdump
*.svn
*.swp
*.sync
*.tmp
*.wal
*CACHE*
*S*Conflict*
*Temporary*
*cache*
*inaccessible*
*s*conflict*
*~
.#*
.*.swp
.AppleDB
.AppleDesktop
.AppleDouble
.DocumentRevisions-V100
.LSOverride
.Prullenbak
.Shared
.Spotlight-V100
.SyncArchive
.SyncID
.SyncIgnore
.TemporaryItems
.Trash*
.Trashes
.VolumeIcon.icns
._*
.apdisk
.com.apple.timemachine.donotpresent
.escheck.tmp
.fseventsd
.gvfs
.local/share/trash
.svn
.sync
.thumbnails
.trash*
.~lock.
@eaDir
LOST.DIR
Network Trash Folder
System*Volume*
TEMP
Temp
Trash*
a_writable
asset-cache
captcha_tmp
checkouts
data/searchIndex
dev/
files_trashbin/
forms.json
lost+found
nobackup
pagefile.sys
proc/
run/
searchIndex
selinux/
staging.*
sys/
templates_c
thumbnails
tmp/
tmp_uploads
trash
var/lib/lxcfs/
~$*
// the second filled line below is .stignore's content, i.e. put both this and .stglobalignore in the root of your sync folder(s) (where .stfolder resides)
// main reason for include is because syncthing then syncs this file too, and updates don't ruin my careful ignore project ;-)
// see also https://forum.syncthing.net/t/useful-stignore-patterns/1175
.stignore:
#include .stglobalignore
BatteryOptimizationWhitelistCommand.txt:
dumpsys deviceidle whitelist +com.github.catfriend1.syncthingandroid +com.github.catfriend1.syncthingandroid.debug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment