Forum › Forums › General › Tips and Tricks › HOWTO: Ratpoison basic configuration
- This topic has 1 reply, 2 voices, and was last updated Jul 25-9:09 am by Brian Masinick.
-
AuthorPosts
-
July 23, 2020 at 4:18 pm #39271Member
macondo
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 dmenuBIND 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.https://thinkmoult.com/ratpoison-an-efficient-and-minimalist-wm.html
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 .xmodmaprcOnce created, enter it with favorite editor:
$ nano .xmodmaprc
And paste this:
remove lock = Caps_Lock keycode 66 = F13Put xmodmaprc in your .xinitrc:
$ nano .xinitrc
Paste this:
xmodmap .xmodmaprc
LAUNCHING RP
You can launch rp from your .xinitrc, here is mine:Example:
#!/bin/sh setxkbmap -option terminate:ctrl_alt_bksp xsetroot -solid black xrdb -merge .Xdefaults unclutter -idle 2 & numlockx & xmodmap .xmodmaprc exec ratpoisonsave/exit/reboot
CONFIGURATION FILE
It’s called .ratpoisonrc, so you create it:$ touch .ratpoisonrcThen 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 bind b exec brave-browser-stable definekey top F4 kill definekey top F7 exec mirage definekey top F8 exec hexchat definekey top F9 exec geany definekey top Print exec lxterminal -e scrot -cd 10 SOUND 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" 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 execsave/exit/reboot
—
HOW DOES IT WORK?To launch a terminal: press bind key (caps lock) and the spacebar, a white small square will
appear , 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 twicePlay with it, it’s addictive.
Happy trails,
macondoPS: Contrary to common wisdom, you CAN use your mouse as in any other wm.
- This topic was modified 2 years, 9 months ago by macondo.
- This topic was modified 2 years, 9 months ago by macondo.
antiX Core 64 Bit Runit IceWM
"Sometimes a man finds his destiny on the road he took to avoid it."
July 25, 2020 at 9:09 am #39386Moderator
Brian Masinick
::Thanks for the information and your sample setup. I like your simple, straightforward setup.
--
Brian Masinick -
AuthorPosts
- You must be logged in to reply to this topic.