You are not logged in.

#1 2016-07-18 13:53:33

monuvik
Member
Registered: 2016-07-18
Posts: 3

URXVT extensions

Here's some of my urxvt extensions:

Convert man page while reading it to pdf - https://github.com/wifiextender/urxvt-man2pdf

urxvt can paste from the clipboard without using xsel/xclip anymore. If you want to exchange the default keyboard shortcuts to do this is bit tricky since they are hardcoded into it's source code, but it provides perl routines that can be used to assign the desired keyboard shortcut to paste from the clipboard: https://github.com/wifiextender/urxvt-pasta

Offline

#2 2016-07-18 14:32:05

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,791

Re: URXVT extensions

Cool.  Any chance you might consider adding those to the wiki?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2016-07-19 01:23:28

monuvik
Member
Registered: 2016-07-18
Posts: 3

Re: URXVT extensions

Hi ewaller,

From the bottom of my heart I wanted to contribute, but the very last question in the registration page puts me off.

I was about to add the very same information that I wrote in the Gentoo wiki.

---

The default selection-to-clipboard extension will put the selected text into the clipboard automatically. To add pasting functionality we have to create a simple extension:

Filename /usr/lib/urxvt/perl/pasta

#! /usr/bin/env perl -w
# Author:   Aaron Caffrey
# Website:  https://github.com/wifiextender/urxvt-pasta
# License:  GPLv3

# Usage: put the following lines in your .Xdefaults/.Xresources:
# URxvt.perl-ext-common           : selection-to-clipboard,pasta
# URxvt.keysym.Control-Shift-V    : perl:pasta:paste

use strict;

sub on_user_command {
  my ($self, $cmd) = @_;
  if ($cmd eq "pasta:paste") {
    $self->selection_request (urxvt::CurrentTime, 3);
  }
  ()
}

Offline

Board footer

Powered by FluxBB