You are not logged in.

#151 2014-05-03 16:20:15

ivoarch
Member
From: the six feet under the ground
Registered: 2011-03-31
Posts: 436

Re: Share your Ratpoison (experience)

My ratpoison configuration.

s_1399133994_2535523_fed3e51c12.png

Source : ratpoison.org  version.
To install: Open in emacs and type M-x org-babel-tangle or  C-c C-v t

Also you can copy it from here!

startup_message off

unmanage xmessage

set font "Anonymous Pro-13"
set bgcolor LightGray
set bargravity nw
set barpadding 5 0
set winliststyle row
set winfmt [%n] %s %t
set winname class
set wingravity c
set maxsizegravity c

set padding 0 0 0 0
set barborder 0
set border 0
set waitcursor 0
msgwait 3

# Rudeness is a bitwise or of the following values:
# 1 Transient windows may raise.
# 2 Normal windows may raise.
# 4 New transient windows end up in the foreground.
# 8 New normal windows end up in the foreground.
rudeness 12

addhook key banish
addhook switchwin info [%n] %t
addhook switchframe info [%n] %t

bind z windows
bind o only
bind u undo
bind d dedicate
bind g groups

bind W tmpwm calavera-wm

bind c exec screen -Q select 0; exec ~/bin/ratpoison/rp-run-or-raise.sh URxvt 'urxvt'
alias emacs exec ~/bin/ratpoison/rp-run-or-raise.sh Emacs 'emacsclient -ca emacs'
bind E emacs
alias escreen exec screen -Q select 1; exec ~/bin/ratpoison/rp-run-or-raise.sh URxvt 'urxvt'
bind e escreen
alias conkeror exec ~/bin/ratpoison/rp-run-or-raise.sh Conkeror 'conkeror'
bind w conkeror
bind m exec ratpoison -c "exec urxvt -e man $(ratpoison -c "prompt Manpage:")"
bind D exec ratpoison -c "echo `dropbox status`"
alias time exec /usr/share/ratpoison/ratdate.sh
bind t time
bind I exec ~/bin/ratpoison/rat_info.sh

alias screensaver exec ~/bin/system/dpms-toggle.sh
bind Pause screensaver

alias toggletouchpad exec ~/bin/system/touchpad_toggle
bind BackSpace toggletouchpad

alias ratshot exec import -window root png:$HOME/Pictures/Screenshots/ratpoison-$(date +%s)$$.png && ratpoison -c "echo Ratshot saved!"
definekey top Print ratshot

definekey root Escape abort

unbind k

definekey top XF86AudioRaiseVolume exec amixer -q set PCM 5+ unmute; ratpoison -c "echo RaiseVolume +5"
definekey top XF86AudioLowerVolume exec amixer -q set PCM 5- unmute;  ratpoison -c "echo LowerVolume -5"
definekey top XF86AudioMute exec amixer -q set PCM toggle; ratpoison -c "echo [ MUTE ]"

definekey top XF86AudioPlay exec urxvt -e emacsclient -e "(emms-pause)"; ratpoison -c "echo toggle EMMS"
definekey top XF86AudioPrev exec urxvt -e emacsclient -e "(emms-previous)"; ratpoison -c "echo EMMS << Previous song"
definekey top XF86AudioNext exec urxvt -e emacsclient -e "(emms-next)"; ratpoison -c "echo EMMS >> Next song"

alias edit exec emacs $HOME/.ratpoisonrc
alias mail exec ~/bin/mail/gmail.sh
alias skype exec ~/bin/system/run-skype.sh
alias enote exec emacsclient -c --eval '(deft)'
alias poweroff exec ~/bin/system/poweroff.sh

exec urxvt -e screen -RD
exec conkeror

