CopyQ Cheatsheet

We used AI while writing this content.

Clear history : Remove all unpinned items

copyq 'for (var i = size() - 1; i >= 0; --i) {
  // Read pinned flag
  var pinned = str(data(i, "application/x-copyq-item-pinned"));
  // Only remove if not pinned
  if (pinned == "" || pinned == "0")
    remove(i);
}'

Tip : set a keyboard shortcut to this command. In GNOME, go to keyboard>shortcuts>custom shortcuts.