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

Board footer

Powered by FluxBB