Last edited by ivoarch (2014-05-03 16:35:19)


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.
Github )||( Weblog

Offline

#152 2014-05-20 21:28:12

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: Share your Ratpoison (experience)

Two simple patches I use.

Ignore window size hints (to remove gaps with terminal windows - use this with rxvt-unicode-patched to avoid artifacts)

diff --git a/src/manage.c b/src/manage.c
index 412fc29..5dc13a9 100644
--- a/src/manage.c
+++ b/src/manage.c
@@ -714,17 +714,8 @@ maximize_normal (rp_window *win)
   /* Set the window's border */
   win->border = defaults.window_border_width;
 
-  /* Honour the window's maximum size */
-  if (win->hints->flags & PMaxSize)
-    {
-      maxx = win->hints->max_width;
-      maxy = win->hints->max_height;
-    }
-  else
-    {
       maxx = frame->width - win->border * 2;
       maxy = frame->height - win->border * 2;
-    }
 
   /* Honour the window's aspect ratio. */
   PRINT_DEBUG (("aspect: %ld\n", win->hints->flags & PAspect));
@@ -755,32 +746,6 @@ maximize_normal (rp_window *win)
       if (maxy > frame->height) maxy = frame->height - win->border * 2;
     }
 
-  /* Make sure we maximize to the nearest Resize Increment specified
-     by the window */
-  if (win->hints->flags & PResizeInc)
-    {
-      int amount;
-      int delta;
-
-      if (win->hints->width_inc)
-        {
-          amount = maxx - win->width;
-          delta = amount % win->hints->width_inc;
-          if (amount < 0 && delta) amount -= win->hints->width_inc;
-          amount -= delta;
-          maxx = amount + win->width;
-        }
-
-      if (win->hints->height_inc)
-        {
-          amount = maxy - win->height;
-          delta = amount % win->hints->height_inc;
-          if (amount < 0 && delta) amount -= win->hints->height_inc;
-          amount -= delta;
-          maxy = amount + win->height;
-        }
-    }
-
   PRINT_DEBUG (("maxsize: %d %d\n", maxx, maxy));
 
   win->width = maxx;

No default key bindings (so you must set all bindings in your .ratpoisonrc)

diff --git a/src/actions.c b/src/actions.c
index 6dfe56f..05b5ab5 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -725,88 +725,6 @@ initialize_default_keybindings (void)
   /* Add the prefix key to the top-level map. */
   add_keybinding (prefix_key.sym, prefix_key.state, "readkey " ROOT_KEYMAP, top);
 
