urxvt tweaks
This commit is contained in:
parent
b9ce248b65
commit
e7a8141b4b
|
@ -5,13 +5,15 @@ Xft.rgba: rgb
|
|||
Xft.autohint: false
|
||||
Xft.hintstyle: hintslight
|
||||
Xft.lcdfilter: lcddefault
|
||||
! iMac 3840x2160 @ 27 inches
|
||||
|
||||
Xft.dpi: 163
|
||||
|
||||
! XTERM
|
||||
xterm*font: *-fixed-*-*-*-*-14-*
|
||||
|
||||
! URXVT
|
||||
URxvt*depth: 32
|
||||
URxvt*background: [95]#ededed
|
||||
URxvt.font: xft:Fira Mono:Regular:size=10,xft:Noto Color Emoji
|
||||
URxvt.letterSpace: -1
|
||||
! Hide the scrollbar
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Cwd;
|
||||
|
||||
# Opening a new window.
|
||||
# Fixed version of script from
|
||||
# http://lists.schmorp.de/pipermail/rxvt-unicode/2012q3/001609.html
|
||||
# by José Romildo Malaquias <malaquias at gmail.com>
|
||||
# References: man 3 urxvtperl
|
||||
# Debugging: urxvt --perl-lib ${HOME}/.urxvt -pe new-window
|
||||
# Example config: URxvt.keysym.Control-Shift-N: perl:new-window
|
||||
|
||||
sub new_window
|
||||
{
|
||||
my ($self) = @_;
|
||||
my $ccwd = readlink("/proc/".$self->{child_pid}."/cwd");
|
||||
new urxvt::term $self->env, $urxvt::RXVTNAME, -cd => $ccwd;
|
||||
}
|
||||
|
||||
sub on_child_start {
|
||||
my ($self,$pid) = @_;
|
||||
|
||||
$self->{child_pid} = $pid; # keep for later determining our shells
|
||||
# CWD for relative path names
|
||||
()
|
||||
}
|
||||
|
||||
|
||||
sub on_user_command
|
||||
{
|
||||
my ($self, $cmd) = @_;
|
||||
|
||||
if ($cmd eq "new-window") {
|
||||
new_window($self);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue