Commit Graph

76 Commits

Author SHA1 Message Date
Ferran Basora
10eff07d16 Fix another source of flickering
When you have many keystrokes in the `stdin` (pushing long keys), we are
saying to `termion` to print many things. Throttling this.
2020-07-10 09:43:33 +00:00
Peter Bartyik
a36d30594c fix flicker 2020-07-10 11:41:22 +02:00
Ferran Basora
ba015b6b89 Format code 2020-07-02 16:26:51 +00:00
Ferran Basora
34d8fa03e9 Adapt old osc52 implementation to swapper and rustbox era
OSC52 support was implemented before two major refactors in tmux-thubs:

- Decouple tmux-thumbs from tmux
- Removal of rustbox with termion

I'm not sure if is the right decision, but I moved the arguments to
swapper land because it looks like more tmux related. If it makes sense
for other terminals to support this we can move it back.

The question we need to answer here if it makes sense for standalone `thumbs`:

```
cat sample/test1 | ./target/release/thumbs --osc52
```
2020-05-30 15:45:37 +00:00
Jiahao Li
25ed6dc78f Adds OSC52 copy escape sequence support
Currently I can only get the copied content in the tmux copy buffer, not in the
system clipboard. This commit adds an option to print the copied text as a
OSC52 copy escape sequence, which in supported terminals (tested in iTerm) will
be copied to the system clipboard.
2020-05-30 15:03:05 +00:00
Ferran Basora
794621f526 cargo fmt 2020-05-30 14:44:28 +00:00
Ferran Basora
2bb8900e6b Fix bug with no hints 2020-05-15 16:30:09 +00:00
Thomas Preston
e006b06ea0 swapper: Make quotes optional in key-value regex
The regular expression describing the tmux user options expects to find
quotes around the value. However, in at least tmux 3.0a the
`show-options -g` command doesn't display quotes around the values,
which means the regex fails.

For example, the current regex will fail to find these user options:

	$ tmux -V
	tmux 3.0a

	$ tmux show -g | grep -E "@thumbs"
	@thumbs-bg-color default
	@thumbs-fg-color green
	@thumbs-hint-bg-color default
	@thumbs-hint-fg-color blue
	@thumbs-select-bg-color default
	@thumbs-select-fg-color green

Make the quotes optional so that these options are picked up.

Fixes #33
2020-05-10 13:28:51 +02:00
Ferran Basora
25a3856aac Add support for docker images 2020-05-05 18:30:47 +00:00
Ferran Basora
e7d43e8ec2 Better handling of target param 2020-05-04 22:06:55 +02:00
Ferran Basora
7c739ce5c5 Use termion AlternateScreen 2020-05-04 22:06:55 +02:00
Ferran Basora
53af67e6fa Fix path with ~ 2020-05-04 22:06:55 +02:00
Ferran Basora
122c26b8b0 Fix issue with multi selection 2020-05-04 22:06:55 +02:00
Ferran Basora
6ef320d676 Fix line alignment 2020-05-04 22:06:55 +02:00
Ferran Basora
8b4297d925 Avoid extra clear 2020-05-04 22:06:55 +02:00
Ferran Basora
eeb2b5f98f Handle better wrong executions of tmux-thumbs 2020-05-04 22:06:55 +02:00
Ferran Basora
1cba9ce530 First termion attempt 2020-05-04 22:06:55 +02:00
Ferran Basora
bef83eef38 Fix clippy suggestions 2020-05-04 22:06:55 +02:00
Ferran Basora
b5d5d41310 Fix swapper with active pane 2020-01-22 09:09:04 +00:00
Ferran Basora
e3faf2e6fe Add support scroll mode in tmux 2020-01-20 20:44:46 +01:00
Ferran Basora
4262b1c45d Fix scripts 2020-01-19 21:21:07 +01:00
Ferran Basora
a1c4977ed1 Rename binary 2020-01-19 21:21:07 +01:00
Ferran Basora
741a5bd927 Add multi selection 2020-01-19 21:21:07 +01:00
Ferran Basora
8ae9fa9137 Decouple thumbs from tmux 2020-01-19 21:21:07 +01:00
Abin Simon
a1792ea196 add select-bg-color 2019-12-11 18:59:10 +01:00
Ferran Basora
f15f02c26b Exclusive commands
Before this commit `command` and `upcase_command` where executed if you
pressed an uppercase key. This can force the user to have a innocuous
lower case command if they want to execute together.

Now they can be totally independent.
2019-12-10 07:49:07 +01:00
Ferran Basora
fb7e6da20a Fix command and paste command arguments
Improve flexibility in `command` and `upcase-command` replacing `{}`
with the selected hint.
2019-12-04 09:16:33 +00:00
Ferran Basora
094475faab Add support for IPFS CIDs 2019-11-17 17:44:08 +00:00
Ferran Basora
3390330c0c Fix format 2019-10-03 16:52:05 +00:00
Ferran Basora
2ac8bc25ca Match @ in paths 2019-10-03 16:12:38 +00:00
James O. D. Hunt
26a6c2a528 view: Add @thumbs-contrast option
Add an option to surround the hint character with square brackets
(for example `[a]` rather than `a`). This is the equivalent to the
following `tmux-fingers` configuration option [1] and is useful to make
the hint more visible:

```
set -g @fingers-compact-hints 0
```

[1] - https://github.com/Morantron/tmux-fingers#fingers-compact-hints

Signed-off-by: James O. D. Hunt <jamesodhunt@gmail.com>
2019-08-02 21:59:34 +01:00
Rouven Czerwinski
aaf0b3ca85 Add ipv6 matching support 2019-06-18 09:12:58 +02:00
Ferran Basora
b6d0a3d530 Format code 2019-05-02 17:04:53 +00:00
Ferran Basora
b900325319 Fix path pattern, again 2019-05-02 16:26:02 +00:00
Ferran Basora
e1f50601e1 Format code 2019-05-01 21:06:55 +00:00
Ferran Basora
080bc33c62 Add support for markdown urls 2019-05-01 21:04:47 +00:00
Ferran Basora
84ae7d3f4d Fix conflict between path and url 2019-05-01 20:36:57 +00:00
Ferran Basora
cc831fd10f Register matched pattern 2019-05-01 20:36:40 +00:00
Ferran Basora
8491dd0e14 More reliable tests 2019-05-01 19:29:13 +00:00
Ferran Basora
91cd2cc3d3 Avoid : in paths 2019-03-20 18:22:22 +00:00
Ferran Basora
64f1473551 Format rules with rustfmt 2019-03-17 20:16:55 +00:00
Ferran Basora
c828ff39d7 Fix bug with reverse navigation 2019-03-12 22:41:42 +00:00
Ferran Basora
1a6cc7a596 Fix breakline bug, again 2019-03-12 22:28:58 +00:00
Ferran Basora
45d15bf03a Fix bug in selection navigation 2019-03-12 22:27:21 +00:00
Ferran Basora
4a9d916a2b Fix selection glitch 2019-03-12 22:17:06 +00:00
Ferran Basora
c8769553f9 Fix breakline problems 2019-03-11 20:34:51 +00:00
Ferran Basora
08a2bf8972 Custom regexps 2019-03-07 18:01:48 +00:00
Ferran Basora
6a43364f1c Fix issue with reverse and long hint 2019-03-06 00:03:50 +00:00
Ferran Basora
cd348adc18 Pane swaping working 2019-03-05 23:07:07 +00:00
Ferran Basora
9db4c9f55e New view struct to manage the UI 2019-03-03 18:56:00 +00:00