The officially official Devuan Forum!

You are not logged in.

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

macondo
Member
From: Central America
Registered: 2017-06-11
Posts: 52  

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 5- unmute && ratpoison -c "echo Master Vol Down"
definekey top C-Up exec amixer -q set Master 5+ unmute && ratpoison -c "echo Master Vol Up"

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

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

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 (2020-07-11 19:41:06)


Desktop Dual Core 8 GB RAM - Devuan Ceres - Slackware Current - Grub - JWM
“Just because you're paranoid doesn't mean they aren't after you.” ― Joseph Heller, Catch-22

Offline

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

macondo
Member
From: Central America
Registered: 2017-06-11
Posts: 52  

Re: HOWTO: Ratpoison Basic Configuration

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

OR

definekey top C-Down exec amixer -q set Master 5- unmute && ratpoison -c "echo Master Vol Down"
definekey top C-Up exec amixer -q set Master 5+ unmute && ratpoison -c "echo Master Vol Up"

Last edited by macondo (2020-06-25 22:29:57)


Desktop Dual Core 8 GB RAM - Devuan Ceres - Slackware Current - Grub - JWM
“Just because you're paranoid doesn't mean they aren't after you.” ― Joseph Heller, Catch-22

Offline

#3 2021-09-13 22:07:36

macondo123
Member
From: Panama
Registered: 2017-09-23
Posts: 26  

Re: HOWTO: Ratpoison Basic Configuration

Here is another example I use for my keybinds in my .ratpoisonrc:

definekey top M-Tab next
bind space exec qterminal
bind x  exec xfe
bind f exec firefox
bind k kill
bind v exec viewnior
bind h exec hexchat
bind l exec leafpad
definekey top Print exec qterminal -e scrot -cd 10

Offline

#4 2021-09-19 00:27:46

macondo123
Member
From: Panama
Registered: 2017-09-23
Posts: 26  

Re: HOWTO: Ratpoison Basic Configuration

Another example of the sound/volume keybinds:

#volume
definekey top C-Down exec amixer -q set Master 2- unmute                     
definekey top C-Up exec amixer -q set Master 2+ unmute

Offline

#5 2021-10-15 18:51:53

macondo123
Member
From: Panama
Registered: 2017-09-23
Posts: 26  

Re: HOWTO: Ratpoison Basic Configuration

In OpenBSD:

#volume
definekey top C-Down exec sndioctl output.level=-0.1 
definekey top C-Up exec sndioctl output.level=+0.1

Offline

#6 2021-10-16 11:54:28

Ogis1975
Member
Registered: 2017-04-21
Posts: 307  
Website

Re: HOWTO: Ratpoison Basic Configuration

In Ratpoison, mpv doesn't work very well (does not switch to full screen mode ). I would suggest trying Stumpwm. This is a much better alternative.

Last edited by Ogis1975 (2021-10-16 11:54:46)


What economists call over-production is but a production that is above the purchasing power of the worker, who is reduced to poverty by capital and state.
            ----+- Peter Kropotkin -+----

Offline

#7 2021-10-16 13:31:25

hevidevi
Member
Registered: 2021-09-17
Posts: 230  

Re: HOWTO: Ratpoison Basic Configuration

Ogis1975, if you have ffmpeg installed does ffplay go full screen mode?

Good thread macondo123, ratpoison is one of the best window managers made imo apart from dwm.

Last edited by hevidevi (2021-10-16 13:31:43)

Offline

#8 2021-10-16 15:20:46

Ogis1975
Member
Registered: 2017-04-21
Posts: 307  
Website

Re: HOWTO: Ratpoison Basic Configuration

hevidevi wrote:

Ogis1975, if you have ffmpeg installed does ffplay go full screen mode?

No sad


What economists call over-production is but a production that is above the purchasing power of the worker, who is reduced to poverty by capital and state.
            ----+- Peter Kropotkin -+----

Offline

#9 2021-10-17 11:54:14

hevidevi
Member
Registered: 2021-09-17
Posts: 230  

Re: HOWTO: Ratpoison Basic Configuration

Ogis1975 wrote:
hevidevi wrote:

Ogis1975, if you have ffmpeg installed does ffplay go full screen mode?

No sad

That is a shame. Its been awhile since ive played with ratpoison.

Offline

#10 2021-10-18 12:34:39

Ogis1975
Member
Registered: 2017-04-21
Posts: 307  
Website

Re: HOWTO: Ratpoison Basic Configuration

hevidevi wrote:

That is a shame. Its been awhile since ive played with ratpoison.

Yes, but i found a good alternative for ratpoison wm.


What economists call over-production is but a production that is above the purchasing power of the worker, who is reduced to poverty by capital and state.
            ----+- Peter Kropotkin -+----

Offline

#11 2021-10-22 18:29:16

macondo123
Member
From: Panama
Registered: 2017-09-23
Posts: 26  

Re: HOWTO: Ratpoison Basic Configuration

Changed my run box from:
definekey top C-space exec

to: bind u exec

that way I don't have to move my hands off the keyboard smile

Offline

#12 2021-10-25 12:43:22

macondo123
Member
From: Panama
Registered: 2017-09-23
Posts: 26  

Re: HOWTO: Ratpoison Basic Configuration

Latest .ratpoisonrc:

alias term exec qterminal
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 qterminal
bind x exec xfe
bind f exec firefox
bind g exec chrome
definekey top F4 kill
bind v exec vienior
bind h exec hexchat
definekey top Print exec qterminal -e scrot -cd 10

#volume
definekey top C-Down exec  sndioctl output.level=-0.1
definekey top C-Up exec  sndioctl output.level=+0.1

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)
bind u exec

Offline

Board footer