Chris Down
f26813c184
clipmenu: Use last-arg syntax that keeps shellcheck happy
2020-03-24 13:49:44 +00:00
Chris Down
7a00f8cf17
clipmenu: Tersify rofi check
2020-03-24 13:49:38 +00:00
Chris Down
f22fce7f04
Use a single line cache file
...
In c7c894a0
, a per-selection line-cache was introduced in order to
overcome some of the limitations of clipmenu at the time (for example,
missing duplicate detection). However, now we have all the features we
need to have a single line cache again, and having multiple line caches
has caused more trouble than it is worth.
For example, maintaining CM_MAX_CLIPS globally is extremely cumbersome,
so we don't do it, and CM_MAX_CLIPS is actually acted on per-selection.
We also have had bugs where we perform actions on cache files without
properly consulting other line caches, and while those can be fixed, the
simplest thing to do now is just to go back to having a single line
cache.
2020-03-23 13:00:14 +00:00
Chris Down
7c3bd5060a
Do $PATH lookup for bash
2018-10-31 08:12:09 +00:00
Chris Down
d76b716d9f
Sort environment variables in --help
2018-08-21 15:39:17 -04:00
Chris Down
e7ec60cd9c
Add documentation for CM_HISTLENGTH
2018-08-21 15:39:07 -04:00
Thore Bödecker
13ad6835a2
make history length configurable through env var
...
Signed-off-by: Thore Bödecker <me@foxxx0.de>
2018-08-21 09:09:59 -04:00
Chris Down
4a3862666f
Always send xsel logfile to /dev/null
...
We don't want this logging to disk, but /dev/stderr doesn't always work
(see #81 ). Let's just stop all logging to avoid more shenanigans.
2018-05-10 17:13:46 +01:00
Chris Down
d82337d226
Add more debugging information when cache entry is missing
...
This would help with #73 .
2018-04-10 11:07:01 +01:00
Chris Hobbs
b73e742c50
Allow use as a rofi script ( #68 )
...
* Allow use as a rofi script
* fixup! Allow use as a rofi script
* fixup! Allow use as a rofi script
* fixup! Allow use as a rofi script
2018-03-09 12:50:48 -08:00
Chris Down
4347465b78
Force LC_ALL=C for clip sort
2018-02-21 17:33:11 +00:00
Chris Down
c7c894a023
Use separate line cache for each selection
2018-02-20 10:29:35 +00:00
Chris Down
f34bd68797
Bump major_version to 4
2017-10-25 01:57:35 +01:00
Chris Down
6855d24e3a
Prefer $XDG_RUNTIME_DIR for storage
...
Closes #51 .
2017-10-24 19:14:23 +02:00
Chris Down
2cd2287612
Add more documentation on -h/--help for clipmenu{,d}
2017-05-31 20:03:06 +01:00
Chris Down
f0d09c7692
Use $TMPDIR as base for cache directory
...
Closes #38 .
2017-05-30 09:03:35 +01:00
Chris Down
e315d8262c
Forcibly add -dmenu if using rofi as $CM_LAUNCHER
2017-03-19 08:00:27 +00:00
Chris Down
abe461461b
Add clipmenu --help
2017-03-19 07:53:51 +00:00
Chris Down
e65b51b33c
Use CM_* env vars
2017-03-19 07:53:26 +00:00
Chris Down
117385015b
Add $CM_LAUNCHER env variable
2017-03-19 07:40:19 +00:00
Chris Down
eecc031718
Use stderr for xsel logging when detached
2017-03-19 07:38:34 +00:00
Chris Down
2acece7dce
Put $major_version in cache_dir to avoid upgrade incompatibility
2017-02-17 12:01:42 -05:00
Chris Down
683f57484f
Remove xclip support
...
Pretty much everyone runs with xsel, so xclip support is becoming more
and more questionable. Just have people use xsel.
2017-02-17 11:50:52 -05:00
Chris Down
8b4a047768
Use awk instead of uniq to only keep latest, even if not adjacent
2017-01-07 14:30:55 +00:00
Chris Down
7c713d5673
Merge branch 'perf' into develop
2017-01-06 17:34:13 +00:00
Chris Down
fe8ca2e3ca
Don't mention non-existing clipmenu-fsck
2017-01-06 17:28:31 +00:00
Chris Down
1daaeda6f3
Remove print_debug_info, this was never very useful
2017-01-06 16:47:29 +00:00
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
6edf3c437b
perf: Add naive but performant path
2017-01-06 14:04:37 +00:00
Chris Down
f0fe96955a
perf: Don't use printf with ordered_selections
...
printf is really, really slow with large arrays of strings. Switching to
this results in about a 50% performance improvement.
2017-01-06 12:52:34 +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
3e50f9460a
Uniquify adjacent identical selection items
...
This is a potential solution for #30 .
2016-11-03 20:36:58 -06:00
Chris Down
7c87f80234
Add comments to clipmenu where it could be helpful for future devs
2015-09-06 14:01:06 +01:00
Chris Down
20e9303def
Do not deduplicate lines before sending to dmenu
...
I don't remember why I added this in 0418bf2
(sigh...), but it seems
unnecessary.
2015-09-06 13:58:21 +01:00
Chris Down
66301f4f5f
Remove ability to override default dmenu lines with CLIPMENU_LINES
...
If people want to use this, they can just pass `-l <n>` to clipmenu and it will
be passed through to dmenu. I've checked that passing `-l` twice works fine and
accepts the second passed `-l` optarg as the definitive one.
2015-08-22 23:11:12 +01:00
Chris Down
b851c04d3e
Set nullglob to avoid "bad array subscript" when no files exist
2015-08-22 19:41:19 +01:00
Chris Down
190722f909
Revert "Remove CLIPMENU_LINES support"
...
This is a sensible default and probably should remain.
This reverts commit 10f0ffe6cb
.
2015-08-22 19:28:15 +01:00
Chris Down
95b8cd5698
Limit number of characters displayed in "first line" dmenu selector to 500
...
Fixes #14 .
2015-08-22 13:17:12 +01:00
Chris Down
d1bdebf03f
xsel: Pass -i
flag to fix mysterious issue with i3-msg
...
Fixes #11 .
2015-08-07 19:13:53 +01:00
Chris Down
10f0ffe6cb
Remove CLIPMENU_LINES support
...
You can just pass this as `-l`, I don't remember why I did this.
2015-08-07 18:29:26 +01: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
bbd9b65a00
Allow overriding dmenu_lines using CLIPMENU_LINES
...
Fixes #3 .
2015-02-08 17:45:39 +00:00
Chris Down
33fc9dd33e
Show first non-empty line in dmenu
...
Fixes #4 . As first suggested in a fork by @milouse.
2015-02-08 17:43:10 +00: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
3a4a76dcb9
Pass arguments through to dmenu
2014-02-05 18:24:13 +08:00
Chris Down
4ab52c5747
Use xsel when copying to clipboard, not xclip
2014-02-05 17:48:03 +08:00
Chris Down
700a6b27dc
Copy chosen line's content to the clipboard
2014-02-05 17:16:42 +08:00
Chris Down
e46b37c793
Add script to run dmenu with selections
2014-02-05 17:14:28 +08:00