VectorLinux
October 30, 2014, 11:30: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]
  Print  
Author Topic: HOWTO: Ratpoison Basic Configuration  (Read 2493 times)
macondo
Member
*
Posts: 57


« on: July 08, 2012, 03:29:14 pm »

HOWTO: Basic Ratpoison Configuration

This is a basic configuration, i haven't learned all the tricks to it but i do know what works for me Smiley.

INSTALLATION
Right now it is in the 'testing' repo (thanks to stretchedthin), so uncomment it, update and install...
Code:
# slapt-get -u && slapt-get -i ratpoison-1.4.5 xxx (make sure you install the version you need 32 or 64 bits)

I installed the 32 bit version and it's running like a Deere, i'm writing this howto from it on Leafpad.

Ratpoison is at first pretty ugly and the mouse cursor is an X, so you have to configure it.
Install 'dmenu'

Code:
# slapt-get -i dmenu

KEYBIND
The way it works is: you press a 'bind' key plus another letter you assign to a package you want to launch.
In my opinion it's easier to do this configuration from the window manager or whatever desktop environment you're using at the moment.
The default keybind (or bind key) is C-t (Control + letter t) but to me, it's cumbersome and painful on the wrist or fingers.
If you google you'll find tons of material on '.ratpoisonrc' or 'ratpoison configuration' to each his own.

I found  this article by Dion Moult which explains how to change the bind key to the Caps Lock (the key next to your left pinky finger). It's a very good article, you should read it.
It explains how to make the Caps Lock key your bind key:
Create the file .xmodmaprc in your /home:

Code:
$ touch .xmodmaprc

Once created, enter it with favorite editor:
Code:
$ nano .xmodmaprc

And paste this:
Code:
remove lock = Caps_Lock
keycode 66 = F13

Put xmodmaprc in your .xinitrc:

Code:
xmodmap .xmodmaprc

CONFIGURATION FILE
It's called .ratpoisonrc, so you create it:

Code:
$ touch .ratpoisonrc

Then you enter it:
Code:
$ nano .ratpoisonrc


You'll notice is blank, then paste and post something like this:

Code:
alias term exec xterm
escape F13

exec xrdb -merge "$HOME"/.Xdefaults
warp on
startup_message off
set winname class
defborder 0
set padding 0 12 0 0
defbarpadding 0 0
exec xsetroot -solid black -cursor_name left_ptr
bind semicolon colon
set bargravity sw
set winfmt %n %s %t
set fgcolor yellow
set bgcolor black
set font "Terminus-12"


alias showroot exec ratpoison -c fdump; ratpoison -c 'select -' -c only
alias unshowroot exec ratpoison -c "frestore at $HOME/.rpfdump"

### Escritorios virtuales/Workspaces
exec rpws 1
exec /usr/bin/rpws init 6 -k

## bind = F13
bind F1 exec rpws 1
bind F2 exec rpws 2
bind F3 exec rpws 3


#Focus
bind J exchangedown
bind K exchangeup
bind L exchangeright
bind H exchangeleft

bind j focusdown
bind l focusright
bind h focusleft

##Alt-tab
definekey top M-Tab next
definekey top M-ISO_Left_Tab prev

### Atajos de teclas/Keybindings
bind e exec pcmanfm
bind f exec firefox
bind m exec claws-mail
bind u exec xchat
bind l exec leafpad
bind r restart
bind h exec sudo /sbin/halt -p
bind p exec sudo /sbin/reboot
bind o exec libreoffice3.5
bind space exec xterm
bind d exec dmenu_run
bind w windows
bind k kill
bind Escape abort
bind q only

rudeness 12

##To launch a Run box (Ctrl+Space bar):
definekey top C-space exec

# To make a screenshot (Press the Print key)
definekey top Print exec xterm -e scrot -cd 10

# Sound Volume
bind KP_Multiply exec amixer set Master 5%+
bind KP_Divide exec amixer set Master 5%-

--

HOW DO YOU MAKE IT WORK?
To launch a terminal: press bind key (caps lock) a white small square will appear and then press the space bar, and the xterm (or whatever you specify in .ratpoisonrc) will appear.

Ditto for all the other apps.

You want to abort in the middle of an operation? Bind key + Escape.

Close an app? bind + k

What windows you got open? bind + w

Want to go to one of them? bind + the window #

Want to launch dmenu? bind + d

After every change 'restart rp' with: bind + r

What time is it? bind + a

Snapshot? press the key Print.

You miss fbrun? Control key + Space bar

If you want to split the screen horizontally: bind + s

Vertically? Bind + S

Go back to normal? Bind + q

To reboot or halt, become a member the 'wheel' group, #visudo, and uncomment the one with the NOPASSWD option and do your sudo magic, then press bind + h or p and voilĂ !

LAUNCH
You can launch it from your .xinitrc, or GDM (thanks to strechedthin) here's my .xinitrc:

Code:
#!/bin/sh

setxkbmap -option terminate:ctrl_alt_bksp
xsetroot -solid black
xrdb -merge .Xdefaults
setxkbmap es &
unclutter -idle 2 &
numlockx &
xmodmap .xmodmaprc
exec ratpoison

$ startx

It should work otherwise, reboot.

Please feel free to contribute to this howto and correct any mistakes, was done in a hurry.







« Last Edit: July 27, 2014, 05:39:02 am by macondo » Logged

VL 7.0 Light - Barebones Install - Kernel 3.0.17
Debian Testing - Minimal Install - kernel 3.4.0-6.dmz.1-liquorix-686
Desktop: Atom Processor || 1 GB RAM || 500 GB HD
Pages: [1]
  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!