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. For systemd users, a user service called clipmenud is packaged as part of the project.

You may wish to bind a shortcut in your window manager to launch clipmenu.

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'

For a full list of environment variables that clipmenud can take, please see clipmenud --help.


The behavior of clipmenud can be customized through environment variables. Despite being only <300 lines, clipmenu has many useful features, including:

  • Customising the maximum number of clips stored (default 1000)
  • Disabling clip collection temporarily with clipctl disable, reenabling with clipctl enable
  • Not storing clipboard changes from certain applications, like password managers
  • Taking direct ownership of the clipboard
  • ...and much more.

Check clipmenud --help to view all possible environment variables and what they do. If you manage clipmenud with systemd, you can override the defaults by using systemctl --user edit clipmenud to generate an override file.

Supported launchers

Any dmenu-compliant application will work, but here are CM_LAUNCHER configurations that are known to work:


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

Manual installation

If your distribution doesn't provide a package, you can manually install using make install (or better yet, create a package for your distribution!). You will need xsel and clipnotify installed, and also dmenu unless you plan to use a different launcher.

How does it work?

clipmenud is less than 300 lines, and clipmenu is less than 100, so hopefully it should be fairly self-explanatory. However, at the most basic level:


  1. clipmenud uses clipnotify to wait for new clipboard events.
  2. If clipmenud detects changes to the clipboard contents, it writes them out to the cache directory and an index using a hash as the filename.


  1. clipmenu reads the index 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 146 KB
Stars 454
Forks 47
Watchers 17
Open issues 8
Dependencies 0
Contributors 11
Tags 26
Last updated
Last pushed

Top Contributors See all

Chris Down Gravemind Sohalt Mark Stosberg Ferenc Erki Dan Elkouby Kesha Chris Hobbs Thore Bödecker drake-on-mandrake William Casarin

Recent Tags See all

6.0.1 March 24, 2020
6.0.0 March 24, 2020
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

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: 2020-05-08 13:23:55 UTC

Login to resync this repository