Giter VIP home page Giter VIP logo

urxvt-perls's People

Contributors

amosbird avatar baskerville avatar lamberta avatar lvancrayelynghe avatar meh avatar nmeum avatar ramok avatar rnhmjoj avatar seletskiy avatar smerrill avatar tim-smart avatar vifon avatar woky avatar xyb3rt avatar yath avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

urxvt-perls's Issues

updated release

Hej!

Would it be possible to bump the release once again to include all the fixes since 2.1? I'd like to submit a package to the voidlinux repos.

Regards,
nem

URxvt.clipboard.autocopy and block selections

Yanking normal or line selections updates both the primary selection and the clipboard when autocopy is on. But block selections yanks updates only the primary selection, despite the value of autocopy. This is pretty strange.

Copy selection made with keyboard-select to clipboard

Hi first of all, I want to thank you for the awesome extensions. Everything works fine so far.
My question is, if there is any possibility to copy the test selected with keyboard-select to clipboard instead of primary. I tried to do it myself, but as I don't know perl, I wasn't able to do this

url-select: match the first URL

Hello,

Thanks for these tools, I use them every day. It saves me a lot of keystrokes and trackpad gestures, love it.

The default behavior of url-select match the last url of the screen. Is there a chance to add a new option to define the matching order ?

Thanks

Use clipboard for keyboard-select

Is it possible to add a configuration in ~/.Xresources so that we can use clipboard rather than primary to save the selected text in keyboard-select? Thanks.

keyboard-select highlighting breaks when cursor reaches top of terminal

Steps to reproduce

  • dmesg (produce some text)
  • Enter keyboard-select Meta Esc
  • Enter line selection mode Shift V
  • Move cursor to top of terminal
  • Highlighting stops when you continue past this point

All the lines seem to be selecting just fine, as I can yank/paste the entire selection.

Also, when you yank the selected lines with y, the upper lines that didn't get highlighted are now highlighted, probably because the script inverts the color of the entire selection.


Selecting lines


After yank

Fail to Alt+V paste from clipboard

OS: Ubuntu 10.04 LTS
Error messages when I pressed Alt+V (intend to paste from clipboard):

urxvt: Can't locate object method "tt_paste" via package "urxvt::term" at (eval 80) line 4.

but Alt+C (copy) is work.

BTW, in Ubuntu 11.10, both Alt+C and Alt+V would work.
That is weird...

my .Xdefaults config:

URxvt.perl-lib: /home/goldie/.urxvt
URxvt.perl-ext-common: default,matcher,tabbed,clipboard,selection-autotransform
URxvt.keysym.M-c: perl:clipboard:copy
URxvt.keysym.M-v: perl:clipboard:paste
URxvt.keysym.M-C-v: perl:clipboard:paste_escaped

[RFE] Add yy command

It would be useful to copy the current line to the clipboard efficiently as it is a frequent operation.

allow keyboard-select to call selection-pastebin:remote-pastebin

Urxvt comes with a pastebin plugin (selection-pastebin) which can be triggered by calling selection-pastebin:remote-pastebin
Since:

  1. people that use your selection plugin, well.. use your selection plugin before pastebinning anyway.
  2. it's more convenient to hit a single key (i.e. when selection plugin is active) rather than going out of selection plugin and then hitting a modkey+key, and it makes this keybind unavailable for other actions.

So I would like a key in the selection plugin to invoke the selection-pastebin command selection-pastebin:remote-pastebin, maybe 'p' ?

Multiline urls

When a url spans accross several lines in the terminal, only the first line part is selected.
It should select the whole url rather than the truncated part

Partial URL Match

The following URL:

http://en.wikipedia.org/wiki/Dunning–Kruger_effect

is parsed as:

http://en.wikipedia.org/wiki/Dunning

