1f3adb21da | ||
---|---|---|
LICENSE | ||
README.md | ||
config | ||
filter.sh | ||
shclip-daemon | ||
shclip-menu |
README.md
shclip
shclip
is an X11 clipboard manager and menu implemented in POSIX shell, largely inspired by clipmenu
dependencies
- A POSIX compliant shell
- An implementation of POSIX Utilities (
coreutils
,bsdutils
,busybox
, ...) - An implementation of
file(1)
that supports-b
and-i
for mime-types (yours should) ed
(mentioning this separately since many unixes/distributions have it separately)clipnotify
- A newline-delimited menu program (
dmenu
,rofi
,bemenu
,fzfmenu
, ...) - (Optional, but recommended)
notify-send
using
put shclip-{daemon,menu}
in your $PATH
and start shclip-daemon
in a way where it can read $DISPLAY
. everything should Just Work, hopefully. to use the menu, run shclip-menu
to see the command-line opticons for shclip-daemon
, run shclip-daemon -h
shclip
reads a config file at $XDG_CONFIG_HOME/shclip/config
and reads filters from $XDG_CONFIG_HOME/shclip/filter.sh
. if config
doesn't exist, then the defaults as specified in the file are used. if filter.sh
doesn't exist, then filtering won't happen whether it's enabled or not.
if filtering is enabled, every text clip will be sent to the stdin of filter.sh
and be replaced by its stdout. A simple replacement filter is provided as an example
shclip-menu
should hopefully be straightforward. you have the option to copy a previous clip, delete any individual clip (or all clips), edit any individual clip, toggle caching clips, and toggle clip filtering
rationale
I made this because I really liked clipmenu
, but felt as if it fell short in very specific aspects that I didn't like (mainly, I wanted image support). I decided to use posix shell because I'm more comfortable with it than including bashisms in my scripts, and also to maybe serve as being useful for users of more minimal shells or other unixes.