VectorLinux
October 31, 2014, 12:37:06 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1] 2
  Print  
Author Topic: xinitrc and xmodmap  (Read 9925 times)
TomEd
Member
*
Posts: 12


« on: May 14, 2007, 06:57:58 pm »

Hi all

I just started with Vector yesterday and I'm enjoying it so far. I'm using 5.8 Standard on a really old HP laptop.

I have installed the window manager, ratpoison, and it works well.  ratpoison uses the 'ctrl' key a lot, so I like to map Caps-Lock to 'ctrl'. I have written an .Xmodmap in my home directory, and I can run it with "xmodmap .Xmodmap", and the mapping works. Rather than do this every time, I want to put the call to .Xmodmap in my xinitrc file. I have tried lots of variations of xinitrc.ratpoison but nothing works. This is the latest incarnation:

#!/bin/sh
xmodmap $HOME/.Xmodmap &
exec ratpoison

This is in /etc/X11/initrc/ along with the other xinitrc files. I have changed the permissions to make it executable. 

Incidentally, the mapping works when I am in xfce...where I don't really want it!

Any ideas are most welcome!

Thanks,
Tom

Logged
saulgoode
Vectorite
***
Posts: 340



« Reply #1 on: May 14, 2007, 08:06:16 pm »

Perhaps you have a '~/.ratpoisonrc' file which is executing xmodmap after your 'xinitrc.ratpoison'?

If so, I would recommend modifying it to set your xmodmap.
Logged

A complex system that works is invariably found to have evolved from a simple system that works.
TomEd
Member
*
Posts: 12


« Reply #2 on: May 14, 2007, 08:24:08 pm »

I created a .ratpoisonrc, and used that to call xmodmap, just as you suggested, and it worked. Thanks!

In case anyone is interested in writing a .ratpoisonrc, this one has about everything you could want and more:

http://en.wikibooks.org/wiki/Using_Ratpoison/Example_Config
Logged
Triarius Fidelis
Vecteloper
Vectorian
****
Posts: 2399


Domine, exaudi vocem meam


WWW
« Reply #3 on: May 14, 2007, 09:36:45 pm »

I used to use ratpoison. Found it a wee bit too spartan, even for my tastes. But if you like rp (and perhaps FP), you'll love xmonad.
Logged

"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months
TomEd
Member
*
Posts: 12


« Reply #4 on: May 14, 2007, 09:56:06 pm »

A new one!  I thought I'd tried just about all of the minimalistic, keyboard driven WMs.  Maybe one day I'll take a look at that...one day after I've learned Haskell (I guess that's what the FP is...I'm not a programmer).
Logged
Triarius Fidelis
Vecteloper
Vectorian
****
Posts: 2399


Domine, exaudi vocem meam


WWW
« Reply #5 on: May 14, 2007, 10:15:29 pm »

FP is not Haskell, but Haskell is FP. Nice introduction on the subject.
Logged

"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months
kidd
Packager
Vectorian
****
Posts: 682


« Reply #6 on: May 15, 2007, 12:42:09 am »

Welcome TomEd,
I'm addicted to ratpoison too, and I have my CAPSLOCK key binded to control too.
If you want to see how my .ratpoisonrc looks : http://raimonster.googlepages.com/ratpoison

After trying nearly every of those "minimalistic" wm, I stayed with ratpoison, but I'm feeling like giving a chance to those new ones (xmonad, wmii3...) provided they don't have library dependencies.

Don't hesitate to comment anything on that great wm, it's always nice to share experiences on those kind of apps.  I learn new rp features everyday.
Logged

Triarius Fidelis
Vecteloper
Vectorian
****
Posts: 2399


Domine, exaudi vocem meam


WWW
« Reply #7 on: May 15, 2007, 12:47:48 am »

After trying nearly every of those "minimalistic" wm, I stayed with ratpoison, but I'm feeling like giving a chance to those new ones (xmonad, wmii3...) provided they don't have library dependencies.

