Urxvt
From awesomerxvt-unicode (urxvt for short) is a clone of the rxvt terminal emulator. It is packaged for just about every major GNU/Linux and BSD distribution, and it's an excellent terminal emulator, lightweight and fast, as its name suggests it has full unicode support and it's fully extendable with Perl. Some of the Perl extensions distributed with urxvt add tabs, quake-like terminal behaviour, clipboard integration, clickable URL's... You can find some tips for using rxvt-unicode and awesome on the Urxvt tips wiki page.
- NOTE: If you often work on remote hosts with SSH that don't have urxvt installed you can scp your local terminfo entry for rxvt-unicode to the "~/.terminfo/r" directory.
In order to get the most out of urxvt, you will want to modify its X resources. You can configure them in your .Xdefaults file. Here is an example to get you started:! General !urxvt*termName: rxvt-256color urxvt*loginShell: true urxvt*scrollBar: false urxvt*secondaryScroll: true urxvt*saveLines: 65535 urxvt*cursorBlink: false urxvt*urgentOnBell: true !urxvt*override-redirect:false !urxvt*borderLess: false !urxvt*internalBorder: 0 !urxvt*externalBorder: 0 ! Extensions urxvt*perl-lib: /usr/lib/urxvt/perl/ urxvt*perl-ext-common: default,matcher,searchable-scrollback urxvt*urlLauncher: /usr/bin/firefox urxvt*matcher.button: 1 ! - catch ugly URLs urxvt.cutchars: `()'*<>[]{|}" ! Appearance ! - use a bitmap font urxvt*font: -xos4-terminus-medium-*-*-*-12-*-*-*-*-*-*-* urxvt*boldFont: -xos4-terminus-bold-*-*-*-12-*-*-*-*-*-*-* ! - use xft for drawing fonts !urxvt*font: xft:Terminus:8 ! - cursor urxvt*cursorColor: #DCDCCC ! - pseudo transparency !urxvt*shading: 50 !urxvt*transparent:true ! ! - color scheme urxvt.background: #000000 urxvt.foreground: #EBEBFF ! black + red !urxvt*color0: #3f3f3f urxvt*color0: #000000 urxvt*color1: #e01010 ! green + yellow urxvt*color2: #00AA00 urxvt*color3: #FFFF00 ! blue + purple urxvt*color4: #112037 urxvt*color5: #A020F0 ! cyan + white urxvt*color6: #5B5BC7 urxvt*color7: #fefefe ! bright-black + bright-red urxvt*color8: #6a6a6a urxvt*color9: #FF5555 ! bright-green + bright-yellow urxvt*color10: #90EE90 urxvt*color11: #ffff2f ! bright-blue + bright-purple urxvt*color12: #5B5BC7 urxvt*color13: #e628ba ! bright-cyan + bright-white urxvt*color14: #7D7DFB urxvt*color15: #ffffff
-
urxvt
2010-09-04 15:24:00urxvt -fg lightgray -bg black -cr 2 -bc -tr -tint lightgray -sh 20 -fn "xft:serif:Regular:pixelsize=16" -tn rxvt -sl 65535 -sr ==============================================...urxvt -fg lightgray -bg black -cr 2 -bc -tr -tint lightgray -sh 20 -fn "xft:serif:Regular:pixelsize=16" -tn rxvt -sl 65535 -sr
============================================================================
~/.Xdefauts
URxvt.title:URxvt-Unicode
URxvt.termName:rxvt-unicode
URxvt.scrollBar:false
URxvt.saveLines:500
URxvt.background:black
URxvt.foreground:lightgray
URxvt.colorBD:yellow
URxvt.colorUL:Green
!URxvt.font:xft:serif:Regular:pixelsize=16
URxvt.font:xft:AR PL KaitiM GB:Regular:pixelsize=17:antialias=true
URxvt.keysym.C-Up: command:]50;xft:AR PL KaitiM GB:Regular:pixelsize=20:antialias=true
URxvt.keysym.C-Down:command:]50;xft:AR PL KaitiM GB:Regular:pixelsize=17:antialias=true
! bg transparent set
URxvt.inheritPixmap: true
URxvt.tintCddolor: lightgray
URxvt.shading: 10
URxvt.perl-lib: /home/jixiuf/.config/URxvt/
URxvt.perl-ext-common:clipboard,vim_scrollback
!URxvt.matcher.button: 1
!Control+Shift+c 剪切
!Control+Shift+v paste
URxvt.keysym.Control-C: perl:clipboard:copy
URxvt.keysym.Control-V: perl:clipboard:paste
!M means Alt
URxvt*vim-scrollback: M-s
!URxvt*vim-scrollback-paste: M-p
URxvt*vim-scrollback-bg: 16
URxvt*vim-scrollback-fg: 10
=============================================================在 /home/jixiuf/.config/URxvt/ 目录下有 clipboard,vim_scrollback
两个文件
clipboard 对剪切粘贴操作进行映射但是需要用到xsel(操作剪切板的命令)命令,必须先安装上
clipboard文件内容如下
#! /usr/bin/perl
#这里做了两件事,一是把selection 复制到primary ,及clipboard 内
#二是字义了copy paste 两个事件 ,可以键绑定
#用法在.Xdefaults 里
#指定perl 文件的存放在,需要把本文件复制到此目录下或者/usr/lib/uxrvt/perl/
#URxvt.perl-lib: /home/jixiuf/.config/URxvt/
#然后将本文件名加入到这里,此处本文件名为clipboard
#URxvt.perl-ext-common:clipboard
#Shift-Control-c copy 到clipboard 大写的C 表示Shift-c
# URxvt.keysym.Control-C: perl:clipboard:copy
#Shift-Control-v paste clipboard 的内容
# URxvt.keysym.Control-V: perl:clipboard:paste
#当有内容选中的时候调用
#把selection 复制到primary ,及clipboard 内
sub on_sel_grab {
my $query = quotemeta $_[0]->selection;
$query =~ s/
//n/g;
$query =~ s/ //r/g;
system( "echo -en " . $query . " | xsel -i -b -p" );
}
sub copy {
my ($self) = @_;
my $pid = open( pout, "| xsel -i -b" ) or die "fork";
print pout $self->selection;
close(pout) or die "close";
}
sub paste {
my ($self) = @_;
my $content = `xsel -o -b` ;
$self->tt_write ($content);
}
sub on_user_command {
my ($self, $cmd) = @_;
if ($cmd eq "clipboard:copy") {
$self->copy;
}
if ($cmd eq "clipboard:paste") {
$self->paste;
}
}
==========================================================================================vim_scrollback 文件内容如下, 一般用不到这个
Alt+s 键后,会进行vim 操作模式Esc 退出 ,可以用jkhl 等vim 常用操作对urxvt 进行操作
################################################################################
# Usage
#
# While not in vim scrollback mode
# ctrl-v - enter vim-scrollback mode
# ctrl-r * - pastes the primary clipboard onto the command line
# ctrl-r + - pastes the secondary clipboard onto the command line
#
# Note: both ctrl-v and ctrl-r can be configured to different values
# (configuration examples further down).
#
# While in the vim scrollback mode the following key bindings work:
# motions:
# h j k l
# w e b
# 0 _ $
# ctrl-u ctrl-d
# gg G
#
# f<char> - jump to next occurrence of <char> on the current line
# F<char> - jump to prev occurrence of <char> on the current line
#
# visual mode:
# V v ctrl-v
# gv - reselect last selection
#
# yank:
# y - yank to primary clipboard (*)
# Y - yank to secondary clipboard (+)
#
# paste:
# p - pastes onto the end of the command line
#
# undo / redo:
# u / ctrl-R - undo / redo pastes to command line
#
# marks:
# m[a-z] '[a-z] ''
#
# search:
# / - searches up
# ? - searches down
# n - next in current direction
# N - next in opposite direction
# * - search for word under the cursor
#
# misc:
# gf - behave like the shipped matcher plugin for urxvt. allows you to open a
# url or other configured pattern and launcher. See matcher docs for info
# on configuring:
# http://cvs.schmorp.de/rxvt-unicode/doc/rxvtperl.3.html#PREPACKAGED_EXTENSIONS
#
# Note: counts can be supplied to most commands like in vim
#
################################################################################
# Configuration
#
# Vim scrollback supports various configuration settings which can be supplied
# in your ~/.Xdefaults file.
#
# ; configure alt-s as the keybinding to enter vim scrollback mode.
# URxvt*vim-scrollback: M-s
#
# ; configure alt-p as the keybinding to paste mode.
# URxvt*vim-scrollback-paste: M-p
#
# ; configure the background and foreground colors used for the status bar while
# ; in scrollback mode.
# URxvt*vim-scrollback-bg: 16
# URxvt*vim-scrollback-fg: 10
#
# ; configure the command used when opening urls. Note, uses the same
# ; configuration as the url launcher script shipped with urxvt.
# urxvt*urlLauncher: firefox
#
################################################################################
my $DEBUG = 1;
my $DEBUG_FILE = '/tmp/urxvt_vim_scrollback.log';
my $DEBUG_FH;
# copied from matcher
my $url =
qr{
(?:https?://|ftp://|news://|mailto:|file://|/bwww/.)
[a-zA-Z0-9/-/@;//?:&=%/$_.+!*/x27,~#]*
(
/([a-zA-Z0-9/-/@;//?:&=%/$_.+!*/x27,~#]*/)| # Allow a pair of matched parentheses
[a-zA-Z0-9/-/@;//?:&=%/$_+*~] # exclude some trailing characters (heuristic)
)+
}x;
sub on_init {
my ($self) = @_;
my $hotkey = $self->x_resource("vim-scrollback") || "M-v";
$self->parse_keysym($hotkey, "perl:vim-scrollback:start")
or warn "unable to register '$hotkey' as vim scrollback start hotkey/n";
$hotkey = $self->x_resource("vim-scrollback-paste") || "M-r";
$self->parse_keysym($hotkey, "perl:vim-scrollback:paste")
or warn "unable to register '$hotkey' as vim paste hotkey/n";
()
}
sub on_user_command {
my ($self, $cmd) = @_;
$cmd eq "vim-scrollback:start" and $self->enter;
$cmd eq "vim-scrollback:paste" and $self->paste;
()
}
# entry point for vim mode
sub enter {
my ($self) = @_;
return if $self->{overlay};
if ($DEBUG){
open($DEBUG_FH, ">$DEBUG_FILE");
select((select($DEBUG_FH), $| = 1)[0]);
}
$self->{view_start} = $self->view_start;
$self->{pty_ev_events} = $self->pty_ev_events(urxvt::EV_NONE);
$self->enable(
key_press => /&key_press,
resize_all_windows => /&resize_window
);
my ($lnum, $cnum) = $self->screen_cur();
$self->{orig_nrow} = $self->nrow;
$self->{orig_lnum} = $lnum;
$self->{orig_cnum} = $cnum;
$self->{out_lnum} = $lnum;
$self->{out_cnum} = $cnum;
$self->{visual_mode};
$self->{visual_clnum};
$self->{visual_ccnum};
$self->{visual_slnum};
$self->{visual_scnum};
$self->{visual_elnum};
$self->{visual_ecnum};
$self->{visual_rectangle};
my $end = $self->line($lnum)->end;
if ($end == $self->nrow - 1){
$self->screen_cur($end, 0);
$self->scr_add_lines("/n");
$self->{orig_lnum} = $lnum - 1;
$self->{out_lnum} = $lnum - 1;
$self->screen_cur($self->{orig_lnum}, $cnum);
}
$self->{term_buffer} = [];
$self->{term_undo} = [];
$self->{term_redo} = [];
$self->{mode} = "normal";
$self->{mode_info} = "";
$self->{registers} = {};
$self->{marks} = {};
$self->{search_history} = [];
$self->{key_buffer} = "";
my $fg_color = $self->x_resource("vim-scrollback-fg");
my $bg_color = $self->x_resource("vim-scrollback-bg");
my $style = urxvt::OVERLAY_RSTYLE | urxvt::RS_Bold;
$style = urxvt::SET_FGCOLOR($style, $fg_color) if $fg_color;
$style = urxvt::SET_BGCOLOR($style, $bg_color) if $bg_color;
$self->{msg_style} = $style;
# modified from matcher
my $urlLauncher = $self->my_resource("launcher") ||
$self->x_resource("urlLauncher") ||
"sensible-browser";
# handle shell variable
if ($urlLauncher =~ /^/$/) {
$urlLauncher =~ s//$//;
$urlLauncher = $ENV{$urlLauncher};
}
$self->{launcher} = $urlLauncher;
# copied from matcher
my @defaults = ($url);
my @matchers;
for (my $idx = 0; defined (my $res = $self->my_resource("pattern.$idx") || $defaults[$idx]); $idx++) {
$res = $self->locale_decode($res);
utf8::encode $res;
my $launcher = $self->my_resource("launcher.$idx");
$launcher =~ s//$&|/$/{&/}//${0}/g if ($launcher);
# handle shell variable
if ($launcher =~ /^/$/) {
$launcher =~ s//$//;
$launcher = $ENV{$launcher};
}
push @matchers, [qr($res)x, $launcher];
}
$self->{matchers} = /@matchers;
$self->msg("");
}
sub leave {
my ($self, $event) = @_;
$self->term_write_flush();
$self->disable("key_press", "resize_all_windows");
$self->pty_ev_events($self->{pty_ev_events});
$self->clear_selection($event);
$self->screen_cur($self->{orig_lnum}, $self->{orig_cnum});
$self->view_start($self->{view_start});
$self->want_refresh;
delete $self->{overlay};
delete $self->{search};
delete $self->{search_history};
delete $self->{mode};
delete $self->{mode_info};
delete $self->{orig_lnum};
delete $self->{orig_cnum};
delete $self->{out_lnum};
delete $self->{out_cnum};
delete $self->{term_buffer};
delete $self->{term_undo};
delete $self->{term_redo};
delete $self->{visual_mode};
delete $self->{launcher};
delete $self->{matchers};
if ($DEBUG){
close($DEBUG_FH);
}
}
sub resize_window {
my ($self, $t_width, $t_height) = @_;
# prompt at bottom of term
if($self->{orig_lnum} == $self->{orig_nrow} - 2){
# adjust location of the prompt
my $adj = $self->nrow - $self->{orig_nrow};
$self->{orig_lnum} += $adj;
# adjust location of last visual mode if necessary.
if ($self->{visual_mode}){
$self->{visual_slnum} += $adj;
$self->{visual_elnum} += $adj;
$self->{visual_clnum} += $adj;
}
# adjust all marks
for my $key (keys %{$self->{marks}}){
$self->{marks}{$key}[0] += $adj;
}
# failed attempt to reposition the cursor.
#my ($lnum, $cnum) = $self->screen_cur();
#$self->screen_cur($lnum + $adj, $cnum);
#$self->debug("adj = $adj lnum = $lnum cnum = $cnum");
#$self->view_start(List::Util::min 0, $lnum - ($self->nrow >> 1));
#$self->want_refresh;
}
$self->{orig_nrow} = $self->nrow;
}
sub key_press {
my ($self, $event, $keysym, $string) = @_;
#delete $self->{manpage_overlay};
if ($self->{mode} eq "search"){
return $self->key_press_search($event, $keysym, $string);
}elsif ($self->{mode} =~ /visual/){
return $self->key_press_visual($event, $keysym, $string);
}
return $self->key_press_normal($event, $keysym, $string);
}
sub key_press_normal {
my ($self, $event, $keysym, $string) = @_;
$self->msg("");
if ($keysym == 0xff1b ||
$string =~ /^/cC$/ ||
($self->{key_buffer} =~ /^:qa?$/ && $keysym == 0xff0d))
{ # esc, ctrl-c, :q<enter>, :qa<enter>
if($self->{key_buffer} and $self->{key_buffer} !~ /^:qa?$/){
$self->{key_buffer} = "";
$self->msg("");
}else{
$self->leave($event);
}
return 1;
}
# arbitrary limit on the number of keys we'll allow the user to press
# without matching a command before we just stop recording them.
if (length($self->{key_buffer}) < 5){
$self->{key_buffer} .= $string;
}
$string = $self->{key_buffer};
# parse out count if necessary
$self->{repeat} = 1;
if ($string =~ /^/d+/D/){
(my $repeat = $string) =~ s/^(/d+)/D.*$//1/;
$self->{repeat} = $repeat;
$string =~ s/^/d+(.*)//1/;
}
# searching
if ($string =~ /^[//?]$/) { # start search mode with / or ?
($self->{search_lnum}, $self->{search_cnum}) = $self->screen_cur();
($self->{search_slnum}, $self->{search_scnum}) = $self->screen_cur();
my $line = $self->line($self->{search_lnum});
$self->{search_cnum} = $line->offset_of($self->{search_lnum}, $self->{search_cnum});
$self->{search_scnum} = $self->{search_cnum};
($self->{search_olnum}, $self->{search_ocnum}) = $self->screen_cur();
$self->{mode} = "search";
$self->{search} = "(?i)";
$self->{search_save} = $self->{search};
$self->{search_history_index} = -1;
$self->{search_dir} = $string eq '/' ? -1 : 1;
$self->{search_wrap} = 0;
$self->search_prompt;
} elsif ($string eq "*") { # find word under the cursor
my ($lnum, $cnum) = $self->screen_cur();
my $line = $self->line($lnum);
my $index = $cnum + ($self->ncol * ($lnum - $line->beg));
my $prefix = substr($line->t, 0, $index + 1);
$prefix =~ s/.*/W(/w.*?)//1/;
my $suffix = substr($line->t, $index + 1);
$suffix =~ s/(/w.*?)/W.*//1/;
if ($suffix =~ /^/s/){
$suffix = '';
}
my $word = $prefix . $suffix;
$self->{search} = "//b$word//b";
unshift(@{$self->{search_history}}, $self->{search});
$self->{search_dir} = -1;
$self->{search_wrap} = 0;
($self->{search_lnum}, $self->{search_cnum}) = $self->screen_cur();
($self->{search_slnum}, $self->{search_scnum}) = $self->screen_cur();
my $line = $self->line($self->{search_lnum});
$self->{search_cnum} = $line->offset_of($self->{search_lnum}, $self->{search_cnum});
$self->{search_scnum} = $self->{search_cnum};
$self->search($event, $self->{search_dir}, 1);
$self->{search_wrap} = 0;
} elsif ($string eq "n") { # next search result (up)
($self->{search_lnum}, $self->{search_cnum}) = $self->screen_cur();
($self->{search_slnum}, $self->{search_scnum}) = $self->screen_cur();
my $line = $self->line($self->{search_lnum});
$self->{search_cnum} = $line->offset_of($self->{search_lnum}, $self->{search_cnum});
$self->{search_scnum} = $self->{search_cnum};
$self->search($event, $self->{search_dir}, 1);
$self->{search_wrap} = 0;
} elsif ($string eq "N") { # previous search result (down)
($self->{search_lnum}, $self->{search_cnum}) = $self->screen_cur();
($self->{search_slnum}, $self->{search_scnum}) = $self->screen_cur();
my $line = $self->line($self->{search_lnum});
$self->{search_cnum} = $line->offset_of($self->{search_lnum}, $self->{search_cnum});
$self->{search_scnum} = $self->{search_cnum};
$self->search($event, 0 - $self->{search_dir}, 1);
$self->{search_wrap} = 0;
# visual mode
} elsif ($string eq "v") { # start char based visual selection mode
$self->{mode} = "visual";
$self->{mode_info} = "-- VISUAL -- ";
($self->{visual_lnum}, $self->{visual_cnum}) = $self->screen_cur();
my ($lnum, $cnum) = $self->screen_cur();
$self->move_cursor($event, $lnum, $cnum);
$self->msg("");
} elsif ($string eq "V") { # start line based visual selection mode
$self->{mode} = "visual_line";
$self->{mode_info} = "-- VISUAL LINE -- ";
($self->{visual_lnum}, $self->{visual_cnum}) = $self->screen_cur();
my ($lnum, $cnum) = $self->screen_cur();
$self->move_cursor($event, $lnum, $cnum);
$self->msg("");
} elsif ($string =~ /^/cV$/) { # start block based visual selection mode
$self->{mode} = "visual_block";
$self->{mode_info} = "-- VISUAL BLOCK -- ";
($self->{visual_lnum}, $self->{visual_cnum}) = $self->screen_cur();
my ($lnum, $cnum) = $self->screen_cur();
$self->move_cursor($event, $lnum, $cnum);
$self->msg("");
# paste
} elsif ($string eq "p") {
$self->set_mark("'");
$self->term_write($event, $self->{registers}{'"'});
# motions
} elsif ($string eq "j") {
my ($lnum, $cnum) = $self->screen_cur();
for(my $ii = 0; $ii < $self->{repeat}; $ii++){
if ($lnum < $self->nrow - 2){
$self->move_cursor($event, ++$lnum, $cnum);
}
}
} elsif ($string eq "k") {
my ($lnum, $cnum) = $self->screen_cur();
for(my $ii = 0; $ii < $self->{repeat}; $ii++){
if ($lnum > $self->top_row){
$self->move_cursor($event, --$lnum, $cnum);
}
}
} elsif ($string eq "h") {
my ($lnum, $cnum) = $self->screen_cur();
for(my $ii = 0; $ii < $self->{repeat}; $ii++){
if ($cnum > 0){
$self->move_cursor($event, $lnum, --$cnum);
}
}
} elsif ($string eq "l") {
my ($lnum, $cnum) = $self->screen_cur();
for(my $ii = 0; $ii < $self->{repeat}; $ii++){
if ($cnum < $self->ncol - 1){
$self->move_cursor($event, $lnum, ++$cnum);
}
}
} elsif ($string eq "0") {
my ($lnum, $cnum) = $self->screen_cur();
my $line = $self->line($lnum);
$self->move_cursor($event, $line->coord_of(0));
} elsif ($string eq "_") {
my ($lnum, $cnum) = $self->screen_cur();
my $line = $self->line($lnum);
my $ltrimmed = $line->t;
$ltrimmed =~ s/^/s+//;
my $offset = (length($line->t) - length($ltrimmed));
$self->move_cursor($event, $line->coord_of(0 + $offset));
} elsif ($string eq '$') {
my ($lnum, $cnum) = $self->screen_cur();
my $line = $self->line($lnum);
$self->move_cursor($event, $line->coord_of($line->l - 1));
} elsif ($string eq "gg") {
$self->set_mark("'");
$self->move_cursor($event, $self->top_row, 0);
} elsif ($string eq "G") {
$self->set_mark("'");
$self->move_cursor($event, $self->{orig_lnum}, $self->{orig_cnum});
} elsif ($string =~ /^/cD$/) {
my ($lnum, $cnum) = $self->screen_cur();
my $row = $lnum + 20;
$row = $row < $self->{orig_lnum} ? $row : $self->{orig_lnum};
$self->move_cursor($event, $row, $cnum);
} elsif ($string =~ /^/cU$/) {
my ($lnum, $cnum) = $self->screen_cur();
my $row = $lnum - 20;
$row = $row > $self->top_row ? $row : $self->top_row;
$self->move_cursor($event, $row, $cnum);
} elsif ($string eq "w" or $string eq "e") {
my $pattern = $string eq "w" ? '/W/w' : '/w/W';
my $adj = $string eq "w" ? 0 : -1;
for(my $ii = 0; $ii < $self->{repeat}; $ii++){
my ($lnum, $cnum) = $self->screen_cur();
my $line = $self->line($lnum);
my $index = $cnum + ($self->ncol * ($lnum - $line->beg));
my $suffix = substr($line->t, $index + 1);
if($suffix =~ /$pattern/g){
my $offset = $index + pos($suffix) + $adj;
$self->move_cursor($event, $line->coord_of($offset));
}elsif ($lnum < $self->nrow - 2){
$self->move_cursor($event, $line->end + 1, 0);
}
}
} elsif ($string eq "b") {
for(my $ii = 0; $ii < $self->{repeat}; $ii++){
my ($lnum, $cnum) = $self->screen_cur();
my $line = $self->line($lnum);
my $index = $cnum - 1 + ($self->ncol * ($lnum - $line->beg));
if($index > 0){
my $prefix = substr($line->t, 0, $index);
if($prefix =~ /.*/W/w/g){
my $offset = pos($prefix) - 1;
$self->move_cursor($event, $line->coord_of($offset));
}elsif($cnum != 0){
$self->move_cursor($event, $lnum, 0);
}
}else{
$self->screen_cur($lnum - 1, $self->ncol);
$self->key_press_normal($event, $keysym, $string);
}
}
} elsif ($string =~ /^f./) {
for(my $ii = 0; $ii < $self->{repeat}; $ii++){
my ($lnum, $cnum) = $self->screen_cur();
(my $char = $string) =~ s/^f(.)//1/;
$char = quotemeta($char);
my $line = $self->line($lnum);
my $index = $cnum + ($self->ncol * ($lnum - $line->beg));
my $suffix = substr($line->t, $index + 1);
if($suffix =~ /$char/g){
my $offset = $index + pos($suffix);
$self->move_cursor($event, $line->coord_of($offset));
}
}
} elsif ($string =~ /^F./) {
for(my $ii = 0; $ii < $self->{repeat}; $ii++){
my ($lnum, $cnum) = $self->screen_cur();
(my $char = $string) =~ s/^F(.)//1/;
$char = quotemeta($char);
my $line = $self->line($lnum);
my $index = $cnum - 1 + ($self->ncol * ($lnum - $line->beg));
if($index > 0){
my $prefix = substr($line->t, 0, $index);
if($prefix =~ /.*$char/g){
my $offset = pos($prefix) - 1;
$self->move_cursor($event, $line->coord_of($offset));
}
}
}
# undo / redo
} elsif ($string eq "u") {
$self->set_mark("'");
push(@{$self->{term_redo}}, pop(@{$self->{term_buffer}}));
my ($slnum, $scnum, $elnum, $ecnum) = @{pop(@{$self->{term_undo}})};
$self->screen_cur($slnum, $scnum);
my ($beg, $end) = (0, 0);
for(my $ii = $slnum; $ii <= $elnum; $ii++){
$beg = ($ii == $slnum) ? $scnum : 0;
$end = ($ii == $elnum) ? $ecnum : $self->ncol;
for(my $jj = $beg; $jj <= $end; $jj++){
$self->scr_add_lines(" ");
}
}
$self->{out_lnum} = $slnum;
$self->{out_cnum} = $scnum;
$self->move_cursor($event, $slnum, $scnum);
} elsif ($string =~ /^/cR$/) {
$self->set_mark("'");
$self->term_write($event, pop(@{$self->{term_redo}}));
} elsif ($string =~ /^/cG$/) {
if ($DEBUG){
my ($lnum, $cnum) = $self->screen_cur();
}
# marks
} elsif ($string =~ /^m[a-z']$/) {
(my $mark = $string) =~ s/^m(.)//1/;
$self->set_mark($mark);
} elsif ($string =~ /^'[a-z']$/) {
(my $mark = $string) =~ s/^'(.)//1/;
my $lnum = $self->{marks}{$mark}[0];
my $cnum = $self->{marks}{$mark}[1];
$self->set_mark("'");
$self->move_cursor($event, $lnum, $cnum);
# g mappings
} elsif ($string eq "gv") {
if ($self->{visual_mode}){
my ($sl, $sc) = ($self->{visual_slnum}, $self->{visual_scnum});
my ($el, $ec) = ($self->{visual_elnum}, $self->{visual_ecnum});
$self->move_cursor($event, $self->{visual_clnum}, $self->{visual_ccnum});
$self->make_selection($event, $sl, $sc, $el, $ec, $self->{visual_rectangle});
$self->{mode} = $self->{visual_mode};
}
} elsif ($string eq "gf") {
my ($lnum, $cnum) = $self->screen_cur();
my @exec = $self->command_for($lnum, $cnum);
# handle ticket numbers
# TODO: convert to generic url variable substitution support.
if (@exec[1] =~ /^#/d+$/){
(my $ticket = @exec[1]) =~ s/^#//;
(my $url = @exec[0]) =~ s/<id>/$ticket/;
@exec = ($self->{launcher}, $url);
}
if (@exec){
$self->exec_async(@exec);
}
}elsif ($string =~ /^([0-9]+|[gm'])$/) {
$self->msg($self->{msg});
return 1;
}
$self->{key_buffer} = "";
$self->msg($self->{msg});
return 1;
}
sub key_press_search {
my ($self, $event, $keysym, $string) = @_;
if ($keysym == 0xff0d || $keysym == 0xff8d) { # enter
$self->normal_mode($event);
unshift(@{$self->{search_history}}, $self->{search});
if ($self->{search_found}){
$self->set_mark("'");
my ($lnum, $cnum) = ($self->{search_found}[0], $self->{search_found}[1]);
if ($lnum){
my $line = $self->line($lnum);
($lnum, $cnum) = $line->coord_of($cnum);
$self->move_cursor($event, $lnum, $cnum);
}
}
} elsif ($keysym == 0xff1b || $string =~ /^/cC$/) { # escape or ctrl-c
$self->normal_mode($event, 1);
$self->move_cursor($event, $self->{search_olnum}, $self->{search_ocnum});
} elsif ($keysym == 0xff08) { # backspace
substr $self->{search}, -1, 1, "";
$self->{search_save} = $self->{search};
$self->incremental_search($event);
} elsif ($string !~ /[/x00-/x1f/x80-/xaf]/) {
$self->{search} .= $self->locale_decode($string);
$self->{search_save} = $self->{search};
$self->incremental_search($event);
} elsif ($keysym == 0xff52) { # up
my $length = length(@{$self->{search_history}});
if ($self->{search_history_index} < $length and $length > 0) {
$self->{search_history_index}++;
$self->{search} = @{$self->{search_history}}[$self->{search_history_index}];
$self->incremental_search($event);
}
} elsif ($keysym == 0xff54) { # down
if ($self->{search_history_index} > 0){
$self->{search_history_index}--;
$self->{search} = @{$self->{search_history}}[$self->{search_history_index}];
$self->incremental_search($event);
} elsif ($self->{search_history_index} == 0){
$self->{search_history_index}--;
$self->{search} = $self->{search_save};
$self->incremental_search($event);
}
}
1
}
sub key_press_visual {
my ($self, $event, $keysym, $string) = @_;
if ($keysym == 0xff1b || $string =~ /^/cC$/) { # escape or ctrl-c
$self->normal_mode($event, 1);
} elsif ($string eq "v") {
if ($self->{mode} eq "visual") {
$self->normal_mode($event, 1);
}else{
$self->{mode} = "visual";
$self->{mode_info} = "-- VISUAL -- ";
my ($lnum, $cnum) = $self->screen_cur();
$self->move_cursor($event, $lnum, $cnum);
$self->msg("");
}
} elsif ($string eq "V") {
if ($self->{mode} eq "visual_line") {
$self->normal_mode($event, 1);
}else{
$self->{mode} = "visual_line";
$self->{mode_info} = "-- VISUAL LINE -- ";
my ($lnum, $cnum) = $self->screen_cur();
$self->move_cursor($event, $lnum, $cnum);
$self->msg("");
}
} elsif ($string =~ /^/cV$/) {
if ($self->{mode} eq "visual_block") {
$self->normal_mode($event, 1);
}else{
$self->{mode} = "visual_block";
$self->{mode_info} = "-- VISUAL BLOCK -- ";
my ($lnum, $cnum) = $self->screen_cur();
$self->move_cursor($event, $lnum, $cnum);
$self->msg("");
}
} elsif ($string eq "y") {
$self->{registers}{'"'} = $self->selection();
$self->normal_mode($event, 1);
} elsif ($string eq "Y") {
# the act of selecting puts the text on the primary, so just need to copy
# to secondary.
if (open(my $process, "| xclip -i -selection clipboard")){
print $process $self->selection();
}
$self->normal_mode($event, 1);
#} elsif ($string !~ /[/x00-/x1f/x80-/xaf]/) {
}else{
# pass to key_press_normal
return $self->key_press_normal($event, $keysym, $string);
}
1
}
sub normal_mode {
my ($self, $event, $clear_selection) = @_;
if ($self->{mode} =~ /^visual/){
($self->{visual_clnum}, $self->{visual_ccnum}) = $self->screen_cur;
($self->{visual_slnum}, $self->{visual_scnum}) = $self->selection_beg;
($self->{visual_elnum}, $self->{visual_ecnum}) = $self->selection_end;
$self->{visual_mode} = $self->{mode};
$self->{visual_rectangle} = $self->{mode} eq 'visual_block';
}
$self->{mode} = "normal";
$self->{mode_info} = "";
$self->msg("");
if ($clear_selection){
$self->clear_selection($event);
}
}
sub search {
my ($self, $event, $dir, $move_cursor) = @_;
my ($search_row, $search_col) = ($self->{search_lnum}, $self->{search_cnum});
my ($search_srow, $search_scol) = ($self->{search_slnum}, $self->{search_scnum});
my ($top_row, $bot_row) = ($self->top_row, $self->nrow);
my $search = $self->special_encode($self->{search});
$self->{search_found} = [];
no re 'eval'; # just to be sure
if (my $re = eval { qr/$search/ }) {
while (($dir < 0 and ((not $self->{search_wrap} and $search_row >= $top_row) or
$search_row > $search_srow)) or
($dir > 0 and ((not $self->{search_wrap} and $search_row <= $bot_row) or
$search_row < $search_srow)))
{
my $line = $self->line($search_row)
or last;
my $text = $line->t;
if ($text =~ /$re/g) {
my ($slnum, $selscnum) = $line->coord_of($-[0]);
my ($elnum, $selecnum) = $line->coord_of($+[0]);
my $scnum = $-[0];
my $ecnum = $+[0];
while ($text =~ /$re/g and
($dir < 0 or ($dir > 0 and $scnum <= $search_col)))
{
my ($nlnum, $ncnum) = $line->coord_of($-[0]);
my $ncnum = $-[0];
if (($dir < 0 and $ncnum < $search_col) or
($dir > 0 and $ncnum > $search_col))
{
($slnum, $selscnum) = $line->coord_of($-[0]);
($elnum, $selecnum) = $line->coord_of($+[0]);
$scnum = $-[0];
$ecnum = $+[0];
}
}
if (($dir < 0 and ($scnum < $search_col or $slnum < $search_row)) or
($dir > 0 and ($scnum > $search_col or $slnum > $search_row)))
{
$self->make_selection($event, $slnum, $selscnum, $elnum, $selecnum);
$self->{search_found} = [$slnum, $scnum];
$self->view_start(List::Util::min 0, $slnum - ($self->nrow >> 1));
if ($move_cursor){
$self->set_mark("'");
$self->{search_lnum} = $slnum;
$self->{search_cnum} = $scnum;
$self->move_cursor($event, $slnum, $selscnum);
if ($dir < 0 and $search_row > $search_srow
and not $self->{search_wrap_notify}){
$self->msg("search hit TOP, continuing at BOTTOM");
$self->{search_wrap_notify} = 1;
}elsif ($dir > 0 and $search_row < $search_srow
and not $self->{search_wrap_notify}){
$self->msg("search hit BOTTOM, continuing at TOP");
$self->{search_wrap_notify} = 1;
}
}
return $self->{search_found};
}
}
if ($dir < 0 and $search_row == $top_row){
$search_row = $bot_row;
$search_col = $self->line($search_row)->l;
$self->{search_wrap} = 1;
$self->{search_wrap_notify} = 0;
}elsif ($dir > 0 and $search_row == $bot_row){
($search_row, $search_col) = ($top_row, 0);
$self->{search_wrap} = 1;
$self->{search_wrap_notify} = 0;
}else{
$search_row = $dir < 0 ? $line->beg - 1 : $line->end + 1;
$search_col = $dir < 0 ? $self->line($search_row)->l : -1;
}
}
}
return 0;
}
sub incremental_search {
my ($self, $event) = @_;
$self->{search} =~ s/^/(/?i/)//
if $self->{search} =~ /^/(.*[[:upper:]]/;
if(not $self->search($event, $self->{search_dir})){
$self->clear_selection($event);
my $line = $self->line($self->{search_slnum});
my ($lnum, $cnum) = $line->coord_of($self->{search_scnum});
$self->move_cursor($event, $lnum, $cnum);
}
$self->{search_lnum} = $self->{search_slnum};
$self->{search_cnum} = $self->{search_scnum};
$self->{search_wrap} = 0;
$self->search_prompt;
1
}
sub search_prompt {
my ($self) = @_;
my $key = $self->{search_dir} == -1 ? '/' : '?';
$self->msg("$key$self->{search}█");
}
sub move_cursor {
my ($self, $event, $lnum, $cnum) = @_;
$self->screen_cur($lnum, $cnum);
if ($self->{mode} eq "visual"){
my $vlnum = $self->{visual_lnum};
my $vcnum = $self->{visual_cnum};
if ($lnum > $vlnum or ($vlnum == $lnum and $cnum >= $vcnum)){
$self->make_selection($event, $vlnum, $vcnum, $lnum, $cnum + 1);
}else{
$self->make_selection($event, $lnum, $cnum, $vlnum, $vcnum + 1);
}
}elsif ($self->{mode} eq "visual_line"){
my $vlnum = $self->{visual_lnum};
if ($vlnum > $lnum){
$self->make_selection($event, $lnum, 0, $vlnum, $self->ncol);
}else{
$self->make_selection($event, $vlnum, 0, $lnum, $self->ncol);
}
}elsif ($self->{mode} eq "visual_block"){
my $vlnum = $self->{visual_lnum};
my $vcnum = $self->{visual_cnum};
my ($sl, $el) = $lnum < $vlnum ? ($lnum, $vlnum) : ($vlnum, $lnum);
my ($sc, $ec) = $cnum < $vcnum ? ($cnum, $vcnum + 1) : ($vcnum, $cnum + 1);
$self->make_selection($event, $sl, $sc, $el, $ec, 1);
}
$self->view_start(List::Util::min 0, $lnum - ($self->nrow >> 1));
$self->want_refresh;
}
sub make_selection {
my ($self, $event, $br, $bc, $er, $ec, $block) = @_;
$self->selection_beg($br, $bc);
$self->selection_end($er, $ec);
$self->selection_make($event->{time}, $block);
}
sub clear_selection {
my ($self, $event) = @_;
$self->make_selection($event, -1, -1, -1, -1);
}
sub set_mark {
my ($self, $mark) = @_;
my ($lnum, $cnum) = $self->screen_cur();
my @loc = ($lnum, $cnum);
$self->{marks}{$mark} = /@loc;
}
sub term_write {
my ($self, $event, $string) = @_;
# detect shell (mysql, postgres, python, etc) and use proper line
# continuation
my $shell = $self->line($self->{orig_lnum})->t;
my $shell_continuation_start = "> ";
my $shell_continuation_end = " //";
if ($shell =~ /^(>>>|...) /){ # python
$shell_continuation_start = ">>> ";
$shell_continuation_end = "";
}elsif ($shell =~ /^(mysql>|/s*->) /){ # mysql
$shell_continuation_start = " -> ";
$shell_continuation_end = "";
}elsif ($shell =~ /^/w+(=|-)(#|/>) /){ # postgres
($shell_continuation_start = $shell) =~ s/^(/w+)(=|-)(#|/>).*/$1-$3 /;
$shell_continuation_end = "";
}elsif ($shell =~ /^irb.*?(>|/*) /){ # irb
(my $prefix = $shell) =~ s/^(irb.*?:).*/$1/;
(my $suffix = $shell) =~ s/^irb.*?:[0-9]+(:.*?)(>|/*).*/$1/;
(my $irbnum = $shell) =~ s/^irb.*?:([0-9]+):.*/$1/;
$irbnum = sprintf('%03d', int($irbnum) + 1);
$shell_continuation_start = "$prefix$irbnum$suffix> ";
$shell_continuation_end = "";
}elsif ($shell =~ /^(/?|>)> /){ # irb --simple-prompt
$shell_continuation_start = ">> ";
$shell_continuation_end = "";
}
$string =~ s/([^//])/n/$1 $shell_continuation_end/n/g;
push(@{$self->{term_buffer}}, $string);
my ($undo_slnum, $undo_scnum) = ($self->{out_lnum}, $self->{out_cnum});
if ($string =~ //n/g) {
my @lines = split(//n/, $string);
foreach(@lines){
$self->term_write_line($event, $_);
$self->scr_add_lines("/n");
$self->move_cursor($event, $self->{out_lnum} + 1, 0);
$self->scr_add_lines($shell_continuation_start);
$self->{out_lnum} += 1;
$self->{out_cnum} = length($shell_continuation_start);
}
}else{
$self->term_write_line($event, $string);
}
push(@{$self->{term_undo}},
[$undo_slnum, $undo_scnum, $self->{out_lnum}, $self->{out_cnum}]);
}
# should only be called by term_write.
sub term_write_line {
my ($self, $event, $string) = @_;
my $data = $self->locale_encode($string);
my $newline = "";
$self->move_cursor($event, $self->{out_lnum}, $self->{out_cnum});
$self->{out_cnum} += length($data);
# account for edge case where scr_add_lines screws up on the next write if
# the current data is up to the last column.
if ($self->{out_cnum} == $self->ncol){
$newline = "/n";
}
# adjust line and column where next write will start.
while ($self->{out_cnum} >= $self->ncol){
$self->{out_lnum} += 1;
$self->{out_cnum} -= $self->ncol;
}
$self->scr_add_lines($string);
# continuation of scr_add_lines edge case.
if ($newline){
$self->scr_add_lines($newline);
$self->move_cursor($event, $self->{out_lnum}, $self->{out_cnum});
}
# hack to keep last line and cursor visible.
if ($self->{out_lnum} == $self->nrow - 1){
$self->scr_add_lines("/n/n");
$self->{orig_lnum} -= 2;
$self->{out_lnum} -= 2;
$self->screen_cur($self->{out_lnum}, $self->{out_cnum});
$self->view_start(List::Util::min 0, $self->{out_lnum} - ($self->nrow >> 1));
}
$self->want_refresh;
}
# should only be called by leave.
sub term_write_flush () {
my ($self) = @_;
my $data = $self->locale_encode(join('', @{$self->{term_buffer}}));
my @lines = split(//n/, $data);
my $length = scalar(@lines);
foreach(@lines){
$self->tt_write($_);
if ($length > 1){
$self->tt_write("/n");
}
}
}
sub msg {
my ($self, $msg) = @_;
my $mode_info = $self->{mode_info};
$self->{msg} = $msg;
$msg = $self->special_encode("$mode_info" . $msg);
my $start = $self->view_start();
my $end = $start - $self->nrow;
my $label = '';
if ($start == $self->top_row){
$label = 'Top';
}elsif ($start == 0){
$label = 'Bot';
}else{
$label = sprintf("%i%%", (abs($start) / abs($self->top_row)) * 100);
}
my $percentage = sprintf(" %3s", $label);
my $pad = $self->ncol - length($msg) - 3;
$msg = sprintf("%s %${pad}s", $msg, $self->{key_buffer} . $percentage);
$self->{overlay} = $self->overlay(0, -1, $self->ncol, 1, $self->{msg_style}, 0);
$self->{overlay}->set(0, 0, $msg);
}
# copied from matcher
sub command_for {
my ($self, $row, $col) = @_;
my $line = $self->line ($row);
my $text = $line->t;
for my $matcher (@{$self->{matchers}}) {
my $launcher = $matcher->[1] || $self->{launcher};
while (($text =~ /$matcher->[0]/g)) {
my $match = $&;
my @begin = @-;
my @end = @+;
if (!defined($col) || ($-[0] <= $col && $+[0] >= $col)) {
if ($launcher !~ //$/) {
return ($launcher, $match);
} else {
# It'd be nice to just access a list like ($&,$1,$2...),
# but alas, m//g behaves differently in list context.
my @exec = map { s//$(/d+)|/$/{(/d+)/}/
substr($text,$begin[$1||$2],$end[$1||$2]-$begin[$1||$2])
/egx; $_ } split(//s+/, $launcher);
return @exec;
}
}
}
}
()
}
# copied from matcher
sub my_resource {
my $self = shift;
$self->x_resource ("$self->{name}.$_[0]");
}
sub debug {
my ($self, $msg) = @_;
print $DEBUG_FH "$msg/n";
}
####################################
# Vim like pasting to terminal.
####################################
# entry point for paste mode
sub paste {
my ($self, $selection) = @_;
$self->enable(key_press => /&key_press_paste);
}
sub key_press_paste {
my ($self, $event, $keysym, $string) = @_;
if ($string){
my $selection = '';
if ($string eq "*"){
$selection = 'primary';
}elsif ($string eq "+"){
$selection = 'clipboard';
}
if ($selection){
# avoid xclip hang when using primary with an active selection in the
# current terminal.
my $text = $self->selection();
if($selection eq "primary" && $text){
$self->tt_write($text);
}else{
if(open(my $process, "xclip -o -selection $selection |")){
$text = join('', <$process>);
$self->tt_write($text);
}
}
}
$self->disable("key_press");
1
}
}
# vim:shiftwidth=3:tabstop=3
-
urxvt-gist:GitHub Gist的自动上传,用于URxvt中的选择-源码
2021-02-18 15:53:50urxvt-gist GitHub Gist自动上传以供URxvt选择 这是一个URxvt扩展,将所选内容上传为GitHub Gist。 当前,它需要使用存储在.Xdefaults / .Xresources中的oauth令牌。 文件上传的当前名称是所选内容的十六进制编码... -
Urxvt - awesome
2019-10-06 00:06:44Urxvt - awesome Urxvt - awesomeUrxvtFrom awesomeJump to: navigation, searchrxvt-unicode (urxvt for short) is a clone of the rxvt term...转载于:https://www.cnblogs.com/lexus/p/3312471.html
-
urxvt not starts
2020-11-30 14:42:46<p>urxvt -wf -e bash -c "tmux -q has-session && exec tmux attach-session -d || exec tmux new-session -n$USER -s$USER@$HOSTNAME" <p>In new Qtile session I can't start my ... -
urxvt常用设置
2013-01-03 21:14:12urxvt常用设置,字体,边框,中文等,从网上找的资料 -
Weird messages output on urxvt
2020-12-02 15:40:26<div><p>I noticed that on urxvt terminal the output is messed up, see following ;0B9ehAG_Nj4CzWTRhb3ZoNENnem8">screencast</a>. Maybe it's a bug on urxvt? I'm using archlinux distro and urxvt ... -
urxvt term colors issue
2020-12-08 20:11:50<p>After executing any cppurses tui program in some terminal emulators (tested with multiple versions of <code>urxvt, and <code>st(simple terminal)) some of the terminal colors get modified. ... -
Urxvt 的简单配置
2020-02-12 17:06:56Simple config file for urxvt: 首先在当前用户的家目录创建 .vimrc 文件 touch .Xresources code: Xft.dpi: 96 URxvt*font:xft:FiraCode:antialias=true:pixelsize=21,xft:WenQuanYi Zen Hei:pixelsize=21 URxvt*...Simple config file for urxvt:
首先在当前用户的家目录创建 .Xresoures文件
touch .Xresources
code:
Xft.dpi: 96 URxvt*font:xft:FiraCode:antialias=true:pixelsize=21,xft:WenQuanYi Zen Hei:pixelsize=21 URxvt*boldFont:xft:FiraCode:antialias=true:pixelsize=21,xft:WenQuanYi Zen Hei:pixelsize=21 URxvt*depth: 32 URxvt*background: black URxvt*foreground: green URxvt*borderColor: cyan URxvt*borderLess: false URxvt*internalBorder: 1 URxvt*externalBorder: -1 URxvt*scrollBar: false URxvt*scrollBar_floating: false URxvt*scrollstyle: plain URxvt*geometry: 92x25 URxvt*cursorBlink: true URxvt*saveLines: 99999 # Transparent !URxvt.inheritPixmap: True !URxvt.tintColor: gray !URxvt.shading: 30
效果:
本人喜欢简单,并没有过多配置 urxvt 的其他功能
当然复制粘贴快捷键:Alt + Ctrl + C (复制) Alt + Ctrl + V (粘贴)
一些快捷键如下:
Ctrl + P # 返回上一条命令 Ctrl + A # 光标移动到命令起始端 Ctrl + E # 光标移动到命令终止端 Ctrl + B # 光标向命令起始端单个字符移动 Ctrl + F # 光标向命令终止端单个字符移动 Ctrl + K # 删除光标之后的命令 Ctrl + U # 删除光标之前的命令 Ctrl + R # 搜索历史命令
-
Wrong paste shortcut for urxvt
2020-12-08 18:12:15m using <code>urxvt</code> and it seems <code>espanso</code> cannot correctly paste expansions because the default paste shortcut for <code>urxvt</code> is Ctrl+Alt+v, not Ctrl+Shift+v... -
Umlaut dots missing in urxvt
2020-12-29 12:47:11<div><p>I just noticed that the dots above the umlauts Ö and Ü are missing in urxvt with DejaVu Sans Mono. <p>fontconfig-infinality-ultimate 2.11.1-21 freetype2-infinality-ultimate 2.5.3-13 ttf-... -
Suggestion: Urxvt Transparency Fix
2020-11-30 14:36:21<p>I will probably find a way to reference the .Xresources file and check for transparency options and then properly handle transparency for urxvt, unless of course this is something you would be ... -
latest update broke urxvt
2021-01-01 20:22:51<p>Run urxvt under a locale containing a dot (0x2e), say en_US.UTF8; LANG=C works. Also installing/upgrading gives some diagnostics about terminfo, not sure if it's relevant: <pre><code> rxvt-... -
Pasting into urxvt produces garbage strings.
2021-01-08 06:26:32<div><p><code>urxvt -e /path/to/zsh</code> becomes <code>{200~urxvt -e /path/to/zsh{201~</code> when pasted into urxvt. <p>Archlinux i3wm rxvt-unicode (urxvt) v9.22 - released: 2016-01-23 CopyQ ... -
urxvt under i3 not reported properly
2021-01-01 18:10:47<p>When I try to select urxvt, it seems as if an invisible window lays over actual urxvt window, taking up almost all space, except thin (few pixels) strip near bottom border. When I manage to avoid ... -
[i3] Ly breaks urxvt
2020-12-06 20:19:26<div><p>For some reason, whenever I have Ly enabled, it always breaks the configuration I had for urxvt in the .Xresources file. Any way to fix this?</p><p>该提问来源于开源项目:nullgemm/ly</p>... -
Xresources:Xresources,包括URxvt和Xterm配置-源码
2021-02-05 02:49:01Xresources:Xresources,包括URxvt和Xterm配置 -
Snap install: ncspot and urxvt
2020-11-28 00:23:33<div><p>The program does not load when using urxvt, which happens to be my preferred terminal. No problems if I load using xfce terminal or xterm. <p>Error message is: Error opening terminal: rxvt-256... -
Add Xresources (for urxvt)
2020-12-01 13:39:13<div><p>This is a colorscheme for urxvt. <p><img alt="image" src="https://cloud.githubusercontent.com/assets/1140167/4497917/ece6df4e-4a73-11e4-833f-55ac15c09158.png" /></p><p>该提问来源于开源项目... -
url-select 'o' binding makes urxvt crash
2020-12-27 12:02:09m 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.</p><p>该提问来源于开源项目ÿ... -
Multiline command re-echoing when using urxvt
2020-12-02 08:33:21<div><p>When running multiline commands in urxvt, parts of the command are re-echoed. <p>Example: <pre><code>` me ~/foo % ls \ \`> -l -ltotal 0 -rw-r--r-- 1 me users 0 Feb 27 20:36 bar1 -... -
Border distortion in i3 resizing urxvt
2020-12-08 18:47:21<p>I am using compton in i3 and this is how I have URxvt setup in my i3 config; <pre><code> for_window [class="URxvt"] floating enable border pixel 1 </code></pre> <p>These are the steps ... -
tabbedalt:rxvt-unicode(urxvt)的扩展的选项卡式插件-源码
2021-02-05 21:39:30tabbedalt:rxvt-unicode(urxvt)的扩展的选项卡式插件 -
Added note to change parameter for urxvt users
2021-01-07 19:04:04<div><p>It took me a while to realize the error, so this might spare some time of other urxvt users.</p><p>该提问来源于开源项目:LukeSmithxyz/voidrice</p></div> -
urxvt的粘贴复制快捷键
2016-01-17 11:32:59urxvt的复制:鼠标左键直接选中即可。 粘贴: 鼠标中键。 从其他地方复制到urxvt:ctrl+c复制,鼠标中键在urxvt粘贴。urxvt的复制:鼠标左键直接选中即可。
粘贴: 鼠标中键。
从urxvt复制到其他地方:在rxvt中选中,到要粘贴的地方鼠标中键。在vim下有其他设置。
从其他地方复制到urxvt:ctrl+c复制,鼠标中键在urxvt粘贴。或者shift+insert组合键。
-
Strange behavior while resizing URxvt in floating mode
2021-01-12 04:51:43<p>urxvt running tiled $mod + shift + spcabar (float-tiled toggle, as default configs) urxvt running in floting mode $mod + r (resize, as default - arrows) left arrow (shrink height ) >... -
dotFiles:XTerm,URXvt,i3,vim的Arquivos deconfiguração。-源码
2021-02-15 10:45:33dotFiles:XTerm,URXvt,i3,vim的Arquivos deconfiguração。 -
--noroot does not allow to start urxvt/rxvt-unicode
2021-01-08 10:15:46vim-in-term, which is a script that calls <code>urxvt ... vim</code>. <p>The <code>noroot</code> option in <code>/etc/firejail/firefox.profile</code> causes urxvt to fail: <p>urxvt: can't ... -
Make TERMINAL_COMMAND use $TERM instead of urxvt
2020-12-09 01:43:01<div><p><code>urxvt</code> doesn't make sense as a default, as $TERM is standard: https://linux.die.net/man/7/term.</p><p>该提问来源于开源项目:Biont/sway-launcher-desktop</p></div>