Chris Down
8885306970
perf: Don't use date, use CRC instead
...
We don't need to sort by date now that we record in $cache_file, which
does it naturally for us.
2017-01-06 14:53:59 +00:00
Chris Down
e8ba60e432
Have clipmenud cache first lines
2017-01-06 12:05:36 +00:00
kesha-on-disc
892fe73110
Add --logfile /dev/null
to xsel commands
2016-11-30 09:11:10 +01:00
Chris Down
2ab5b5b502
Only take ownership of clipboard if we would not skip this clip
...
Fixes #34 , an issue with pcmanfm GUI file copy/paste.
2016-11-09 11:38:41 +00:00
Chris Down
9efd96b405
blank check: Use [:space:], not [:blank:]
...
This is semantically more correct. Previously, in the most common case,
pastes with only `\n` would result in `bad array subscript`.
Fixes #31 .
2016-11-07 08:46:40 +00:00
Chris Down
c5f101d996
Use -o when running xsel
...
xsel` without `-o` even though it has the same *end* result, has
different internal logic. Specifically, it seems to do things with the
PRIMARY selection that cause weird behaviour (like causing applications
like urxvt to deselect their selection, see #33 ).
2016-11-05 12:06:15 -06:00
Chris Down
6e6c4ed430
Fix blank check
...
lol where da unit tests at
2016-11-02 16:55:39 -06:00
Chris Down
e8ebe8b27d
Add tons of debug logging
...
I'm hoping this will help debug #33 , #32 , and #26 .
2016-11-02 08:49:45 -06:00
GSI2016
05431fe645
replaced md5 logic by using current time with nanoseconds (refs #20 )
...
This strongly improves performance for clipmenud.
2016-06-22 16:59:51 +01:00
Chris Down
1fcc55a48d
Silence shellcheck warning about mkdir -pm
2016-06-22 16:50:10 +01:00
Chris Down
45ac24d625
Remove partial clips
2015-10-07 19:06:47 +01:00
Chris Down
4dfbfed9e2
Tidy up clipboard ownership code to be 80 characters wide
2015-09-14 13:41:31 +01:00
Streetwalrus Einstein
a613aa6b2e
Don't take ownership of PRIMARY, comment about this behavior
2015-09-14 15:01:22 +03:00
Streetwalrus Einstein
065e91a5fc
Take over the clipboard to persist it after the owner quits
2015-09-11 23:29:14 +03:00
Chris Down
72e15005e9
Reduce default poll time down to 0.5 seconds
...
This is configurable via an environment variable rather than a command line
option, as I'm not expecting many people really need to change this thing.
I profiled the change from 1 -> 0.5 seconds on an old P4, and saw pretty much
no difference in CPU usage, whether there were new clipboard entries or not.
Closes #12 .
2015-09-06 01:46:21 +01:00
Chris Down
d4390324f5
Document why we add/remove an "x" when grabbing the clipboard data
2015-07-27 20:19:41 -07:00
Chris Down
d246b63f27
Set perms to 0700 when creating cache dir
2015-07-27 20:16:13 -07:00
Chris Down
0418bf2e6d
Sort selections by recency
...
Fixes #5 .
2015-07-27 20:08:10 -07:00
Chris Down
5b2754868b
Make clipmenu cache directory user-specific
...
Fixes #2 .
2015-07-27 20:01:41 -07:00
Chris Down
35521af0ec
Make sure that the clipboard data is not just whitespace before copying
...
This avoids getting a bad array subscript, and polluting the menu.
Thanks to @kaihendry for noticing this issue and suggesting a fix. This commit
is a modified version of his suggestion, using [:blank:] instead of [:space:].
Closes #7 .
2015-07-27 20:00:21 -07:00
Chris Down
2cbfb4ef88
Add xclip support
...
Fixes #1 . As first suggested in a fork by @milouse.
2015-02-08 17:40:36 +00:00
Chris Down
c40456caa0
Do not write to file if last selection data is the same
2014-02-05 18:52:03 +08:00
Chris Down
fecfede140
Do not add newline when copying clipboard data to file
2014-02-05 18:06:47 +08:00
Chris Down
fd8b6bfe37
Check that there really is some data before storing it
2014-02-05 18:02:39 +08:00
Chris Down
dd9a041846
Copy from both clipboard and primary selections
2014-02-05 17:45:37 +08:00
Chris Down
4a85fd767c
Add clipmenu daemon
2014-02-05 16:57:11 +08:00