Clipboard Monitor
Desktop only. The web interface and fatrat-tui have no clipboard monitor.
The clipboard monitor watches what you copy. When the copied text holds a link that matches one of your patterns, FatRat offers to download it.
What it watches
It can watch two clipboards. Each one is turned on separately, and both are off by default.
- Enable for global clipboard
- The normal clipboard: text you copy with Ctrl+C or a Copy menu item.
- Enable for selection clipboard
- On Linux, the text you select with the mouse (the X11 primary selection), which you can paste with the middle button. Other systems have no selection clipboard, so this option does nothing there.
What happens when a link matches
FatRat opens the New transfer dialog with the matching links filled in. Nothing is added until you click OK in that dialog, so you can still change the queue or the destination, or cancel. The dialog starts with the queue selected in the main window, or the first queue if none is selected. If the dialog is already open, the new links are added to the ones in it. If FatRat has no queue yet, nothing happens. See Transfers and Queues.
Only the parts of the text that match are used. The rest of the copied text is ignored, and a link found twice is added once.
The patterns
The links to catch are described by regular expressions (Perl-compatible, as in QRegularExpression). These are the defaults:
(https?|ftp)://.+\.zip (https?|ftp)://.+\.rar (https?|ftp)://.+\.iso
So by default FatRat catches http://, https:// and ftp:// links to .zip, .rar and .iso files. These defaults apply to a FatRat that has no saved patterns. If you already saved the list of patterns in the settings, FatRat keeps your list as it is, and an older list that has (http|ftp) still does not catch https:// links. To catch them, change (http|ftp) to (https?|ftp) in each pattern.
How matching works
- Each pattern is searched for in the whole copied text, not line by line, and every place where it matches becomes a link.
- The patterns are tried in the order of the list. Text that one pattern has matched is taken out before the next pattern is tried.
- Matching is case-sensitive, so
\.zipdoes not match.ZIP. Put(?i)at the start of a pattern to ignore case. - A dot (
.) also matches a line break. If you copy several links at once,.+can therefore swallow everything from the first link to the last one and make it one long "link". To match a link only up to the next space or line break, use\S+instead, for example(https?|ftp)://\S+\.zip.
Settings
The settings are in Settings → Settings..., on the Clipboard monitor page. The Settings menu also has a Clipboard monitor item that opens that page directly.
The page has the two check boxes described above and the list Regular expressions to catch:
- Add adds an empty line to the list. Type the pattern and press Enter.
- Edit lets you change the selected pattern.
- Delete removes the selected pattern.
Click OK to save your changes. They take effect straight away.