The officially official Devuan Forum!

You are not logged in.

#1 2017-11-01 16:22:26

macondo
Member
Registered: 2017-06-11
Posts: 17

HOWTO: Ratpoison Basic Configuration

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 smile.

Ratpoison (rp) is not for everybody, eye-candy, icons, title/taskbar are absent. It's
all business, uses every pixel of space and uses 1 MB of RAM. Apps are maximized
by default. If you spend time comparing desktops with your buddies to see which is
prettier, stop reading, this is not for you.

Gamers, devs, and all sort of miscreants love rp.

#apt-get install ratpoison  dmenu

BIND KEY
The way it works is: you press a 'bind' key plus another letter you
assign to a package you want to launch.

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'.

Other examples of bind keys are: C-z, C-a, C-d ...etc

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.

http://thinkmoult.com/ratpoison-an-effi … malist-wm/

IMHO, the easiest way to configure rp is from another wm/DE you're using at the moment.

Create the file .xmodmaprc in your /home:

$ touch .xmodmaprc

Once created, enter it with favorite editor:

$ nano .xmodmaprc

And paste this:

remove lock = Caps_Lock
keycode 66 = F13

Put xmodmaprc in your .xinitrc:

$ nano .xinitrc

Paste this:

xmodmap .xmodmaprc

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

$ touch .ratpoisonrc

Then you enter it:

$ nano .ratpoisonrc

You'll notice is blank, then paste and post something like this:
Here's my .ratpoisonrc:

alias term exec lxterminal
escape F13
unbind k
bind j focusdown
bind h focusleft
bind k focusup
bind l focusright

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

exec /usr/bin/rpws init 2 -k
exec rpws 1
exec /usr/bin/rpws init 6 -k
bind F1 exec rpws 1
bind F2 exec rpws 2

exec xsetroot -solid black -cursor_name left_ptr
bind semicolon colon
set winname class
set fgcolor yellow
set bgcolor black
set bargravity sw
defborder 0
defpadding 0 0 0 0
defbarpadding 0 0

definekey top M-Tab next
bind space exec lxterminal 
definekey top F2 exec xfe
bind f exec firefox
definekey top F4 kill
definekey top F7 exec mirage
definekey top F8 exec hexchat
definekey top Print exec lxterminal -e scrot -cd 10  

definekey top C-Down exec amixer -q set Master 9- unmute 
definekey top C-Up exec amixer -q set Master 9+ unmute

bind d exec dmenu_run
bind r restart
bind w windows
bind Escape abort
bind q only
bind b banish
rudeness 12

#Run box (sudo and apps launching)
definekey top C-space exec

save/exit/reboot



--
HOW DOES 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 terminal 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? F4
Want to know 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/date 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
alt-tab as usual OR tap the bind key twice

LAUNCHING RP
You can launch rp from your .xinitrc, here is mine:

#!/bin/sh

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

exec ratpoison

save/exit/reboot

Play with it, it's addictive.
Happy trails,
macondo

Last edited by macondo (2017-11-09 02:35:24)


Desktop Celeron 4 GB RAM Ratpoison
"Sometimes, a man finds his destiny on the road he took to avoid it"

Offline

#2 2017-11-01 20:16:00

macondo
Member
Registered: 2017-06-11
Posts: 17

Re: HOWTO: Ratpoison Basic Configuration

6cc7fc644228673.jpg 3491b1644228703.jpg 47eaee644228723.jpg 4d10d8644228753.jpg


Desktop Celeron 4 GB RAM Ratpoison
"Sometimes, a man finds his destiny on the road he took to avoid it"

Offline

Board footer