You are not logged in.

#1 2010-07-14 03:41:32

iamblum
Member
Registered: 2010-06-20
Posts: 13

Ratpoison: C-t q keybind does not work

After reading through the ratpoison man page, I am told that 'C-t q' should quit ratpoison, a binding of 'C-t :quit'.  However this doesn't happen.  I come back with a "readkey: unbound  key 'q'" message.

Now I know I can set the binding myself in my .ratpoisonrc file, but I'm trying to find the general/global file that binds all defaults to see if i is missing or whatnot.

Is anyone else having this issue?

I really want to manually bind this command only as a last resort.


Thanks,

-blum

Offline

#2 2010-07-14 06:38:21

iamblum
Member
Registered: 2010-06-20
Posts: 13

Re: Ratpoison: C-t q keybind does not work

Well I went ahead and just did the following:

C-t :
bind q quit

All went well, but that brings up a question.  This binding obviously doesn't show up in my ~/.ratpoisonrc file...so which file is this binding saved in?

I've been literally searching for the answer for hours now, but can't seem to find it.  The ratpoision manual doesn't tell.  The reason I'd like to know is so that I can see which bindings are already in use as I'm sure I'll forget once I start adding my own.

[EDIT] I am aware of the C-t ? command that lists the bindings....I'd just like to know which file they are stored in.

Thanks,
-blum

Last edited by iamblum (2010-07-14 06:42:16)

Offline

#3 2010-07-14 17:01:06

Hrod beraht
Member
Registered: 2008-09-30
Posts: 186

Re: Ratpoison: C-t q keybind does not work

iamblum wrote:

After reading through the ratpoison man page, I am told that 'C-t q' should quit ratpoison, a binding of 'C-t :quit'.  However this doesn't happen.  I come back with a "readkey: unbound  key 'q'" message.

C-t q doesn't work for me either and doesn't appear to be a default keybinding anymore (not listed in C-t ?). It hasn't been a keybinding since at least version 1.4.3 that I'm personally aware of. C-t :quit works and is what I've always used. Unfortunately, there's no mention of it in any of the changelogs other than the addition of the 'quit' command way back in like version 0.1.1 years ago. I wonder if it was removed as a default keybinding sometime in the past and just not noted in the man page?

iamblum wrote:

Well I went ahead and just did the following:

C-t :
bind q quit

All went well, but that brings up a question.  This binding obviously doesn't show up in my ~/.ratpoisonrc file...so which file is this binding saved in?

When you execute a binding like that it isn't permanently saved anywhere and will disappear as soon as you exit ratpoison. To make it persistent, you need to actually add it to your rc file.
You've got me curious now too. I just checked in /usr/share/ratpoison and the keybindings don't seem to be obviously defined in any file there. Off to check the source code...

Bob

Last edited by Hrod beraht (2010-07-14 17:03:13)

Offline

#4 2010-07-14 17:13:09

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: Ratpoison: C-t q keybind does not work

AFAIK the default bindings are indeed in the source.  For any binding you do not want, you must unbind it in your config.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#5 2010-07-14 18:50:32

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: Ratpoison: C-t q keybind does not work

If you want it globally you could just recompile. I generally install from ratpoison-git and quickly threw something together to test this out.. open the PKGBUILD and add this "sed" line into it:

....

 ## Build
  rm -rf ${startdir}/src/${_gitname}-build
  cp -r ${startdir}/src/${_gitname} ${startdir}/src/${_gitname}-build  || return 1
  cd ${startdir}/src/${_gitname}-build

  sed -i -re 's|add_keybinding \(XK_g,.*$|&\n  add_keybinding (XK_q, 0, \"quit\", map);|' src/actions.c || return 1

  ./autogen.sh  || return 1
  ./configure --prefix=/usr || return 1
  make  || return 1

...

That will add the "C-t q" quit binding globally without having to put it into your rc file. Just an idea, anyway.

Offline

#6 2010-07-15 00:19:56

iamblum
Member
Registered: 2010-06-20
Posts: 13

Re: Ratpoison: C-t q keybind does not work

@Hrod beraht;
I noticed this morning after turning on my computer that the keybinding had been reset.  That makes me wonder why this "temporary binding" feature is there in the first place.  I guess it's useful for those that never shutdown their computers/servers (as for me, being a mild mannered home user, this ':bind' feature has been rendered useless).

Also, I was up all last night looking through the /usr/share/ratpoison directory (even pratically grepped my entire file tree for some kind of 'bind n') and came to the same conclusion as yourself.  You'd think that for ratpoison being as simplistic as it is, a global config file would be in the better interest of it's users.  (Maybe a feature suggestion is in order?)


@milomouse:
Thanks for going through the trouble of checking into it.  I will go ahead and reinstall the -git version today so as to utilize your additions.  Even though it's not that much more of an effort to 'C-t :quit', I'd like to learn about PKGBUILD manipulation/creation.

Offline

#7 2010-07-15 05:06:34

hatten
Arch Linux f@h Team Member
From: Sweden, Borlange
Registered: 2009-02-23
Posts: 736

Re: Ratpoison: C-t q keybind does not work

The :bind is pretty useful for testing binds, which I have done a lot.
I've unbound all default keys and specified my own, as can be seen in the ratpoison thread.

Offline

#8 2010-07-15 18:25:46

Hrod beraht
Member
Registered: 2008-09-30
Posts: 186

Re: Ratpoison: C-t q keybind does not work

iamblum wrote:

...Even though it's not that much more of an effort to 'C-t :quit'...

I've currently got 4 applications and 6 terminals running. I just went to hit C-t w to get the window list and accidentally fat-fingered the w and q at the same time. Thank goodness the C-t q isn't keybound to quit! yikes
I'm beginning to think that maybe the longer C-t :quit is actually a safety issue tongue

Bob

P.S. off-topic, but since you're a fan of Shawn Betts' keyboard-oriented window manager Ratpoison, have you ever tried his Conkeror web browser? All keyboard operable (emacs) based on Mozilla Xulrunner. If you're a keyboard fan, Ratpoison and Conkeror are a magnificent combination!

Offline

#9 2010-07-16 19:24:00

valium97582
Member
Registered: 2010-06-19
Posts: 126

Re: Ratpoison: C-t q keybind does not work

Ratpoison is still alive? I always thought that Ratpoison had been discontinued in favor of StumpWM...

I think I may be wrong, but both projects are alive concurrently (I bet I wrote that wrong)?

Anyway, I will stay with my StumpWM (meloveslisp), until I find howto kick-off that ugly i3 workspace bar.
Edit: I know how to do that.

Last edited by valium97582 (2010-07-17 01:50:09)


I'm also known as zmv on IRC.

Offline

#10 2010-07-17 11:20:04

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: Ratpoison: C-t q keybind does not work

Ratpoison is alive and widely used, last git commit is only two months old. Lisphaters (and humanreadableconfigfileslovers) are not going to switch.


Mortuus in anima, curam gero cutis

Offline

Board footer

Powered by FluxBB