Nearphuture.Org

Ratpoison


Ratpoison is a simple all keyboard driven Window manager with really few depedencies. I like using it because it work anywhere (Linux or *BSD), use really few system ressources, a simple text config file, and my hands stay on my keyboard :) .

ratpoison screenshot

Here is for example a config file close to what I use I use everyday :

## ratpoison config file
#            _               _                 
#  _ __ __ _| |_ _ __   ___ (_)___  ___  _ __  
# | '__/ _` | __| '_ \ / _ \| / __|/ _ \| '_ \ 
# | | | (_| | |_| |_) | (_) | \__ \ (_) | | | |
# |_|  \__,_|\__| .__/ \___/|_|___/\___/|_| |_|
#               |_|                            
#

# --- Documentation :
# http://ratpoison.nongnu.org/doc/

# --- Init -------------------------------------
# Quiet mode :
startup_message off
# Disable 'Caps_Lock' Key and make it work as 'Ctrl' Key :
exec setxkbmap -option 'caps:ctrl_modifier' && xcape -e 'Caps_Lock=Escape' &
# Support for GamePad (Useful on the 'GPD Win 3' to remap some GamePad button as useful keystrokes) : 
exec antimicrox --hidden &
# Black background :
exec xsetroot -solid "#000000"
# For transparencies :
exec xcompmgr -c -f -D 5 &
# Wallpaper :
exec feh --bg-scale ~/Wallpaper/biohazard.jpg
# Load personalized X11 ressources :
exec xrdb -merge ~/.Xresources
# Virtual Desktop :
exec rpws init 8 -k
# Start Screen Saver :
exec xscreensaver -nosplash
# Terminal alias and start one :
alias terminal_start exec sakura
exec sakura

# --- System -----------------------------------
# Screenshot :
alias sshot exec scrot -d 2 ~/screenshot-%Y%m%d_%H%M%S.png && ratpoison -c "echo screenshot saved !"
definekey top Print sshot
definekey top M-P sshot
# Screen Lock :
definekey top C-M-q exec xscreensaver-command -lock
definekey top C-s-q exec xscreensaver-command -lock
# Restart and  Reload config file :
unbind at
bind at restart

# --- Design -----------------------------------
# Look :  
set border 0
set barpadding 0 0 0 0
set padding 0 0 0 0
set fgcolor green
set bgcolor black

# -- Focus -------------------------------------
definekey top M-Tab next
definekey top s-Tab focus

# --- Windows Management -----------------------
# Horizontal Split on "|" :
unbind s
unbind bar
bind bar hsplit
# Vertical Split on "-" :
unbind S
unbind minus
bind minus split
# Kill on "x"
unbind x
bind x remove
# Full on "z"
unbind z
bind z only

# --- Workspace Management ---------------------
# Workspace : Alt-F1->F8 (Default)
#definekey top C-1 exec rpws 1
#definekey top C-2 exec rpws 2
#definekey top C-3 exec rpws 3
#definekey top C-4 exec rpws 4
#definekey top C-5 exec rpws 5
#definekey top C-6 exec rpws 6
#definekey top C-7 exec rpws 7
#definekey top C-8 exec rpws 8
# Daskboard with WTFutil :
definekey top M-F10 terminal_start -e wtfutil
# Prev/Next Workspace :
definekey top M-Left rpwsp
definekey top M-Right rpwsn

# -- Screen / Monitor
definekey top M-Up nextscreen
definekey top M-Down prevscreen

# --- Virtual Desktop
gnewbg one
gnewbg two

# --- Start several tools with special layout :
alias start_right terminal_start 
alias start_bottom terminal_start -e bpytop
alias start_left_top terminal_start -e mpv --volume=10 --config=no --quiet --vo=tct --lavfi-complex='[aid1]asplit[ao][a1];[a1]showwaves=mode=cline:colors=green:rate=25[vo]' http://somafm.com/defcon256.pls
alias start_left_bottom exec emacs
bind R exec ratpoison -c vsplit -c focusup -c hsplit -c vsplit; sleep 2; ratpoison -c focusdown -c focusdown -c start_bottom ; sleep 2; ratpoison -c focus -c start_left_top ; sleep 2; ratpoison -c focus -c start_left_bottom ; sleep 2; ratpoison -c focus -c start_right

# --- App Launch -------------------------------
# Terminal :
unbind c
bind c terminal_start
unbind A
bind A exec alacritty
unbind C
bind C terminal_start
# Emacs / Terminal :
unbind e
bind e terminal_start -e emacs -nw
# Emacs / X11
unbind E
bind E exec emacs
# Web Browser :
unbin M
bind M exec firefox
unbind G
bind G exec bash -c 'pidof chromium &>/dev/null || exec /usr/bin/chromium --disk-cache-dir=~/tmp/cache'
# Info Panel :
unbind H
bind H terminal_start -e wtfutil
unbind L
bind L terminal_start -e bpytop
# SomaFM :
unbind S
bind S terminal_start -e mpv --volume=10 --config=no --quiet --vo=tct --lavfi-complex='[aid1]asplit[ao][a1];[a1]showwaves=mode=cline:colors=green:rate=25[vo]' http://somafm.com/defcon256.pls
# File Manager :
unbind X
bind X exec pcmanfm

# Alternate Window Manager :
unbind W
bind W tmpwm fluxbox

# Other Apps :
unbind T
bind T exec termius
unbind O
bind O exec libreoffice
unbind B
bind B exec bitwarden-desktop
unbind Y
bind Y exec yubioath-desktop
unbind D
bind D exec discord
unbind Z
bind Z exec xlunch

# ----------------------------------------------