You are not logged in.

#1 2009-03-06 19:31:15

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

urxvt key bindings

I've recently switched to urxvt and I'm liking it so far (urxvtd/urxvtc = FAST!), but I've got a copule of problems. Control+Left and Control+Right appear to be used for something in urxvt, so they no longer work in zsh, emacs, or any terminal based programs. Secondly, launching a program with "urxvtc -e 'blah'" results in a terminal appearing for a second with the application in, then vanishing. If you could help with either of these problems it'd be appreciated smile

Offline

#2 2009-03-06 19:45:07

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: urxvt key bindings

1. Is tabbed extension using those bindings?

2. It needs -hold (urxvt -hold -e echo blah) or bash's read (urxvt -e bash -c 'blah; read -p press\ enter')
Be careful with quotes, try this out for example: urxvt -hold -e 'echo blah'

Offline

#3 2009-03-06 20:01:48

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: urxvt key bindings

1. Yes, it seems to be. Disabling tabbed lets me use the shortcuts in emacs, but nothing happens in Zsh

2. The terminal remains running with no prompt when the process running inside of it quits, how do I stop that from happening?

Offline

#4 2009-03-06 20:22:48

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: urxvt key bindings

1. That is odd. Anything with Ctrl+v, Ctrl+Right? How about bash?

2. It comes down to:
Quit immediately after process is done: you already had that, right?
Quit by signal (C-c, quit button?, kill): -hold
Quit by enter: -e bash -c 'command; read'
Quit by any key: -e bash -c 'command; read -n 1'
Quit after 1 second: -e bash -c 'command; sleep 1'

Offline

#5 2009-03-06 20:26:50

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: urxvt key bindings

on point 2.  it sounds like -hold is doing as its supposed to.  but back to your OP it sounds like urxvtc might be misbehaving.  when you execute "urxvtc -e mutt" for instance.   a terminal /should/ open with mutt running, and remain, until you actively quit mutt; then the terminal should quit along with it.  i've been using this successfully for some time (mutt, htop, irssi, etc). 

using the -hold option prevents the terminal from quitting along with the executed process; why there's no prompt i couldn't tell you, i've never used the -hold option myself. 

i suspect it's intended use would be for something like "urxvtc -e -hold cp file1 file2" in which case you'd open, copy, and remain.  but urxvtc -e -hold <some program> might not be expected, thus the lack of a prompt after the process quits.

what command were you running originally when this occurred?

Last edited by brisbin33 (2009-03-06 20:29:51)

Offline

#6 2009-03-06 20:29:07

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: urxvt key bindings

1. Yes, I get something with Ctrl+V Ctrl+Left/Right, but adding it to my .zshrc with bindkey does nothing. It also doesn't work in Bash.

2. What I had before was the terminal closing as soon as it appeared (even when running tasks like ncmpcpp), now I have it appearing, and staying there even after the task is done with no prompt.

edit: Slight discovery on point 2. It only does that if run from gmrun, xbindkeys, etc. Running "urxvtc -e ncmpcpp" in a terminal works fine.

Last edited by Barrucadu (2009-03-06 20:30:15)

Offline

#7 2009-03-06 20:31:58

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: urxvt key bindings

Oh like that... Then how about urxvt -e bash -c 'htop; bash'

Offline

#8 2009-03-06 20:32:23

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: urxvt key bindings

Barrucadu wrote:

It only does that if run from gmrun, xbindkeys, etc. ...

gmrun and xbindkeys don't automatically append a "&" to commands to send them to background do they? that would make the terminal close immediately after the process is sent to background.  other than that, i'm currently stumped.

Offline

#9 2009-03-06 20:34:37

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: urxvt key bindings

2. I dunno, maybe an error message came up instead?

1. Maybe it is expecting a different combination. If I do C-Right in urxvt = ^[[C, in xterm: ^[[1;5C
I am not sure how to fix that.

Offline

#10 2009-03-06 20:34:38

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: urxvt key bindings

Magically, it's working. Well, point 2 at least. I removed the line setting the title from my .Xdefaults, now terminals stay open when they should be open, and close when they should close.

Offline

#11 2009-03-06 20:36:59

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: urxvt key bindings

you had a line in Xdefaults setting the title? i do that in bashrc

Offline

Board footer

Powered by FluxBB