posix shell x11 clipboard manager
Go to file
yosh 1f3adb21da don't nee that TODO anymore 2024-01-22 22:36:37 -05:00
LICENSE initial commit 2023-12-18 23:37:19 -06:00
README.md add more command line options, general cleanup 2024-01-22 22:28:53 -05:00
config add kde password manager thingy 2023-12-19 11:23:39 -06:00
filter.sh initial commit 2023-12-18 23:37:19 -06:00
shclip-daemon don't nee that TODO anymore 2024-01-22 22:36:37 -05:00
shclip-menu initial commit 2023-12-18 23:37:19 -06:00

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.