mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-17 01:55:03 +01:00
feat(gui,cli,core): add excluded-file patterns from the Sync page, for all folders or one (#99)
The Sync page's Folders view gets an Excluded Files group under the folder list: one row for the patterns of all synced folders (opens Preferences → Sync) and one per folder kept on this computer with its count of own patterns (opens that folder's .pdfsignore editor). Add Pattern asks for a pattern and where it goes: all synced folders or one of them. pdfs-core gains add_folder_pattern/remove_folder_pattern, which edit a folder's rules line by line and read them again when sync changed the file in between, and AppDirs::change_ignore_patterns, now shared by the CLI and Preferences. `pdfs sync ignore list|add|remove` take --folder. Preferences → Sync repaints from the config each time it opens, so a pattern added elsewhere shows there.
This commit is contained in:
1 parent
38a8db0e3e
commit
8598aff7dd
23 files changed
+4396
-2526
No files matched your search
+7
-4
@@ -29,10 +29,13 @@ Existing folders stay device backups. Older builds cannot open the upgraded data
|
||||
- **Apps → Search Launcher**: whether `pdfs-prompt` opens its own window, your dmenu-style
|
||||
launcher (rofi, wofi, fuzzel, bemenu) or fzf in a terminal.
|
||||
|
||||
Each synced folder kept on this computer has **Excluded Files…** in its menu on the Sync page,
|
||||
for its own `.pdfsignore`. It checks every line as you type, tells you whether a path is synced
|
||||
and which pattern decides, and asks before replacing rules that changed on another computer
|
||||
meanwhile. `pdfs sync ignore list|add|remove|reset|check` does the same from a terminal.
|
||||
The Sync page's Folders view lists **Excluded Files** under the folders: how many patterns
|
||||
apply to all of them and to each one, and **Add Pattern** to add one for all synced folders or
|
||||
for a single folder. A folder's own rules (its `.pdfsignore`) open in an editor, also from the
|
||||
folder's menu. It checks every line as you type, tells you whether a path is synced and which
|
||||
pattern decides, and asks before replacing rules that changed on another computer meanwhile.
|
||||
`pdfs sync ignore list|add|remove|reset|check` does the same from a terminal, and `--folder`
|
||||
picks a single folder.
|
||||
`pdfs-app --page preferences-sync` (or `-apps`, `-storage`, plain `preferences`) opens
|
||||
Preferences at that page.
|
||||
- **More clutter left out of synced folders by default**: `desktop.ini`, `.directory`, trash
|
||||
|
||||
+2
-2
@@ -119,8 +119,8 @@ commands are for scripts and for cases where the mount is not available.
|
||||
| `pdfs sync reset ID` | Forget what a synced folder synced before and compare it with Proton Drive again. A file on one side only is copied to the other, and a file that differs keeps both versions. Nothing is deleted. |
|
||||
| `pdfs sync pause [--for 1h] [--folder ID]` | Pause uploads and synced folders. Reading files keeps working. `--for` ends the pause by itself (`30m`, `1h`, `2d`). |
|
||||
| `pdfs sync resume [--folder ID]` | Resume after a pause. |
|
||||
| `pdfs sync ignore list` | Print the patterns every synced folder leaves out. Built-in ones are marked. |
|
||||
| `pdfs sync ignore add PATTERN` / `remove PATTERN` | Leave out, or stop leaving out, files matching a gitignore-style pattern such as `*.db` or `build/`. A pattern starting with `-` goes after `--`. |
|
||||
| `pdfs sync ignore list [--folder PATH]` | Print the patterns every synced folder leaves out; built-in ones are marked. With `--folder`, the own patterns of the synced folder holding `PATH`. |
|
||||
| `pdfs sync ignore add PATTERN [--folder PATH]` / `remove PATTERN [--folder PATH]` | Leave out, or stop leaving out, files matching a gitignore-style pattern such as `*.db` or `build/`, in every synced folder or, with `--folder`, in that folder's `.pdfsignore` only. A pattern starting with `-` goes after `--`. |
|
||||
| `pdfs sync ignore reset` | Use the built-in patterns again. |
|
||||
| `pdfs sync ignore check PATH` | Say whether a file in a synced folder is synced, and which pattern decides. |
|
||||
| `pdfs sync limit [--up RATE] [--down RATE]` | Cap bandwidth, for example `500K` or `2M` per second. `0` removes a cap. Without options, prints the current caps. |
|
||||
|
||||
@@ -118,8 +118,8 @@ Gitignore-style rules applied to every synced folder, in addition to each folder
|
||||
".fuse_hidden*", ".nfs*", "*.part", "*.crdownload", "*.kate-swp", ".~lock.*#", "~$*"]
|
||||
```
|
||||
|
||||
Preferences → Sync → Excluded Files edits this list, and `pdfs sync ignore` does the same from
|
||||
a terminal. A list equal to the defaults is saved as absent, so it follows the defaults of later
|
||||
Preferences → Sync → Excluded Files edits this list, **Add Pattern** on the Sync page's Folders
|
||||
view adds to it, and `pdfs sync ignore` does the same from a terminal. A list equal to the defaults is saved as absent, so it follows the defaults of later
|
||||
releases. Set it to `[]` to turn the defaults off. See
|
||||
[Synced folders](SYNCED_FOLDERS.md#excluding-files-with-pdfsignore) for how excluding behaves.
|
||||
|
||||
|
||||
+11
-4
@@ -108,10 +108,15 @@ apply together:
|
||||
lock files, `.DS_Store`, `Thumbs.db`, `desktop.ini`, `.directory`, trash folders, `.nfs*` and
|
||||
`.fuse_hidden*`). Each built-in pattern can be turned off on its own.
|
||||
|
||||
To edit a folder's own rules in the app, open the **Sync** page, then **Folders**, and pick
|
||||
**Excluded Files…** in the folder's menu. It checks every line as you type, and **Check a path**
|
||||
tells you whether a file is synced and which pattern decides. If the file changed meanwhile, for
|
||||
example on another computer, it asks before replacing that version.
|
||||
In the app, open the **Sync** page, then **Folders**. Under the folder list, **Excluded Files**
|
||||
shows how many patterns apply to all synced folders and how many each folder has of its own:
|
||||
|
||||
- **Add Pattern** asks for a pattern and where it applies: all synced folders, or one of them.
|
||||
- **All Synced Folders** opens Preferences → Sync, with every pattern and the built-in ones.
|
||||
- A folder opens the editor for its own rules, which **Excluded Files…** in the folder's menu
|
||||
opens too. It checks every line as you type, and **Check a path** tells you whether a file is
|
||||
synced and which pattern decides. If the file changed meanwhile, for example on another
|
||||
computer, it asks before replacing that version.
|
||||
|
||||
From a terminal:
|
||||
|
||||
@@ -120,6 +125,8 @@ pdfs sync ignore list # the patterns for every synced folder
|
||||
pdfs sync ignore add '*.db' # leave out files ending in .db
|
||||
pdfs sync ignore remove '*.db'
|
||||
pdfs sync ignore reset # back to the built-in patterns
|
||||
pdfs sync ignore add 'cache/' --folder ~/Projects # only in ~/Projects/.pdfsignore
|
||||
pdfs sync ignore list --folder ~/Projects
|
||||
pdfs sync ignore check ~/Projects/app/node_modules
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user