Skip to content

Instantly share code, notes, and snippets.

@kborling
Last active February 6, 2022 15:43
Show Gist options
  • Save kborling/9821d0feb2e0cbbc34940dfed8c7c6d7 to your computer and use it in GitHub Desktop.
Save kborling/9821d0feb2e0cbbc34940dfed8c7c6d7 to your computer and use it in GitHub Desktop.
Ratpoison Window Manager Config
# Programs to start automatically
exec /usr/bin/rpws init 6 -k
exec picom &
exec nitrogen --restore
# Set the font
set font "Cascadia Mono"
# Set colors
set bgcolor black
set fgcolor white
# Make messages appear in the middle of the screen:
set bargravity c
# set window borders to 0
set border 0
# switch off the startup message
startupmessage off
# bind M-! to store the current frame layout in slot #1
bind M-exclam exec ratpoison -c "setenv fs1 `ratpoison -c 'fdump'`"
#bind M-1 to restore the frame layout in slot #1
bind M-1 exec ratpoison -c "frestore `ratpoison -c 'getenv fs1'`"
# Do the same for slot #2 and bind it to M-@ and M-2, respectively.
bind M-at exec ratpoison -c "setenv fs2 `ratpoison -c 'fdump'`"
bind M-2 exec ratpoison -c "frestore `ratpoison -c 'getenv fs2'`"
# Give ourselves another slot on M-# and M-3, respectively.
bind M-numbersign exec ratpoison -c "setenv fs3 `ratpoison -c 'fdump'`"
bind M-3 exec ratpoison -c "frestore `ratpoison -c 'getenv fs3'`"
# make a display a calendar for the current month.
bind a exec ratpoison -d :0.0 -c "echo `date +'%r - %A %n %D - %B'` `cal | tail -n +2 | sed -e 's/^Su/\n\n Su/' -e 's/.*/ & /' -e \"s/\ $(date +%e)\ /\/\"`"
# Workspaces
bind C-1 exec rpws 1
bind C-2 exec rpws 2
bind C-3 exec rpws 3
bind C-4 exec rpws 4
bind C-5 exec rpws 5
bind C-6 exec rpws 6
# Move between Workspaces
bind C-comma exec rpws prev
bind C-period exec rpws next
# Move window to Previous/Next Workspace
bind C-M-comma exec rpws moveprev
bind C-M-period exec rpws movenext
# Move window to the specified Workspace
bind C-M-1 exec rpws move1
bind C-M-2 exec rpws move2
bind C-M-3 exec rpws move3
bind C-M-4 exec rpws move4
bind C-M-5 exec rpws move5
bind C-M-6 exec rpws move6
# Keybindings
bind e exec emacsclient -c -a=''
bind o exec firefox
bind c exec xterm -e bash -c "tmux -q has-session && exec tmux attach-session -d || exec tmux new-session -n$USER -s$USER@$HOSTNAME"
bind slash exec dmenu_run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment