A very simple clipboard manager script using xclip and dmenu
- Clipboard History(only text)
- Preserves the copied content in the clipboard if the source application is closed
- Enable/Disable history
- xclip
- dmenu
- xdotool (if using instant pasting)
make install
make uninstall
-
Start the clipmanager script. This script needs to run all the time, so autostart it somehow. For example in your xinitrc
clipmanager &
-
Bind the clipmenu script to a key combo (here alt + y). For example using sxhkd
mod1 + y clipmenu
-
For pasting on select (depends on xdotool)
clipmenu -p
-
you may neet to set xkbmap to properly write special characters
setxkbmap us/de/...
-
Now you can start copying and pasting
-
Use the key combo for selecting an item in the history
-
Use clipctl for enabling/disabling the history. This might be useful when copying passwords
clipctl enable clipctl disable
- It checks the copied content against a preferred list of file types (pref_type) and tries to workout the correct one. If it fails you probably use some obscure file type. You can add it to the list. Use the logs to workout the file type if you dont know it.
- If the copied content is text it adds a history entry by writing the copied content to a file in the history directory (.cache/clipboard_history/)
- It looks at the history directory, works out a preview and is using dmenu to let you select one
- Sends signals to the clipmanager script for enabling/disabling history
- The history size and some other variables can be changed in the script itself.
- The log file is in your cache directory (~/.cache/clipmanager.log)