Skip to content

Instantly share code, notes, and snippets.

View TauPan's full-sized avatar
🏠
Working from home

Friedrich Delgado TauPan

🏠
Working from home
View GitHub Profile
@TauPan
TauPan / screen-select-or-run.sh
Created March 31, 2011 21:50
screen-select-or-run.sh
#!/bin/sh
# arguments:
# $1: title (mandatory)
# $2: program to run, no quotes in here! (mandatory)
# $3: explicit arguments to screen, you have to add -t title here yourself! (optional)
# $4: desired number for the new screen (optional)
# $5: screen command (!) to run, if already selected, e.g. eval 'stuff foo' (optional)
# use via e.g.:
# bind m screen screen-select-or-run mutt mutt
@TauPan
TauPan / clipboard
Created February 24, 2011 13:00
clipboard extension for urxvt (updated)
#! /usr/bin/perl
# adapted from https://wiki.archlinux.org/index.php/Rxvt-unicode#Automatic_Script_Management
sub on_sel_grab {
my ($term, $time) = @_;
my $query = $term->selection;
$term->selection_grab ($time, 1);
$term->selection($query, 1);
return 0;
}