urxvt tweaks

This commit is contained in:
dctrud 2020-08-07 16:32:01 -05:00
parent b9ce248b65
commit e7a8141b4b
2 changed files with 41 additions and 1 deletions

View File

@ -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

38
link/.urxvt/ext/new-window Executable file
View File

@ -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);
}
}