-  add_keybinding (prefix_key.sym, prefix_key.state, "other", map);
-  add_keybinding (prefix_key.sym, 0, "meta", map);
-  add_keybinding (XK_g, RP_CONTROL_MASK, "abort", map);
-  add_keybinding (XK_0, 0, "select 0", map);
-  add_keybinding (XK_1, 0, "select 1", map);
-  add_keybinding (XK_2, 0, "select 2", map);
-  add_keybinding (XK_3, 0, "select 3", map);
-  add_keybinding (XK_4, 0, "select 4", map);
-  add_keybinding (XK_5, 0, "select 5", map);
-  add_keybinding (XK_6, 0, "select 6", map);
-  add_keybinding (XK_7, 0, "select 7", map);
-  add_keybinding (XK_8, 0, "select 8", map);
-  add_keybinding (XK_9, 0, "select 9", map);
-  add_keybinding (XK_minus, 0, "select -", map);
-  add_keybinding (XK_A, 0, "title", map);
-  add_keybinding (XK_A, RP_CONTROL_MASK, "title", map);
-  add_keybinding (XK_K, 0, "kill", map);
-  add_keybinding (XK_K, RP_CONTROL_MASK, "kill", map);
-  add_keybinding (XK_Return, 0, "next", map);
-  add_keybinding (XK_Return, RP_CONTROL_MASK,   "next", map);
-  add_keybinding (XK_a, 0, "time", map);
-  add_keybinding (XK_a, RP_CONTROL_MASK, "time", map);
-  add_keybinding (XK_b, 0, "banish", map);
-  add_keybinding (XK_b, RP_CONTROL_MASK, "banish", map);
-  add_keybinding (XK_c, 0, "exec " TERM_PROG, map);
-  add_keybinding (XK_c, RP_CONTROL_MASK, "exec " TERM_PROG, map);
-  add_keybinding (XK_colon, 0, "colon", map);
-  add_keybinding (XK_exclam, 0, "exec", map);
-  add_keybinding (XK_exclam, RP_CONTROL_MASK, "colon exec " TERM_PROG " -e ", map);
-  add_keybinding (XK_i, 0, "info", map);
-  add_keybinding (XK_i, RP_CONTROL_MASK, "info", map);
-  add_keybinding (XK_k, 0, "delete", map);
-  add_keybinding (XK_k, RP_CONTROL_MASK, "delete", map);
-  add_keybinding (XK_l, 0, "redisplay", map);
-  add_keybinding (XK_l, RP_CONTROL_MASK, "redisplay", map);
-  add_keybinding (XK_m, 0, "lastmsg", map);
-  add_keybinding (XK_m, RP_CONTROL_MASK, "lastmsg", map);
-  add_keybinding (XK_n, 0, "next", map);
-  add_keybinding (XK_n, RP_CONTROL_MASK, "next", map);
-  add_keybinding (XK_p, 0, "prev", map);
-  add_keybinding (XK_p, RP_CONTROL_MASK, "prev", map);
-  add_keybinding (XK_quoteright, 0, "select", map);
-  add_keybinding (XK_quoteright, RP_CONTROL_MASK, "select", map);
-  add_keybinding (XK_space, 0, "next", map);
-  add_keybinding (XK_space, RP_CONTROL_MASK, "next", map);
-  add_keybinding (XK_v, 0, "version", map);
-  add_keybinding (XK_v, RP_CONTROL_MASK, "version", map);
-  add_keybinding (XK_V, 0, "license", map);
-  add_keybinding (XK_V, RP_CONTROL_MASK, "license", map);
-  add_keybinding (XK_w, 0, "windows", map);
-  add_keybinding (XK_w, RP_CONTROL_MASK, "windows", map);
-  add_keybinding (XK_s, 0, "split", map);
-  add_keybinding (XK_s, RP_CONTROL_MASK, "split", map);
-  add_keybinding (XK_S, 0, "hsplit", map);
-  add_keybinding (XK_S, RP_CONTROL_MASK, "hsplit", map);
-  add_keybinding (XK_Tab, 0, "focus", map);
-  add_keybinding (XK_Tab, RP_META_MASK, "focuslast", map);
-  add_keybinding (XK_Left, RP_CONTROL_MASK, "exchangeleft", map);
-  add_keybinding (XK_Right, RP_CONTROL_MASK, "exchangeright", map);
-  add_keybinding (XK_Up, RP_CONTROL_MASK, "exchangeup", map);
-  add_keybinding (XK_Down, RP_CONTROL_MASK, "exchangedown", map);
-  add_keybinding (XK_Left, 0, "focusleft", map);
-  add_keybinding (XK_Right, 0, "focusright", map);
-  add_keybinding (XK_Up, 0, "focusup", map);
-  add_keybinding (XK_Down, 0, "focusdown", map);
-  add_keybinding (XK_Q, 0, "only", map);
-  add_keybinding (XK_R, 0, "remove", map);
-  add_keybinding (XK_f, 0, "fselect", map);
-  add_keybinding (XK_f, RP_CONTROL_MASK, "fselect", map);
-  add_keybinding (XK_F, 0, "curframe", map);
-  add_keybinding (XK_r, 0, "resize", map);
-  add_keybinding (XK_r, RP_CONTROL_MASK, "resize", map);
-  add_keybinding (XK_question, 0, "help " ROOT_KEYMAP, map);
-  add_keybinding (XK_underscore, RP_CONTROL_MASK, "undo", map);
-  add_keybinding (XK_u, 0, "undo", map);
-  add_keybinding (XK_u, RP_CONTROL_MASK, "undo", map);
-  add_keybinding (XK_U, 0, "redo", map);
-  add_keybinding (XK_x, 0, "swap", map);
-  add_keybinding (XK_x, RP_CONTROL_MASK, "swap", map);
-  add_keybinding (XK_N, 0, "nextscreen", map);
-  add_keybinding (XK_P, 0, "prevscreen", map);
-
   add_alias ("unbind", "undefinekey " ROOT_KEYMAP);
   add_alias ("bind", "definekey " ROOT_KEYMAP);
   add_alias ("split", "vsplit");

