test | ||
.travis.yml | ||
clipmenu | ||
clipmenud | ||
LICENSE | ||
README.md |
clipmenu is a simple clipboard manager using dmenu and xsel.
Usage
Start clipmenud
, then run clipmenu
to select something to put on the
clipboard.
All args passed to clipmenu are transparently dispatched to dmenu. That is, if you usually call dmenu with args to set colours and other properties, you can invoke clipmenu in exactly the same way to get the same effect, like so:
clipmenu -i -fn Terminus:size=8 -nb #002b36 -nf #839496 -sb #073642 -sf #93a1a1
How does it work?
The code is fairly simple and easy to follow, you may find it easier to read there, but it basically works like this:
clipmenud
clipmenud
polls the clipboard every 0.5 seconds (or another interval as configured with theCLIPMENUD_SLEEP
environment variable. Unfortunately there's no interface to subscribe for changes in X11, so we must poll.- If
clipmenud
detects changes to the clipboard contents, it writes them out to the cache directory.
clipmenu
clipmenu
reads the cache directory to find all available clips.dmenu
is executed to allow the user to select a clip.- After selection, the clip is put onto the PRIMARY and CLIPBOARD X selections.