Clipboard management using dmenu

License: Other

Language: Shell

Keywords: clipboard, clipboard-buffer, clipboard-management, dmenu, shell, simple, suckless


clipmenu is a simple clipboard manager using dmenu (or rofi with CM_LAUNCHER=rofi) and xsel.




Start clipmenud, then run clipmenu to select something to put on the clipboard.

A systemd user service for starting clipmenud is included at init/clipmenud.service.

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'

You can remove clips with the clipdel utility, see clipdel --help.


Several distributions, including Arch and Nix, provide clipmenu as an official package called clipmenu.

If your distribution doesn't provide a package, you can run the scripts standalone (or better yet, package them!).

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:


  1. clipmenud uses clipnotify to wait for new clipboard events. If clipnotify is not present on the system, we poll every 0.5 seconds (or another interval as configured with the CM_SLEEP environment variable).

    You can also bind your copy key binding to also issue CM_ONESHOT=1 clipmenud. However, there's no generic way to do this, since any keys or mouse buttons could be bound to do this action in a number of ways.

  2. If clipmenud detects changes to the clipboard contents, it writes them out to the cache directory.


  1. clipmenu reads the cache directory to find all available clips.
  2. dmenu is executed to allow the user to select a clip.
  3. After selection, the clip is put onto the PRIMARY and CLIPBOARD X selections.

Project Statistics

Sourcerank 8
Repository Size 92.8 KB
Stars 391
Forks 43
Watchers 14
Open issues 18
Dependencies 0
Contributors 8
Tags 24
Last updated
Last pushed

Top Contributors See all

Chris Down Gravemind Dan Elkouby Sohalt Chris Hobbs Thore Bödecker drake-on-mandrake Kesha

Recent Tags See all

5.6.0 November 20, 2018
5.5.1 November 03, 2018
5.5.0 August 21, 2018
5.4.0 May 10, 2018
5.3.1 May 09, 2018
5.3.0 April 22, 2018
5.2.0 April 22, 2018
deletion_bug_1 April 07, 2018
5.1.0 March 09, 2018
5.0.1 February 21, 2018
5.0.0 February 20, 2018
4.1.0 February 08, 2018
4.0.1 October 30, 2017
4.0.0 October 25, 2017
3.2.0 March 19, 2017

Interesting Forks See all

A simple clipboard manager using dmenu.
Shell - Last pushed - 4 stars

Something wrong with this page? Make a suggestion

Last synced: 2019-10-24 03:44:09 UTC

Login to resync this repository