/clipr

simple clipboard manager [https://sr.ht/~jintwo/clipr/]

Primary LanguageRustMIT LicenseMIT

Clipr - command line clipboard (pasteboard) manager

Simple MacOS clipboard (pasteboard) manager with cli and emacs interfaces. Under development.

Running

Server

cargo run --bin clipr-daemon -- -c PATH/TO/config.toml

CLI

cargo run --bin clipr-cli -- -c PATH/TO/config.toml <command>

Alias

CLIPR_CLI="PATH/TO/target/debug/clipr-cli"
CLIPR_CONFIG="PATH/TO/config.toml"

alias c="$CLIPR_CLI -c $CLIPR_CONFIG"

Emacs module

cargo build --lib clipr-emacs
cp target/debug/libclipr.dylib <emacs-load-path>/clipr-mode/clipr.so
cp clipr-emacs/src/clipr-mode.el <emacs-load-path>/clipr-mode/
;; Usage example
(use-package clipr-mode
  :load-path "PATH/TO/clipr-mode"
  :bind (:map global-map (("C-c c" . clipr-show)))
  :custom
  (clipr-config-path "PATH/TO/config.toml"))

Keys

List mode

g - refresh

RET - select and close

d - delete entry

q - close

+ - add tag

- - delete tag

f - set filter by tag

c - clear filter

j - jump to tag

S - save state

L - load state

E - edit entry

Edit mode

C-c C-c - save entry (will be added as new one ;) )

C-c C-k - quit edit mode

Tasks

General [1/7]

  • [/] Pinned entries (use letters!). Currently there is no big difference from Tags. Put it in front of list while listing ;) Allow set-by-pin -> because pins should be unique. Convert pins to upper case.

  • Rework select Use different option for specifying selection (and combinations)

  • Masked entries

  • Deadline timeout (for sensitive data)

  • LaunchD plist

  • Save state on quit

  • [?] Limited size. Only after proper implementation of pinned entries.

  • GUI/global menu (tag-based folders?)

Refactoring [1/5]

  • Switch to LINKED-LIST + SET (or w/o). Looks like it will be a lot easier to reorder entries.

  • Split/simplify command handling

  • Maybe actor-like stuff isn't necessary there?

  • More rusty (try to specify lifetimes + remove all .clone)

  • Reduce dependencies

Emacs [1/3]

  • Use removal by range / remove selection in clipr-mode

  • Emacs UI display current filter

  • Multi tag selection

Bugs [1/2]

  • If there is no changes in PB we still allocating NSString

  • After cleanup memory usage doesn't goes down