xmonad has no dependencies other than a functioning Haskell system. Remember, Xlib is just socket-based I/O. Probably a good investment of disk space.

(I switched back to WindowMaker though...my hands are generally engaged with the keyboard anyway.)
Logged

"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months
TomEd
Member
*
Posts: 12


« Reply #8 on: May 15, 2007, 04:13:06 am »

Cheers, kidd,

On looking through your .ratpoisonrc, I found "undo".  I can't believe I lived without that before!
Logged
kidd
Packager
Vectorian
****
Posts: 682


« Reply #9 on: May 15, 2007, 01:38:32 pm »

There's even a redo command (though I've never used it).

Lately (since hanu threw http://www.vectorlinux.com/forum2/index.php?topic=2969.0) I'm thinking of writing a howto about converting your whole pc the most vim-like I can.  Definately, a wiki would be better, but there are only forums available.

In the same direction, we could start a thread in the software section about ratpoison.  As ratpoison wiki is often unavailable, I don't know what to do with the new tricks/features I discover. 

What do you think guys? Those post won't be a monologe, so starting both in software section would be better.

Regards
Logged

TomEd
Member
*
Posts: 12


« Reply #10 on: May 15, 2007, 07:29:50 pm »

I'd certainly be interested in that.  By 'vim-like' do you mean making everything keyboard controllable without all the 'chording' of Emacs?
Logged
Triarius Fidelis
Vecteloper
Vectorian
****
Posts: 2399


Domine, exaudi vocem meam


WWW
« Reply #11 on: May 15, 2007, 07:33:25 pm »

There's even a redo command (though I've never used it).

Lately (since hanu threw http://www.vectorlinux.com/forum2/index.php?topic=2969.0) I'm thinking of writing a howto about converting your whole pc the most vim-like I can.  Definately, a wiki would be better, but there are only forums available.

Vim-like Gtk key theme:
http://www.vim.org/tips/tip.php?tip_id=970
Logged

"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months
kidd
Packager
Vectorian
****
Posts: 682


« Reply #12 on: May 16, 2007, 01:09:34 am »

I'd certainly be interested in that.  By 'vim-like' do you mean making everything keyboard controllable without all the 'chording' of Emacs?

For me, the main point is everything being keyboard drive, better if hjkl driven. Since I got used to hjkl, using apps that don't understand that basic key movements turns me crazy.

I've tried to learn emacs a few times, but never got used to so many control keys.
I'm open to learn emacs, so you can try to convince me, or point some good tutorials (emacs tutorial c-h t is not that nice;)

hanu:
ty for the tip, I'll try it when I get home.  Until now I was using the emacs bindings for gtk.  ctrl-w deleting previous word has become quite natural to me, and basic emacs movement (as in default shells) too, but I'll try vim-ish for sure.

Seeya!





« Last Edit: May 16, 2007, 01:15:56 am by kidd » Logged

Triarius Fidelis
Vecteloper
Vectorian
****
Posts: 2399


Domine, exaudi vocem meam


WWW
« Reply #13 on: May 16, 2007, 02:21:31 am »

I've tried to learn emacs a few times, but never got used to so many control keys.
I'm open to learn emacs, so you can try to convince me, or point some good tutorials (emacs tutorial c-h t is not that nice;)

Well, I won't really try to convince you. Not to use GNU Emacs anyway. XEmacs maybe, but I'm content with Vim now.

If you do plan to use any kind of Emacs, consider something like the viper package.
Logged

"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months
TomEd
Member
*
Posts: 12


« Reply #14 on: May 16, 2007, 07:50:07 am »

I prefer vim because it is much easier on my hands, but I keep going back to Emacs - mostly because of Auctex.

hanumizzle: Out of interest, is your preference for XEmacs political or feature driven?  I have only played with XEmacs very briefly.
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!