Poor Performance in `url-select' With Giant Non-Terminating Line of Text

I encountered this problem when I was playing around with recently-used.xbel file, the freedesktop bookmark file, consists of lots of URIs. While doing cat recently-used.xbel, urxvt performs just fine. But when I do tr -d "\n" < recently-used.xbel (joining all the lines), urxvt just hangs. Unfortunately I don't know any perl at all so I cannot really debug the code myself. I'm using rxvt-unicode (urxvt) v9.12 - released: 2011-06-29, perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-thread-multi on Arch Linux and urxvt-perls is latest master.

error in url-select script

Hello,

There seems to be an error in the url-script.

perl url-select
Bareword "urxvt::RS_Uline" not allowed while "strict subs" in use at url-select line 71.
Execution of url-select aborted due to compilation errors.

I am not sure if this is a real bug or not. The reason I tried the "perl url-select" is because I keep getting these errors, whenever I start "urxvt &"

urxvt &
[1] 4895
--(~/dev/conf/urxvt/urxvt-perls)-----------------------------------------------------------------------------------------------------------(pts/0@backup)--
urxvt: perl extension 'url-select' not found in perl library search path

Thanks and sorry for the bother
Joe

Install location

Since rxvt-unicode 9.14, perl extensions can be placed in $HOME/.urxvt/ext and urxvt will look there automatically. Might be a useful addition to the README, enabling more portability; your call. Thanks for putting these together!

shortcut to expand url match to the next line

Great scripts. One thing is missing: I hate it when the URLs are so long that they span more than one line. Can you expand the keyboard interface for your URL grabber to continue after a newline?

clipboard: paste and paste_escaped forever hanging

[Using FreeBSD, Arch Linux default URxvt 9.15 package, and urxvt-perls from github]

Hi,

I just noticed an annoying itch when using PRIMARY for paste.

URxvt.clipboard.pastecmd: xclip -o

If I select text in URxvt and then call clipboard:paste or clipboard:paste_escaped from the same terminal, then it hangs hangs forever.

It does not happen if I call xclip -o (or xsel -o) manually, nor if I call the aforementioned commands from another terminal.

Seems like that the subfunction hangs at

my $str = `$self->{paste_cmd}`;

If I kill xclip it kills the urxvt session that called it.
If I use xclip -quiet -o, then killing xclip will not kill urxvt, and the session will resume.

Xresources :

URxvt.perl-ext-common  : keyboard-select,clipboard
URxvt.keysym.C-M-v:       perl:clipboard:paste
URxvt.keysym.C-M-c:       perl:clipboard:paste_escaped
URxvt.clipboard.pastecmd: xclip -o -quiet

Cheers.

Allow terminal wrapped urls in ncurses based programs

When I receive a particularly long link in an e-mail and it wraps, only the first line is highlighted. This occurs in Mutt (and I assume other ncurses based programs), but not in regular operation without a TUI. I assume it occurs because the text is manually placed instead of being wrapped.

This will not work for all cases (for example, if a sidebar is being used), and there may be a more elegant solution, but one way to perhaps solve this in the majority of cases would be to, if at the last character of line and still in a matching URL, allow the next line to continue it.

It is quite possible that this sucks too much to implement it, I just wanted to get your thoughts on it, since my main use of URL selection is within Mutt.

You can see this here: http://imgur.com/83WrrN9

nothing happening on paste

Thanks for sharing these great scripts!

I have placed the clipboard script into my own urxvt perl folder (its not the only one I'm using) and added a keybinding for Control-v to trigger a paste, but nothing happens.

I'm on perl 5.18 on debian. This broke a few of my other scripts - is perl 5.18 compatible with your script?

Updated Release

Would it be possible to get an updated release? I've been using the clipboard autocopy option for a while now, and it seems stable to me. (The Arch Linux urxvt-perls community package lacks the autocopy feature, since it is based on the last repo release.)

Is Meta-Escape <A-Esc> or <Win-Esc>?

My keyboard don't have Meta key.

I searched Meta, somebody said it is equivalent to Atl or Win.

But when I try <A-Esc> or <Win-Esc>, Terminal has no change.

url-select: selection of long urls

When urxvt wraps a line containing an url, url-select only catches the first line.

That is, for example, if the window is wide enough for the url to be displayed in one physical line, url-select will underline the whole url. If the url needs to be wrapped, only the first line will be underlined. This seems to happen only in terminal applications, although apparently not when working on the shell proper.

The attached images (displaying a long url in vim in a wide window and a not so wide one) show what I mean.

Thanks!

screenshot
screenshot2

highlightColor not honored

The selections of urxvt-perls always use inverted fg/bg colors for the highlight, no matter what the value of the highlightColor resource is. The builtin mouse selection of urxvt does honour this setting, though.

I'm not sure whether this is a defect in the perl api or in urxvt-perls itself. There is urxvt::SET_COLOR that may help.

keyboard-select: identify current mode

Not really a bug, more of a usability thing. Could keyboard-select plugin be modified such that it would tell you that you're in "vim normal" mode rather than regular typing mode?

Perhaps create a bar at the bottom of the urxvt window when you're in that mode? Otherwise it gets confusing with multiple terminals open, especially since in vim normal mode is the default, but in terminal insert mode makes more sense to be the default.

url-select triggers browser whenever button is released on a URL

The relevant X resources are:

URxvt.perl-ext-common:  default,url-select
URxvt.urlLauncher:      /usr/bin/firefox
URxvt.urlButton:        1

Steps to reproduce:

  • Type, for example, the following text in urxvt:

    foo http://www.example.com bar

  • Select text with mouse button 1, pressing down at f, and releasing anywhere in the middle of the URL, say a.

  • The browser will be launched for the URL. This is unexpected.

The same problem does not happen with the matcher perl extension.

url-select.button gets passed through to terminal Vim (with mouse=a)

When using "urxvt-perls/url-select" instead of "matcher" to open a link (using button=2, middle mouse), the click gets passed on to Vim running in the terminal (additionally to open the URL), where the X selection gets pasted then.

This does not happen when using "matcher" (also with button=2), or when clicking a link in the "normal shell" (zsh, not running Vim).

I am using set mouse=a in Vim. The default set mouse= does not trigger this behavior of additionally pasting.

My workaround is to use URxvt.url-select.button: S-2 (Shift-middle-button).

url-select 'o' binding makes urxvt crash

I'm not sure how easy it is to reproduce but I manage to make urxvt crash by opening urls with the 'o' binding.
urxvt crash on the second or the third opened url.

Feature Request : open urls of images with image viewer

hi,

Thanks for your work which've made my CLI sessions even more accurate.

I wonder if the url catcher can understand the difference between misc links and image links.
When there is an image link, the behavior of the url catcher could be to delegate the opening of the link to an image viewer.

Regards,
Buridan

url-select: doesn't work always

I'm on Debian testing using ratpoison, if that minds, and sometimes, apparently randomly, alt-u doesn't work as expected, i.e. it doesn't select the URL. Whem that happens, for it to work I have to navigate between ratpoison's windows, do some "random" things until alt-u actually select the URL.

Feature request: ack-parser -> vim opener

Hi,
your extensions are great, but I'm missing one.
suppose I'm running urxvt, and I do a search with ack (which is like grep -R ., but better),
it will show the results grouped by file, each result on a line, with the line number at the beginning.
Like this:

$ ack theme.sbar   
window.lua
190:            [s.l.loaded] = theme.sbar_loaded_fg,
200:            [s.l.ebox]   = theme.sbar_bg,
201:            [s.r.ebox]   = theme.sbar_bg,
202:            [s.sep]      = theme.sbar_bg,
203:            [s.ebox]     = theme.sbar_bg,
212:            [s.l.loaded] = theme.sbar_loaded_font,

theme.lua
42:theme.sbar_fg         = "#fff"
43:theme.sbar_bg         = "#000"
$

Then, I look over the results and decide "oh okay, now I want to go edit window.lua on line 201 because that contains the match I was looking for". I want a urxvt extension that can cycle through the results (and supports a search mode with '/', so that I can go on the line containing a result, if I then press enter, I want vim to be opened on that specific line.
Is that possible? :)

Ability for url-select to copy to clipboard instead of primary selection

url-select copies the URL to the primary selection. I'd like it to be copied to the clipboard without using URxvt.clipboard.autocopy since doing that interferes with normal operation.

For some applications it's easier to paste from the clipboard. Is that currently possible with an option?

urxvt doesn't start: handshake key mismatched

Hi,
urxvt won't launch anymore on my Archlinux (running testing repos) due to following error:
./rxvtperl.c: loadable library and perl binaries are mismatched (got handshake key 0xdb00080, needed 0xdb80080)
I can't find any clue how to solve this, so I thought I'd ask the developers ;)

character encoding not being handled correctly

When pasting the character "█" it instead pastes "â". I have my locale set to UTF-8 and used Chromium browser set to UTF-8 also.

It pastes correctly without using your clipboard. I needed to paste this character from the tabbedex extension, which is how i discovered it. https://raw.github.com/unkie/urxvt-tabbedex/master/tabbedex

locale
LANG=en_AU.UTF-8
LANGUAGE=en_AU:en
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"
LC_ALL=

keyboard-select yank to Clipboard buffer

Hello,

I am using openSuse 13.2 with KDE and klipper. The yank command of the keyboard-select extension does not make the yanked text available immediately for pasting by ctrl-v but instead it appears only in the yank history of klipper. Now I learned that there are three clipboards under xorg by

http://unix.stackexchange.com/questions/82311/how-to-make-shiftinsert-paste-selection-after-closing-window-with-selection/82326#82326

Would sending the yanked text to the CLIPBOARD clipboard instead of the PRIMARY clipboard resolve this?
As far as I can tell, there are no options in Klipper to unify with the PRIMARY clipboard.

url-select and parantheses

url-select fails to include trailing closing parens ). Try these test cases:

(nested parens http://en.wikipedia.org/wiki/Heuristic_(engineering))
(http://en.wikipedia.org/wiki/Heuristic)
http://en.wikipedia.org/wiki/Heuristic_(engineering)

Current master works for all URLs except the last one, where it misses the closing ).

Previously I’ve used a modified mark-yank-urls version, which uses the following regex which passes all of the cases above:

qr{
  (?:https?://|ftp://|news://|mailto:|file://|\bwww\.)
  [\w\-\@;\/?:&=%\$.+!*\x27,~#]*
  (
     \([\w\-\@;\/?:&=%\$.+!*\x27,~#]*\)   # Allow a pair of matched parentheses
     |                                    #
     [\w\-\@;\/?:&=%\$+*~]                # exclude some trailing characters (heuristic)
  )+
}x;

which is basically a modification of the original regex like this:
prefix``many-chars``less-chars-at-end (original)
prefix``many-chars``(many-chars-enclosed-by-parens)``less-chars-at-end (modified)

However, I’ve failed to modify url-select in a similar way and I don’t see why it breaks. The underlines are completely wrong and URLs always exclude any trailing ). I hope that you have an idea why this occurs and can help me out.

Given there are so many Wikipedia-Links with trailing ), this corner-case isn’t very uncommon, either.

copy/paste fails to work as expected

Current Arch Linux distro running on MacBookPro9,2 (mid-2012), using:
extra/xorg-server 1.16.4-1
community/i3-wm 4.8-3
community/rxvt-unicode 9.21-1
community/urxvt-perls 2.1-1

$ cat .Xresources |grep perl|grep -v ^!
URxvt.perl-ext-common: default,keyboard-select,clipboard,url-select
URxvt.keysym.M-Escape: perl:keyboard-select:activate
URxvt.keysym.M-s: perl:keyboard-select:search
URxvt.keysym.M-c: perl:clipboard:copy
URxvt.keysym.M-v: perl:clipboard:paste
URxvt.keysym.M-C-v: perl:clipboard:paste_escaped
URxvt.keysym.M-u: perl:url-select:select_next

$ cat .xinitrc|grep urxvt
urxvtd -q -o -f

Your documentation from /usr/lib/urxvt/perl/keyboard-select reads in part:
Use Meta-Escape to activate selection mode, then use the following keys:
h/j/k/l: Move cursor left/down/up/right (also with arrow keys)
g/G/0/^/$/H/M/L/f/F/;/,/w/W/b/B/e/E: More vi-like cursor movement keys
'/'/?: Start forward/backward search
n/N: Repeat last search, N: in reverse direction
Ctrl-f/b: Scroll down/up one screen
Ctrl-d/u: Scroll down/up half a screen
v/V/Ctrl-v: Toggle normal/linewise/blockwise selection
y/Return: Copy selection to primary buffer, Return: deactivate afterwards
q/Escape: Deactivate keyboard selection mode

and documentation in /usr/lib/urxvt/perl/clipboard reads in part:
The use of the functions should be self-explanatory!

and indeed, this is pretty clear to me:
URxvt.keysym.M-c: perl:clipboard:copy
URxvt.keysym.M-v: perl:clipboard:paste
...and gives me the impression that your code should be copying to the CLIPBOARD buffer in X, not the PRIMARY buffer.

Everything described in the docs seems to work for me except the following key-combination:
"M-c" (I know that's Meta-c or in my case, alt/option-c)

In attempting to use these tools, I carefully used the following 4 procedures:

1a) modify .Xresources;
2a) run "$ #xrdb ~/.Xresources" to reload modified .Xresources;
3a) $mod-Return (an i3 key combination; it spawns a new urxvtc for me);
4a) in new urxvtc, generate some text in the terminal;
5a) "M-Escape" (terminal feedback: "Bot" highlighted in yellow at bottom right of terminal);
6a) multiple presses of "k" and "h" to position cursor;
7a) "v" to toggle normal selection mode (terminal feedback: "-V- Bot" highlighted in yellow);
8a) multiple presses of "l" (lowercase L) to highlight text desired for selection (terminal feedback: background/foreground colors reversed for selected text);
9a) "M-c" to attempt to copy selection to CLIPBOARD buffer (terminal feedback: none visible)
10a) "Escape" to deactivate keyboard selection mode (terminal feedback: "-V- Bot" disappears)
11a) "M-v" to attempt to paste this copied CLIPBOARD buffer content to the terminal (terminal feedback: not the most-recently-attempted copied text, but the previous-to-that-copied-text from using firefox with mouse-selected text followed by "C-c" is pasted into terminal)

I've also tried steps 1a-9a above followed by:
10b) "Return" to copy selection to primary buffer, Return: deactivate afterwards
11b) "two-finger-tap" on synaptics touchpad (desired copied text is pasted to destination)

And I've also tried steps 1a-9a above followed by:
10c) "y" to copy selection to primary buffer (terminal feedback: reversed color selection returns to normal)
11c) "q" to deactivate keyboard selection mode (terminal feedback: "-V- Bot" disappears)
12c) "two-finger-tap" on synaptics touchpad (desired copied text is pasted to destination)

And I tried steps 1a-10a above followed by:
11d) "two-finger-tap" on synaptics touchpad (desired copied text is NOT pasted to destination)

Both procedures b and c work fine, I think because "y" and "Return" copy the selection to the PRIMARY buffer rather than the CLIPBOARD buffer. But I get the impression from your documentation and from the filename itself (/usr/lib/urxvt/perl/clipboard) that "M-c" should be copying the selected text to the CLIPBOARD buffer, not the PRIMARY buffer in X. Just to make sure I wasn't interpreting your documentation incorrectly, I tried procedure d, and again got behavior different than I expected.

I noticed your additional words:

You can also overwrite the system commands to use for copying/pasting.
The default ones are:
URxvt.clipboard.copycmd: xsel -ib
URxvt.clipboard.pastecmd: xsel -ob

So I added these lines to .Xresources:
URxvt.clipboard.copycmd: xsel -ib
URxvt.clipboard.pastecmd: xsel -ob

and still don't get selected text copied to the CLIPBOARD buffer.

$ xsel -ob
from the command-line works as expected when I precede that command by selecting text in firefox with the mouse and then copy it to the X CLIPBOARD buffer using "C-c".

So is this a bug/issue? Or are my expections wrong? Perhaps I'm interpreting your documentation about the use and function of "M-c" in the clipboard script incorrectly. Any thoughts on what's going on here?

Make keyboard-select incremental

I think keyboard-select searching behaviour should behave in the way it works in searchable-scrollback plugin, so one can see match result immediately when typing.

License change

Can you make the license permissive so we can include the scripts with dot-configs that are permissive-licensed also?

Keyboard Select and URL Select Don't Work

Can't tell if this is a config problem or something else. I'm running Arch with Xmonad in VMware Fusion on OS X. Cut and paste works using xsel. I can't get keyboard select or url select going. When I hit M-Esc, nothing. I know isn't a keybinding problem because I have cut and paste. Ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.