Offline

#153 2014-05-21 04:21:44

ivoarch
Member
From: the six feet under the ground
Registered: 2011-03-31
Posts: 436

Re: Share your Ratpoison (experience)

The size hints patch is very useful!
Thanks!


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.
Github )||( Weblog

Offline

#154 2014-06-01 00:59:57

ivoarch
Member
From: the six feet under the ground
Registered: 2011-03-31
Posts: 436

Re: Share your Ratpoison (experience)

JohannesSM64 wrote:

patches I use.

Ignore window size hints (to remove gaps with terminal windows - use this with rxvt-unicode-patched to avoid artifacts)

I have created a aur package (ratpoison-patched-git) that includes your Ignore window size hints patch.
I found it very useful smile

Thanks again!!


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.
Github )||( Weblog

Offline

#155 2014-06-06 21:33:27

brightkills
Member
From: Russia
Registered: 2014-06-06
Posts: 3

Re: Share your Ratpoison (experience)

My ratpoison setup.

s_1402090329_6735956_158d1c7836.png
You can check this config at https://github.com/Extraterrestrial/rp-setup or copy from here.

# settings
escape C-x
startup_message off
set framesels 123456789
set padding 0 14 0 0
set barpadding 0 0
set barinpadding 0
set border 2
set fwcolor white
set font Terminus:style=bold:size=14
exec /usr/bin/rpws init 9 -k

# aliases
alias grid exec ratpoison -c "select -" -c "only" -c "hsplit" -c next -c "vsplit" -c next -c "focusright" -c next -c "vsplit" -c "next"
alias xpaste meta S-Insert
alias colonterm colon exec x-terminal-emulator -e
alias execterm exec x-terminal-emulator -e
alias togglebarhide exec xdotool key --window $(xdotool search --class dzen) b

# keybindings
unbind s
unbind C-s
unbind M-Tab
unbind 4
unbind 5
unbind 6
unbind 7
unbind 8

# applications
bind I colonterm sudo pacman -S 
bind S colonterm ssh 
bind M colonterm man 
bind C-l exec slock
bind F10 execterm mcabber
bind F11 execterm mocp
bind F12 execterm mc
bind H execterm htop
bind C execterm vim ~/.ratpoisonrc
bind backslash exec rp-moc

# wm bindings
bind k delete
bind K kill
bind 0 remove
bind 1 only
bind 2 vsplit
bind 3 hsplit
bind o focus
bind O focusprev
bind R restart
bind M-r source /home/halo/.ratpoisonrc
bind C-y getsel
bind y xpaste
bind 9 exec
bind semicolon colonterm  
bind F1 exec rpws 1
bind F2 exec rpws 2
bind F3 exec rpws 3
bind F4 exec rpws 4
bind F5 exec rpws 5
bind F6 exec rpws 6
bind F7 exec rpws 7
bind F8 exec rpws 8
bind F9 exec rpws 9
bind Q quit
bind equal grid
bind bracketright focus
bind bracketleft focusprev
bind C-bracketright focus
bind C-bracketleft focusprev
bind C-comma rpwsp
bind C-period rpwsn
bind T title
bind w fselect
bind L windows
bind C-s focuslast
bind Tab exec rp-windows
bind M-Tab exec rp-tags
bind B togglebarhide

Offline

#156 2014-07-12 10:54:38

theSage-21
Member
Registered: 2014-07-12
Posts: 1

Re: Share your Ratpoison (experience)

In my ratpoison version I have tried this:-

ratpoison -c "echo $(upower -i /org/freedesktop/UPower/devices/battery_BAT0| grep -E "state|to\ full|percentage")"

from terminal this command works as expected and gives my battery status in the mesage bar

when i try to bind it to a key the message bar says


/bin/sh -c "<command>" finished (127)

why is this happening?

Offline

#157 2015-05-23 18:01:19

olivil
Member
Registered: 2015-05-23
Posts: 1

Re: Share your Ratpoison (experience)

I have a question.

I'm running ratpoison with rpws for multiple workspaces. However I want to disable the meta-ctrl-left and meta-ctrl-right keyboard shortcuts to cycle through workspaces.

I've unbound C-M-Right and C-M-Left in my ~/.ratpoisonrc but since the rpws shorcuts don't need the escape character as a prefix this accomplishes nothing...

How can I disable those shortcuts?

Offline

#158 2016-09-16 06:58:32

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 879
Website

Re: Share your Ratpoison (experience)

I'd highly recommend all of you to check out https://github.com/jcs/ratpoison

Native workspaces using vinit, vselect, vmove, and vdump commands. 
Configured with set virtuals #. 
No more shelling out to rpws which is horribly slow under heavy system load.

among other things. REALLY nice!

20170916_desktop-t.png
interactive ratpoison-repl: https://github.com/trapd00r/utils/blob/master/ratrepl
ratpoisonrc: https://github.com/trapd00r/configs/blo … atpoisonrc

### vim:ft=ratpoison:fde:fdm=marker:fmr=#<,#>:fdc=3:fdl=0:
#< ${HOME}/etc/ratpoisonrc
#   ‗‗‗‗‗‗‗‗‗‗‗‗ ‗‗‗‗‗‗ ‗‗‗‗‗‗‗‗ ‗‗‗‗‗‗‗‗‗‗‗
#         owner  Magnus Woldrich <m@japh.se>
#       crafted  2009-04-24
#         mtime  2016-09-13 12:10:22
#   permissions  You are free to use things you may find useful here.
#                Would my tweaks happen to give you a raise or fetch you a
#                girlfriend, it goes without saying I'm counting on you
#                to share with me as I've shared with you.
#           git  git://github.com/trapd00r/configs.git
#           url  http://github.com/trapd00r/configs
#           irc  japh@freenode #zsh #vim #perl
#   ‗‗‗‗‗‗‗‗‗‗‗‗ ‗‗‗‗‗‗‗‗‗‗‗‗‗ ‗‗‗‗ ‗‗‗‗ ‗‗‗‗
###>
startup_message off
escape C-f
defresizeunit 80

addhook switchgroup next

## the undocumented framefmt takes the same arguments as winfmt.
# set framefmt %w

#< catpoison only!
set virtuals 10
vinit
definekey top  F1 vselect 1
definekey top  F2 vselect 2
definekey top  F3 vselect 3
definekey top  F4 vselect 4
definekey top  F5 vselect 5
definekey top  F6 vselect 6
definekey top  F7 vselect 7
definekey top  F8 vselect 8

definekey top M-1 vselect 1
definekey top M-2 vselect 2
definekey top M-3 vselect 3
definekey top M-4 vselect 4
definekey top M-5 vselect 5

set barsticky off
#set gap
#>

#< options
set           gravity c
set        bargravity c
set        wingravity c
set           winname title
set    maxsizegravity c
set        inputwidth 0
set  historyexpansion 1
set historycompaction 1
set       historysize 1000
set      winliststyle column
set        barpadding 8 8
set           padding 0 10 0 0
set            border 0
set           bgcolor #080808
set           bwcolor #0c0c0c
set           fgcolor #d75f00
set           fwcolor #afd700
set              font Terminus:weight:bold:size=12
set          maxundos 20
#>
#< window management
unmanage tint2
unmanage dzen2
unmanage sdlmame
unmanage mame
unmanage neverball
unmanage gcolor2
#>
#< binds: applications
bind c exec urxvt -name sid -fg white -bg black
bind C exec urxvt -name sid -fg white -bg '#1c1c1c'
bind v exec urxvt -name sid -bg '#121212' -fg '#bbaaaa'
bind x exec urxvt -name sid -fn 'xft:Terminus:pixelsize=14'
bind X exec xterm -name XTerm
bind e exec rp-runorraise firefox
bind p exec knradio -p
bind o exec knradio -s
bind 0 exec ratpoison -c "echo ´~/bin/knnp´"

#< top level XF86 binds
definekey top XF86AudioRaiseVolume  exec amixer -c 0 set Master 2dB+
definekey top XF86AudioLowerVolume  exec amixer -c 0 set Master 2dB-
definekey top XF86AudioMute         exec amixer -c 0 set Master mute
definekey top XF86Calculator        exec amixer -c 0 set Master unmute
definekey top XF86Mail              exec nestopia -dpu ~/emu/nes/castlevania.nes
definekey top XF86HomePage          exec nestopia -dpu ~/emu/nes/castlevania3.nes
#definekey top Menu
#>

unbind space
bind   space exec ratpoison -c "echo `acpi | perl -pe 's/Battery 0: \w+, //'`"

unbind w
unbind g
bind w exec sh ~/dev/ratpoison_scripts/window-menu/window-menu
bind g exec ~/dev/utils/rp-groups-menu
#>
#< binds: window management
bind H exchangeleft
bind J exchangedown
bind K exchangeup
bind L exchangeright

bind h focusleft
bind j focusdown
bind k focusup
bind l focusright

bind C-K kill
#bind w windows
#bind W windows

bind u undo
bind G gmove

bind Tab focuslast
bind ISO_Left_Tab focus

#bind s-n gnext
#bind s-p gprev
#bind s-c gnew
#bind s-g gnew
#>
#< binds: workspaces
#exec rpws init 5 -k
#gnewbg one
#gnewbg two
#gnewbg three
#gnewbg four

#>
#< binds: top level
#definekey top C-Return exec firefox -new-tab "`xclip -o`"
#definekey top S-Return getsel
#definekey top Pause    exec ossmix vmix0.pcm8 -- +2
#definekey top Print    exec ossmix vmix0.pcm8 -- -2
#definekey top C-Break  exec ossmix vmix0.pcm9 -- +2
#definekey top C-Print  exec ossmix vmix0.pcm9 -- -2
#>

# act normal, but prevent firefox from raising itself
# when links are opened from other applications
rudeness 12

#< init
hsplit
#>

Offline

#159 2020-09-16 08:11:23

saleem
Member
Registered: 2011-09-21
Posts: 61

Re: Share your Ratpoison (experience)

I know this is an ancient thread but may be there are still some RP in archlinux.

I want to use polybar or dzen on my RP but I can`t figure out how to go about for it . Did try some settings but they did not work for me

e.g

#unmanage tint2
unmanage polybar
exec polybar

#unmanage dzen2
unmanage panel
set padding 0 14 0 14

Would appreciate if someone helps me how to get it done correctly .

Offline

#160 2020-09-16 12:14:14

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 3,506

Re: Share your Ratpoison (experience)

saleem, this really isn't a support thread -- if you need help using polybar or dzen with ratpoison, i'd suggest you start a new topic; post your entire ratpoison config file and your polybar or dzen configs (please use [ code ] tags).

I use rp, but I don't use polybar or dzen. A quick startpage search for "using polybar with ratpoison" or "using dzen with ratpoison" does give me several hits that look useful.


"The prettier the user interface, and the fewer odd replies the system allows you to make, the dumber you once appeared in the mind of the designer." -- Ellen Ullman
-----
How to post

Offline

#161 2020-09-16 12:59:25

saleem
Member
Registered: 2011-09-21
Posts: 61

Re: Share your Ratpoison (experience)

2ManyDogs wrote:

saleem, this really isn't a support thread -- if you need help using polybar or dzen with ratpoison, i'd suggest you start a new topic; post your entire ratpoison config file and your polybar or dzen configs (please use [ code ] tags).

I use rp, but I don't use polybar or dzen. A quick startpage search for "using polybar with ratpoison" or "using dzen with ratpoison" does give me several hits that look useful.

Thank you for guiding me , I will share all my work in a new post . and meanwhile will search for  "using polybar with ratpoison" as well .

Offline

Board footer

Powered by FluxBB