paste manager
A simple script to create a menu driven database for storing little bits of information. The database is a double colon delimited plain text file queried with standard unix tools.
This is NOT for passwords. Do NOT use it for them. See my own
dpw or
pass for a solution there.
Output is controlled via a small c program called pm-fmtdb, see the top
of the file for adjusting the format.
Works best with dmenu fuzzy finder patch. Utilizes list mode by default.
Menu format can easily be customized by editing the script near the
top of the pm shell script.
Database format is fairly simple:
ID::Created::Updated::Name::Content
It's a menu driven application with no CLI options, users are encouraged to write programs that directly talk to the database, or extend it to suit their needs.
Demo video
Installation
# make install
You'll need dmenu installed. You may also wish to bind a hotkey to run the new
pm command
Configuration
Environment variables:
XDG_SESSION_TYPE if set to wayland will utilize wl-copy from the
wl-clipboard package and wtype instead of xclipboard and xdotool
respectively. bemenu is used in place of dmenu on Wayland as well.
PASTE_MANAGER_FILE can override the file location
PASTE_MANAGER_LINES overrides the number of lines displayed by dmenu
PASTE_MANAGER_X_SELECTION sets the clipboard selection, you probably want to
leave it set to clipboard, the default. ( xorg only )
Edit the source code for further tweaks. The one people may have the most
interest in is the format sent to dmenu, that's controlled via the small c
program 'pm-fmtdb' near the top of the file.
MacOS
You'll need a menu, and you'll probably want a hotkey daemon.
Bugs
Probably. This was written in just a few hours. Email me if you find any, I'll fix them.
Not-bugs
Multi line snippets are entirely unsupported.
