;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306\307\310\311\304%\210\312\313\314\315\316DD\317\320\321\311\306&\207" [require f s dash ivy custom-declare-group ivy-clipmenu nil "Ivy integration for clipmenu." :group custom-declare-variable ivy-clipmenu-directory funcall function #[0 "\300\301!\206\300\302!\206\303 \207" [getenv "XDG_RUNTIME_DIR" "TMPDIR" temporary-file-directory] 2] "Base directory for clipmenu's data." :type string] 8) #@55 The major version number for the clipmenu executable. (defconst ivy-clipmenu-executable-version 5 (#$ . 558)) #@39 Directory where the clips are stored. (defconst ivy-clipmenu-cache-directory (byte-code "\302\303\304 \305\306!#\"\207" [ivy-clipmenu-directory ivy-clipmenu-executable-version f-join format "clipmenu.%s.%s" getenv "USER"] 7) (#$ . 674)) #@68 Glob pattern matching the locations on disk for clipmenu's labels. (defconst ivy-clipmenu-cache-file-pattern (f-join ivy-clipmenu-cache-directory "line_cache_*") (#$ . 918)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable ivy-clipmenu-history-length funcall function #[0 "\300\301!\206\302\207" [getenv "CM_HISTLENGTH" 25] 2] "Limit the number of clips in the history.\nThis value defaults to 25." :type integer :group ivy-clipmenu] 8) #@34 History for `ivy-clipmenu-copy'. (defvar ivy-clipmenu-history nil (#$ . 1401)) #@70 Parse the label from the entry, X, in clipmenu's line-cache. (fn X) (defalias 'ivy-clipmenu--parse-content #[257 "\300\301\302\301\"A\"\207" [s-join " " s-split] 6 (#$ . 1486)]) #@51 Return a list of the content of all of the clips. (defalias 'ivy-clipmenu--list-clips #[0 "\302\303\304\305\306\307\310\311\312\304\313\314 !\"!\"\"\"!\"\207" [ivy-clipmenu-history-length ivy-clipmenu-cache-file-pattern -take delete-dups -map ivy-clipmenu--parse-content -sort string> -reject s-blank\? -flatten #[257 "\300\301\302!\303#\207" [s-split "\n" f-read t] 5 "\n\n(fn PATH)"] f-glob] 14 (#$ . 1672)]) #@51 Return the CRC checksum of CONTENT. (fn CONTENT) (defalias 'ivy-clipmenu--checksum #[257 "\300\301\302\303\"r\211q\210\304\305\"\216\306\307\310p\310\311\312\313\314 !\"&\210\315 *\262!\207" [s-trim-right generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] call-process "bash" nil "-c" format "cksum <<<'%s'" shell-quote-argument buffer-string] 13 (#$ . 2091)]) #@75 Map the chosen LINE from the line cache its content from disk. (fn LINE) (defalias 'ivy-clipmenu--line-to-content #[257 "\301\302\303!\"!\207" [ivy-clipmenu-cache-directory f-read f-join ivy-clipmenu--checksum] 6 (#$ . 2524)]) #@50 Copy string, X, to the system clipboard. (fn X) (defalias 'ivy-clipmenu--do-copy #[257 "\300!\210\301\302!\207" [kill-new message "[ivy-clipmenu.el] Copied!"] 3 (#$ . 2760)]) #@114 Use `ivy-read' to select and copy a clip. It's recommended to bind this function to a globally available keymap. (defalias 'ivy-clipmenu-copy #[0 "\301\302\303\304 \305\306\307\310&)\207" [ivy-sort-functions-alist nil ivy-read "Clipmenu: " ivy-clipmenu--list-clips :history ivy-clipmenu-history :action #[257 "\300\301!!\207" [ivy-clipmenu--do-copy ivy-clipmenu--line-to-content] 4 "\n\n(fn LINE)"]] 7 (#$ . 2944) nil]) (provide 'ivy-clipmenu)